A panchayat (village council) transparency portal: residents can see who their elected members are and what projects are running, and can file grievances; administrators manage the member roster and the project list.
| Layer | Built with |
|---|---|
| Backend | TypeScript, Express, Mongoose (MongoDB) |
| Frontend | React, Material UI, React Router, Axios |
| Auth | JWT, split into user and admin middleware |
Five Mongoose models in backend/db.ts:
- User and Admin — the two account types, authenticated separately.
- Panchayat Member — name, designation, ward, phone, photo.
- Project — name, description, budget, timeline, status, links, images.
- Grievance — a complaint tied to the user who filed it.
All routes are mounted under /api/v1.
| Route | Method | Auth |
|---|---|---|
/signup, /signin |
POST | public |
/ |
GET | user |
/members |
GET | public |
/project |
GET | public |
/complaint |
POST, GET | user |
| Route | Method | Auth |
|---|---|---|
/signup, /signin |
POST | public |
/ |
GET | admin |
/member |
POST | admin |
/member |
GET | public |
/member/:id |
DELETE | admin |
/addProject |
POST | admin |
Member and project reads are deliberately public — the portal's purpose is that residents can see them without an account. Anything that writes requires the matching token.
Request bodies are validated with schemas under backend/validation/
(signup, signin, memberSchema, project, griveance).
The backend and frontend are separate packages.
cd backend && npm install && npm run dev # http://localhost:3000cd frontend && npm install && npm run devThe backend expects a MongoDB connection string; see backend/config.ts for
the values it reads.