Skip to content

Product and System Overview

Product

The portal turns unstructured citizen complaints into trackable grievance records, assigns cases to officers, supports resolution documents, and exposes policy knowledge through role-aware RAG.

sequenceDiagram
  %%{init: {"theme":"base","themeVariables":{"primaryColor":"#1e293b","primaryTextColor":"#f8fafc","primaryBorderColor":"#38bdf8","lineColor":"#64748b","actorBackground":"#1e293b","actorBorder":"#38bdf8","actorTextColor":"#f8fafc","noteBorderColor":"#fbbf24","noteBkgColor":"#78350f","noteTextColor":"#fffbeb"}}}%%
  actor Citizen
  participant FE as React
  participant API as FastAPI
  participant Redis
  participant LLM
  participant DB as PostgreSQL
  Citizen->>FE: Describe grievance
  FE->>API: SSE chat request
  API->>Redis: Load session
  API->>LLM: Classify, extract, follow up
  LLM-->>FE: Stream question or summary
  API->>DB: Persist completed grievance
  DB-->>FE: Ticket and SLA details

Major workflows

  • Authentication and four-role RBAC.
  • Conversational grievance intake with document upload.
  • Category confirmation and mandatory field collection.
  • Load-balanced officer assignment by category, district, and workload.
  • Officer dashboard, status transitions, SLA metrics, and ATR PDF upload.
  • User tracking queries and role-filtered knowledge-base search.

The main technical tradeoff is centralized governance and auditability versus the complexity of multiple storage, identity, and model providers.

Role-oriented product surface

Role Main capabilities
Citizen Create chat sessions, upload evidence, submit grievances, view history, ask tracking questions
Officer View assigned queue, inspect case details, update status, upload action-taken reports
Admin Inspect workload and SLA dashboards, manage categories and knowledge-base documents
Super admin Manage users and privileged configuration

The frontend page names make this division concrete: MyGrievancesPage, TrackingPage, OfficerQueuePage, OfficerDetailPage, AdminDashboardPage, KnowledgeBasePage, and UserManagementPage.

Case lifecycle

The system’s business value is the transition from conversational ambiguity to a governed case:

  1. A user starts a session owned by their authenticated user ID.
  2. The assistant identifies a category and subcategory.
  3. The user can confirm or correct the category.
  4. Required fields are collected and persisted in session state.
  5. A final summary becomes a grievance record with a generated ID such as GRV-2026-0001.
  6. Assignment logic chooses an eligible officer and computes the target resolution deadline.
  7. Officers update the case and can attach an ATR PDF.
  8. Citizens retrieve status through tables or natural-language tracking.

This workflow is intentionally hybrid: LLMs handle language understanding, while category validation, ownership, assignment, status, and SLA persistence remain application logic.