Logo Lanfrica

majhamza/citizen-feedback

Domain:

digital infrastructure

Record type:

software
Creator:
maj
Host:
Citizen feedback platform for government services: multilingual submissions (French/Arabic/Darija) clustered into themed reports with Claude # Citizen Feedback A feedback platform for government services. Citizens submit problems or suggestions from a public, mobile-first form; an administrator dashboard shows the incoming volume and, on demand, asks Claude to cluster the raw submissions into a ranked, themed report. - **Public form** — `/` — French UI, anonymous, no account needed. - **Admin dashboard** — `/admin` — stats, charts, report generation, and a filterable submissions table. **No authentication yet** — see Adding authentication. --- ## Stack | Layer | Choice | |-----------|--------| | Backend | Python 3.11+, FastAPI, SQLAlchemy 2.x | | Database | SQLite by default (`backend/data/app.db`), swappable via `DATABASE_URL` | | LLM | Anthropic Python SDK, model `claude-sonnet-4-6` | | Frontend | React 18 + Vite + Tailwind CSS, charts with Recharts | | Packaging | Single container (`docker-compose.yml`): FastAPI serves the built SPA | --- ## Project layout ``` citizen-feedback/ ├── backend/ │ ├── main.py # FastAPI app, routes, static file serving │ ├── models.py # SQLAlchemy models │ ├── database.py # engine/session setup │ ├── llm.py # Claude report generation │ ├── schemas.py # Pydantic v2 request/response models │ ├── constants.py # services list + regions loader │ ├── seed.py # ~40 fake submissions for demos │ ├── data/regions.json # 12 Morocco regions -> cities │ └── requirements.txt ├── frontend/ # Vite + React + Tailwind ├── Dockerfile ├── docker-compose.yml ├── .env.example └── README.md ``` --- ## Environment variables Copy `.env.example` to `.env` and fill it in. **`.env` is gitignored — never commit it.** | Variable | Required | Default | Purpose | |---|---|---|---| | `LLM_PROVIDER` | No | `api` | `api` (Anthropic API) or `claude_cli` (local Claude Code login) — see Report generation backends. | | `ANTHROPIC_API_KEY` | With `LLM_PROVIDER=api` | — | Anthropic API key. Eve …