Anēk (अनेक) is India's community-driven, reward-based platform for civic action. The philosophy is simple: one person ('Ek') taking initiative can inspire a wider community ('Anēk').
This platform empowers citizens to take charge of their neighborhoods, report local issues, collaborate with neighbors, and earn rewards (Good Citizen Points - GCP) for driving real change.
The project is structured as a decoupled Client-Server architecture:
├── frontend/ # Client-side SPA built with Vite
└── backend/ # REST API & Socket.IO server built with Node/Express
- Frontend: HTML5, Vanilla JavaScript (ES modules), Tailwind CSS, Leaflet.js (dynamic mapping), Vite.
- Backend: Node.js, Express, MongoDB (Mongoose schemas & geospatial query layer), Socket.IO (real-time notification broadcasts), Cloudinary (secure media cloud uploads), JWT (cookie-based session rotation).
- Dynamic Local Impact Map:
- Uses HTML5 Geolocation to automatically request and focus on user coordinates.
- Renders dynamic pins on a Leaflet map from the backend database, styled dynamically based on category and resolution status.
- Interactive Location Picker:
- Let users report problems by dropping a draggable map marker or clicking coordinates on a map to report issue sites.
- Supports media evidence uploads (compressed images and videos) sent to Cloudinary.
- Public Landing Feed:
- Landing page showcases the latest reports fetched dynamically from the database.
- Features a "Show More" / "See All" gated authentication redirect flow.
- Civic Rewards Ledger:
- Standard user registration starting at
0 GCP. - Real-time ledger records GCP gains/spends (reporting: +10 GCP, claiming/resolving: +50 GCP, redeeming: -GCP).
- Renders dynamic ranks (Vanguard Rank I/II/Elder) based on points thresholds.
- Standard user registration starting at
- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Create a
.envfile in thebackend/folder based on.env.example:PORT=5000 NODE_ENV=development CLIENT_URL=http://localhost:5173 MONGO_URI=your_mongodb_connection_string JWT_ACCESS_SECRET=your_jwt_access_secret JWT_REFRESH_SECRET=your_jwt_refresh_secret CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret
- Start the API server in development mode:
npm run dev
- Navigate to the frontend directory:
cd ../frontend - Install dependencies:
pnpm install
- Start the Vite client dev server:
pnpm run dev
- Open the local address in your browser (usually
http://localhost:5173).
- XSS Protection: Secure HTML escaping on validation middleware schemas (
express-validator). - Session Guard: JWT tokens are signed securely. Refresh tokens rotate and expire on a 7-day TTL basis in MongoDB.
- Rate Limiting: Protects API endpoints against brute force attempts using custom rate limit windows.
- Error payload isolation: System error details are automatically hidden from client payloads in production mode.
Hope you liked it hehe