- Case Study
- Internal Tools
- QA
- FastAPI
- React
I work on a Trust & Safety quality team. Every week, the ten of us audit a sample of the previous week's moderation decisions to explain this week's quality KPIs, and write root-cause analyses (RCAs) wherever results are off target.
The audit needs human judgment. Almost everything around it didn't. So I designed a platform that does the rest, and it cut the team's hands-on weekly effort by about 84%.
The old weekly loop
- Export the week's raw cases from the BI dashboard.
- Copy a spreadsheet template, paste the data and check every range and formula still worked.
- Reconcile the sheet's numbers against the official dashboards.
- Split the cases by hand across whoever was active that week.
- Review the cases, then turn the feedback into RCA paragraphs, action plans and the weekly report.
One person spent about an hour on steps 1 to 4. Then each of the ten reviewers spent about an hour reviewing and another hour writing. Every hand-off was a chance for a broken range, a missed case or a number that no longer matched the dashboard.
What I built
One platform now carries the whole loop. An admin runs a weekly sync that ingests the raw export, classifies cases by review type and spreads them across active reviewers by a configurable weight. Each reviewer works their own queue. Dashboards, RCAs, action plans and the report are all built from the same records.
| Surface | Who uses it | What it does |
|---|---|---|
| My Reviews | Reviewer | Their assigned cases, grouped by review type, with the review form |
| Assignments, Calibration | Reviewer, lead | Week-wide ownership and status; a queue for disputed cases |
| Overview, breakdowns, Findings & RCA | Lead | Accuracy KPIs, week-over-week trends, error patterns by site and policy |
| Action plans | Lead | Per-site corrective plans: an AI draft from verified findings, edited and approved by a person |
| Reporting & export | Lead | One-click case export, executive summary sheet and weekly report |
| Admin console | Admin | Weekly sync and rebalancing, members, reviewer weights, per-role None / Read / Write access |
People sign in with the company's single sign-on. The backend resolves each account to a role and checks permissions on every request, so the browser never touches the datastore or the LLM directly.

The decisions that mattered
Spreadsheet-database first, real database later. I had no budget and no rights to provision infrastructure, so the store is the spreadsheet-database inside the company's collaboration suite. It shipped immediately and kept the data where the team already worked. The price is rate limits, no transactions and weak querying, so all aggregation happens in the backend. A managed database is the next step.
A thin FastAPI service owns all the logic. Sync, assignment, KPI aggregation and exports live in one tested service. The React frontend only renders, and TanStack Query invalidates just the queries a change touches.
AI drafts, humans decide. An LLM writes first drafts of action plans and report text, from verified metrics only. It never judges a case, and a lead edits and approves every draft before it goes anywhere.
Out of scope for v1: replacing upstream data sources, automating reviewer judgment, and building a separate identity system.
Two production bugs worth telling
Completed cases kept coming back as Pending. The datastore's batch-create API inserted some rows and then returned a field error. My fallback assumed nothing had landed and inserted the rows again, creating duplicates that read back as Pending. The fix: re-read the table after a partial failure and skip existing IDs, deduplicate reads by logical key while preferring the stronger state (Done over In review over Pending), and add a dry-run cleanup endpoint for the old duplicates.
The executive-summary export took ~98 seconds, then hit rate limits. It made 70+ sequential formatting calls. My first fix ran them in parallel and promptly tripped the API's rate limit. The real fix: bounded batches of six, plus retries with exponential backoff on HTTP 429, with tests for both retry success and retry exhaustion.
Both were diagnosed and patched the day they were reported. The backend now has about 76 pytest tests covering assignment, sync, malformed-input recovery and dashboard logic.

Impact
Hands-on effort went from about 21 to 3.3 person-hours a week. Setup and RCA writing are gone, and review time per reviewer fell from an hour to 20 minutes. What's left is the review itself, the part that should stay human.
| Step | Before | After |
|---|---|---|
| Setup: export, template, reconcile, split (one person) | ~1.1 h | 0 |
| Review (10 reviewers) | 10 × 1 h = 10 h | 10 × 20 min = ~3.3 h |
| RCAs, action plans and report (10 reviewers) | 10 × 1 h = 10 h | 0, generated and approved by a lead |
| Team total per week | ~21.1 person-hours | ~3.3 person-hours |
That's ~17.8 person-hours saved a week, an ~84% cut, or roughly 850 person-hours over 48 working weeks. Step times are the team's estimates of a typical week, not tracked time.
How it was built
I'm not a trained software engineer. I designed the system and used AI coding tools to write most of the implementation. The problem framing, the data and role models, the trade-offs above, what to harden and what to ship were my calls, and I worked through both bugs above in production.
If I kept going, I'd move the queue to a managed database, run heavy syncs and exports as background jobs, add an audit log for every sync and rebalance, and add fairness tests for the weighted assignment.