Case study

AI productivity & workforce analytics platform

Workforce analytics with activity tracking, AI-driven reporting, intelligent scheduling, and operational insight APIs—FastAPI, PostgreSQL, React, and OpenAI-backed summaries.

Backend lead — pipelines, schema, API contracts

Core store
PostgreSQL
API
FastAPI + RLS patterns
UI
React dashboards

Reference architecture

Problem

  • —HR leaders needed consistent metrics across hiring, performance, and attrition signals without exporting sensitive spreadsheets ad hoc.
  • —Reports had to be explainable: every aggregate traceable to row-level policies and time windows.

Architecture

  • —PostgreSQL models org hierarchy, roles, and fact tables for events (reviews, applications, milestones).
  • —FastAPI implements authenticated report endpoints with row-level security aligned to org charts.
  • —Batch jobs compute rollups and anomaly flags; OpenAI assists with narrative summaries constrained to structured outputs.
  • —React dashboards consume paginated aggregates and drill-down APIs rather than shipping raw tables to the client.

Challenges

  • —Correctness vs freshness: nightly rollups vs on-demand recomputation for volatile teams.
  • —PII minimization: tokenized identifiers in logs; field-level redaction in export paths.
  • —Cost control: cache expensive LLM summaries keyed by dataset version and prompt hash.

Technologies

  • —FastAPI
  • —PostgreSQL
  • —React
  • —OpenAI APIs
  • —AWS

Engineering decisions

  • —Treated LLM outputs as presentation layer only—numeric truth always originates from SQL aggregates.
  • —Used pydantic models for every report DTO to keep frontend contracts stable across releases.
  • —Adopted feature flags for AI-generated sections so operators can disable them per tenant.

Outcome

  • —Scalable reporting APIs with auditable metrics and optional AI narratives.
  • —Reduced ad-hoc analyst workload by standardizing definitions in the warehouse schema.

← All case studies · Home · Contact