Ghana Parliament Hansard System — Express + Python backend (transcription, RAG, RBAC)
# Ghana Parliament Hansard System
A full-stack parliamentary transcription and research platform for the Ghana Parliament. Processes audio recordings of parliamentary sittings into structured, searchable, citable transcripts with an AI-powered research assistant.
Built with a three-tier architecture: a React SPA frontend, an Express 5 API gateway handling transcription and authentication, and a Python/FastAPI postprocessing service providing entity correction, RAG-based search, and conversational Q&A over the parliamentary record.
## Tech Stack
### Frontend (Hansard/)
| Category | Technology |
|----------|-----------|
| Framework | React 18, TypeScript |
| Build Tool | Vite 6 |
| Styling | Tailwind CSS 4, Emotion (MUI theming) |
| UI Components | Radix UI (20+ primitives), MUI Material 7, shadcn/ui patterns (CVA + clsx + tailwind-merge) |
| Audio | WaveSurfer.js (waveform playback) |
| Charts | Recharts |
| Forms | React Hook Form |
| Animation | Motion (Framer Motion) |
| Markdown | react-markdown + remark-gfm |
| Drag & Drop | react-dnd |
| Testing | Vitest 4, Testing Library (React + DOM + user-event), fast-check (property-based) |
### Backend Gateway (Express)
| Category | Technology |
|----------|-----------|
| Runtime | Node.js 24 |
| Framework | Express 5 |
| ASR Providers | Deepgram SDK 4, Khaya AI (GhanaNLP) |
| Audio Processing | ffmpeg-static |
| Authentication | jsonwebtoken, jwks-rsa (Cognito RS256 validation), bcrypt |
| AWS SDKs | @aws-sdk/client-bedrock-runtime, @aws-sdk/client-cognito-identity-provider |
| Database | pg (PostgreSQL client) |
| Caching | ioredis (Redis client with reconnect, graceful degradation) |
| File Uploads | Multer 2 |
| API Docs | swagger-ui-express |
| Config | dotenv, TOML |
| Testing | Node.js built-in test runner, fast-check (property-based), supertest, ESLint 9 |
### Postprocessing Service (Python/FastAPI)
| Category | Technology |
|----------|-----------|
| Framework | FastAPI 0.115, Uvicorn (ASGI) |
| Validati …