Skip to content

Grievance Portal GCP Codebase Dossier

This dossier documents the FastAPI/React grievance redressal platform and its migration from local Docker infrastructure toward GCP Cloud Run, Cloud SQL, GCS, Firebase, Secret Manager, and Terraform.

Read first

Executive summary

Citizens submit grievances through a conversational three-pass LLM workflow. The backend classifies a category, extracts mandatory fields, asks follow-ups, then creates and routes a structured case. Officers and administrators use role-specific dashboards, while a role-filtered pgvector RAG service answers policy questions. The GCP deployment provisions Cloud Run services/jobs, Cloud SQL, GCS, IAM, and secrets with Terraform.

flowchart TD
  classDef default fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc
  classDef highlight fill:#065f46,stroke:#34d399,stroke-width:2px,color:#f0fdf4
  Citizen["Citizen"]:::highlight --> FE["React/Vite frontend"]
  FE --> API["FastAPI API"]
  API --> DB["Cloud SQL PostgreSQL + pgvector"]
  API --> Cache["Redis session state"]
  API --> GCS["GCS attachments and ATR PDFs"]
  API --> LLM["LiteLLM / Gemini"]
  Ops["Terraform + Cloud Run jobs"] --> API
  linkStyle default stroke:#64748b,stroke-width:2px

Coverage

The chapters cover evidence, product flow, AI orchestration, backend/frontend design, storage, local/GCP operations, security, tests, engineering highlights, interview preparation, and risks.

Commands

just setup
just up-all
just migrate
just seed
just ingest-rag
just test

MkDocs preview is available with mkdocs serve -f mkdocs-dossier.yml; make consolidate creates the single Markdown report.