How mahicode7/civicpulse- works
CivicPulse is a civic-issue reporting and municipal management application. Citizens report and track infrastructure complaints; staff manage progress and resolutions; administrators oversee users, complaints, and platform activity. The frontend routes role-specific experiences, while the API handles authentication, complaint operations, and rewards. Source excerpts show the server, authentication, and reward wiring; several complaint and dashboard details come from the README, so unverified links are omitted or marked dashed.
Main entry points: App.jsx Application router · routes.js Civic and reward routes · auth.js Authentication routes · authController.js Registration and login
Components 21
Web experience
- Application router
frontend/src/App.jsx - Session context
frontend/src/context/AuthContext.jsx
Identity and access
- Authentication routes
backend/routes/auth.js - Registration and login
backend/controllers/authController.js - Token and role checks
backend/middleware/authMiddleware.js - JWT utilities
backend/utils/authUtils.js - User JSON storage
backend/utils/jsonDatabase.js
Civic operations
- Issue reporting
frontend/src/pages/ReportIssue.jsx - Issue map
frontend/src/pages/MapPage.jsx - Staff dashboard
frontend/src/pages/StaffDashboard.jsx - Admin console
frontend/src/pages/Admin.jsx - API server
backend/server.js - Civic and reward routes
backend/routes.js - Complaint and civic data
backend/database.js
Rewards and participation
- Profile dashboard
frontend/src/pages/Profile.jsx - Rewards dashboard
frontend/src/components/profile/RewardsDashboard.jsx - Leaderboard view
frontend/src/pages/Leaderboard.jsx - Points and rewards
backend/utils/rewards.js
Other components
- Citizens
- Municipal staff
- Administrators
Connections 27
- Citizens → Issue reporting: report issues
- Citizens → Issue map: track issues
- Municipal staff → Staff dashboard: manage progress
- Administrators → Admin console: oversee operations
- Citizens → Profile dashboard: view activity
- Application router → Issue reporting: routes to
frontend/src/App.jsx - Application router → Issue map: routes to
frontend/src/App.jsx - Application router → Staff dashboard: routes to
frontend/src/App.jsx - Application router → Admin console: routes to
frontend/src/App.jsx - Application router → Profile dashboard: routes to
frontend/src/App.jsx - Application router → Leaderboard view: routes to
frontend/src/App.jsx - Profile dashboard → Rewards dashboard: renders
frontend/src/pages/Profile.jsx - Session context → Authentication routes: requests session
frontend/src/context/AuthContext.jsx - API server → Civic and reward routes: mounts API
backend/server.js - API server → Complaint and civic data: initializes
backend/server.js - API server → Registration and login: initializes auth
backend/server.js - Civic and reward routes → Authentication routes: mounts
backend/routes.js - Civic and reward routes → Complaint and civic data: reads and writes
backend/routes.js - Civic and reward routes → Token and role checks: guards endpoints
backend/routes.js - Civic and reward routes → Points and rewards: handles rewards
backend/routes.js - Authentication routes → Registration and login: dispatches
backend/routes/auth.js - Authentication routes → Token and role checks: protects session routes
backend/routes/auth.js - Registration and login → User JSON storage: manages users
backend/controllers/authController.js - Registration and login → JWT utilities: creates tokens
backend/controllers/authController.js - Token and role checks → JWT utilities: verifies tokens
backend/middleware/authMiddleware.js - Points and rewards → User JSON storage: updates user rewards
backend/utils/rewards.js - Points and rewards → Complaint and civic data: syncs reward state
backend/utils/rewards.js