How janani-bn/civicfix works
CivicFix is a civic-issue reporting and resolution application. Citizens can report and track local problems, while maps, a public feed, AI assistance, volunteers, and administrators support community response and resolution. The frontend routes users to these capabilities and shares authentication state; the backend exposes API routes for complaints, accounts, comments, volunteers, and AI. Source-index references and excerpts support the backend call edges shown; some frontend-to-backend request details and unsampled feature wiring are not visible, so those links are omitted.
Main entry points: App.jsx Application shell · api.js API configuration · server.js API server · User.js User records
Components 34
Citizen experience
- Application shell
src/App.jsx - Issue reporting
src/components/ReportIssueModal.jsx - Complaint tracking
src/components/TrackComplaint.jsx - Voice guide
src/components/VoiceGuideAssistance.jsx - Welcome guidance
src/components/WelcomeOverlay.jsx - Authentication UI
src/components/Login.jsx
Community response
- Live issue feed
src/components/LiveFeed.jsx - Issue map
src/components/LiveMap.jsx - Map logic
src/utils/liveMapLogic.js - My complaints
src/components/MyComplaints.jsx - Nearby issues
src/components/NearbyComplaints.jsx - Admin dashboard
src/components/AdminDashboard.jsx - Volunteer dashboard
src/components/VolunteerDashboard.jsx - Community comments
backend/src/routes/comments.js - Volunteer requests
backend/src/controllers/volunteerController.js - Volunteer routes
backend/src/routes/volunteers.js
API and workflows
- API configuration
src/services/api.js - API server
backend/server.js - Complaint routes
backend/src/routes/complaints.js - Complaint workflow
backend/src/controllers/complaintController.js - Department routing
backend/src/utils/departmentRouter.js - Complaint records
backend/src/models/Complaint.js
Identity and persistence
- Authentication state
src/context/AuthContext.jsx - Account routes
backend/src/routes/auth.js - Account workflow
backend/src/controllers/authController.js - Token and role checks
backend/src/middleware/auth.js - User records
backend/src/models/User.js - SQLite database
backend/src/config/database.js
AI assistance
- AI chatbot
src/components/LiveChatbot.jsx - AI routes
backend/src/routes/ai.js - AI request handling
backend/src/controllers/aiController.js - Gemini service
backend/src/services/geminiService.js
Other components
- Citizen
- Google Gemini
Connections 41
- Citizen → Application shell: uses
src/App.jsx - Application shell → Issue reporting: opens
src/App.jsx - Application shell → Complaint tracking: routes to
src/App.jsx - Application shell → Live issue feed: routes to
src/App.jsx - Application shell → Issue map: routes to
src/App.jsx - Application shell → Admin dashboard: routes to
src/App.jsx - Application shell → Volunteer dashboard: routes to
src/App.jsx - Application shell → Voice guide: renders
src/App.jsx - Application shell → Welcome guidance: renders
src/App.jsx - Application shell → AI chatbot: renders
src/App.jsx - Application shell → My complaints: routes to
src/App.jsx - Application shell → Nearby issues: routes to
src/App.jsx - Application shell → Authentication UI: routes to
src/App.jsx - Issue reporting → API configuration: uses configuration
src/components/ReportIssueModal.jsx - Complaint tracking → API configuration: uses configuration
src/components/TrackComplaint.jsx - Live issue feed → API configuration: uses configuration
src/components/LiveFeed.jsx - Issue map → API configuration: uses configuration
src/components/LiveMap.jsx - Issue map → Map logic: uses
src/components/LiveMap.jsx - Admin dashboard → API configuration: uses configuration
src/components/AdminDashboard.jsx - Volunteer dashboard → API configuration: uses configuration
src/components/VolunteerDashboard.jsx - Issue reporting → Authentication state: reads auth state
src/components/ReportIssueModal.jsx - Authentication state → API configuration: uses configuration
src/context/AuthContext.jsx - API server → Complaint routes: mounts
backend/server.js - API server → Account routes: mounts
backend/server.js - API server → Community comments: mounts
backend/server.js - API server → Volunteer routes: mounts
backend/server.js - API server → AI routes: mounts
backend/server.js - Complaint routes → Complaint workflow: dispatches
backend/src/routes/complaints.js - Complaint workflow → Complaint records: reads and writes
backend/src/controllers/complaintController.js - Complaint workflow → Department routing: routes issue
backend/src/controllers/complaintController.js - Complaint records → SQLite database: queries
backend/src/models/Complaint.js - Account routes → Account workflow: dispatches
backend/src/routes/auth.js - Account workflow → User records: reads and writes
backend/src/controllers/authController.js - Account workflow → Token and role checks: uses token config
backend/src/controllers/authController.js - Token and role checks → User records: checks roles
backend/src/middleware/auth.js - User records → SQLite database: queries
backend/src/models/User.js - Volunteer routes → Volunteer requests: dispatches
backend/src/routes/volunteers.js - Volunteer requests → User records: reads user
backend/src/controllers/volunteerController.js - AI routes → AI request handling: dispatches
backend/src/routes/ai.js - AI request handling → Gemini service: requests AI
backend/src/controllers/aiController.js - Gemini service → Google Gemini: calls