Full-stack civic issue reporting platform with a React frontend, Node.js backend, SQLite persistence, containerization, Kubernetes manifests, and a Helm chart.
This repo currently contains:
- local development scripts
- Docker Compose
- raw Kubernetes manifests
- a Helm chart in
civic-app/
AKS and GitOps were part of the original deployment, but their configuration is not checked into this repo snapshot.
Citizens can submit public issue reports (garbage, road, water) with location and details.
Admins can:
- log in with state-level credentials,
- view reports from their assigned state,
- update issue status (
Pending,In Progress,Resolved).
The app is designed to run in these ways:
- local development (
npm run dev) - Docker Compose
- Kubernetes manifests
- Helm chart
- User opens frontend and submits a report.
- Frontend sends request to backend API.
- Backend validates data and stores it in SQLite (
backend/data/civic.db). - Admin logs in and receives a token.
- Admin reads and updates reports scoped to the admin's state.
- Frontend reflects updated report status.
User Browser
|
v
Frontend (React + Vite + Nginx)
|
v
Backend API (Node.js + Express)
|
v
SQLite Database (better-sqlite3)
Deployment options:
- Local (Node + Vite)
- Docker Compose
- Kubernetes (Deployments + Services + ConfigMap)
- Helm chart (civic-app/)
- React 19
- TypeScript
- Vite
- React Router
- Axios
- Tailwind CSS (dependency included)
- Nginx (container runtime)
- Node.js
- Express 5
- TypeScript
- better-sqlite3 (SQLite)
- CORS
- Docker and Docker Compose
- Kubernetes
- Helm 3
- Azure Container Registry (ACR)
.
├── backend/
│ ├── src/index.ts
│ ├── data/
│ └── Dockerfile
├── frontend/
│ ├── src/
│ ├── nginx.conf
│ └── Dockerfile
├── civic-app/ # Helm chart
│ ├── Chart.yaml
│ ├── values.yaml
│ └── templates/
├── backend-deployment.yaml # Raw Kubernetes manifests
├── backend-service.yaml
├── frontend-deployment.yaml
├── frontend-service.yaml
├── frontend-nginx-config.yaml
└── docker-compose.yml
Install these tools before setup:
- Node.js 18+ (Node 20 recommended)
- npm 9+
- Docker
- kubectl
- Helm 3
- Optional for Azure: Azure CLI (
az)
npm install
npm run install:all
npm run devServices:
- Backend:
http://localhost:5000 - Frontend:
http://localhost:5173
Backend:
cd backend
npm install
npm run devFrontend:
cd frontend
npm install
npm run devFrom repository root:
docker compose up --buildService:
- Frontend via Nginx:
http://localhost:3000
Stop:
docker compose downApply manifests:
kubectl apply -f frontend-nginx-config.yaml
kubectl apply -f backend-deployment.yaml
kubectl apply -f backend-service.yaml
kubectl apply -f frontend-deployment.yaml
kubectl apply -f frontend-service.yamlCheck resources:
kubectl get pods
kubectl get svcThe chart is in civic-app/ and was generated from the current Kubernetes manifests.
Install or upgrade from the repo root:
helm upgrade --install civic-release ./civic-appRender without deploying:
helm template civic-release ./civic-appUninstall:
helm uninstall civic-releaseHigh-level flow:
- Build frontend and backend images.
- Push images to Azure Container Registry.
- Update image tags in
civic-app/values.yaml. - Deploy the chart to a Kubernetes cluster.
In the original setup, the chart was synced to AKS through GitOps. That wiring is not checked into this snapshot.
# Build and push backend
docker build -t <acr-name>.azurecr.io/civic-backend:latest ./backend
docker push <acr-name>.azurecr.io/civic-backend:latest
# Build and push frontend
docker build -t <acr-name>.azurecr.io/civic-frontend:latest ./frontend
docker push <acr-name>.azurecr.io/civic-frontend:latestThen update civic-app/values.yaml image repositories and tags to point to ACR.
Frontend API base URL:
- The client reads
VITE_API_BASE_URL. - If not set, frontend uses
/apiand expects Nginx/Kubernetes proxy routing.
Backend default port:
5000
POST /reportsubmit issue reportGET /reportslist all reportsGET /healthhealth check
POST /admin/loginadmin authenticationGET /admin/reportsstate-scoped report listPATCH /admin/reports/:id/statusstate-scoped status update
PATCH /reports/:id/status
Seeded in backend startup:
delhi_admin / admin123kerala_admin / admin123maharashtra_admin / admin123punjab_admin / admin123
Add screenshots to assets/ and keep these names for auto-display.
- If frontend cannot reach backend, verify proxy route and service names.
- If Kubernetes image pull fails, check ACR credentials and image paths.
- If backend data seems missing, remember SQLite file is local to container unless persistent volume is configured.
- Add persistent volume for SQLite in Kubernetes.
- Add ingress + TLS for production domain.
- Add monitoring with Prometheus/Grafana.


