How hirtikmalvi/civicvoice works
Project Type and Purpose
• CivicVoice is a full‑stack web application that allows citizens to create and track complaints, authorities to manage them, and admins to oversee the system.
• The backend is a Node.js/Express REST API (TypeScript, Prisma ORM, JWT auth, Cloudinary media storage).
• The frontend is a React/TypeScript single‑page application (SPA) deployed on Vercel.
File Structure
• Top‑level directories: “backend” and “frontend” indicate a clear separation of concerns.
• Backend folders—controllers, services, routes, middlewares, utils—reflect a layered MVC‑style architecture.
• The presence of prisma/schema.prisma shows a relational database (e.g., PostgreSQL).
• Config/cloudinary.ts and utils/uploadToCloudinary.ts indicate integration with external media storage.
• Frontend folders—api, components, pages, contexts, hooks, services—follow a feature‑based React organization.
README for Additional Insights
• Though minimal, the project name “CivicVoice” signals a civic‑tech use case.
Essential Elements to Capture
• Authentication flow, including login, JWT issuance, and middleware enforcement.
• Media upload path: client ➔ uploadController ➔ Cloudinary ➔ Database reference.
• Complaint lifecycle: createComplaint ➔ stored via Prisma ➔ fetched via complaintController.
• Role differentiation: which controllers/routes each role can access.
• Data storage: database schema (users, complaints, upvotes, media).
• Deployment target: Vercel entrypoints.