Empowering Communities with Real-Time, Crowd-Driven Alerts for Dhaka
Dhaka Alert is a real-time, crowdsourced mapping platform for tracking ongoing events, hazards, and activities across Dhaka. Built for reliability, scalability, and community engagement, it enables users to report, verify, and discuss incidents as they happen.
- Live Mapping: Interactive Google Maps interface with real-time updates
- User Authentication: Secure JWT-based registration and login
- Crowdsourced Reports: Add, verify, and discuss incidents with location, type, description, and media
- Voting & Moderation: Upvote/downvote, verify/dispute, and moderate reports
- Commenting: Engage in discussions on each report
- Time Filters: View incidents by time period
- Mobile Responsive: Optimized for all devices
- Robust Database: Enhanced MySQL schema for scalability
- Node.js (v14+)
- MySQL (v8.0+)
- Google Maps API Key
- Clone the repository
git clone https://github.com/MathinUthso/CrowdsourcedReportMap cd Dhaka-Alert
- Install dependencies
cd backend npm install
- Configure settings
- Edit
backend/settings.js
andfrontend-web/settings.js
with your credentials and API keys.
- Edit
- Set up the database
npm run setup
- Start the server
npm start
- Access the app
- Frontend:
http://127.0.0.1:3000/
- Backend API:
http://127.0.0.1:3000/api
- Frontend:
- users: User accounts
- report_types: Categories of reports
- locations: Geographic regions
- reports: Main report data
- report_media: Media attachments
- report_votes: User votes
- report_comments: Comments
- audit_log: System audit
- api_requests: API usage
POST /auth/register
— RegisterPOST /auth/login
— LoginGET /auth/profile
— User profile
GET /reports
— List reportsPOST /reports
— Create reportGET /reports/:id
— Get reportPUT /reports/:id/status
— Update status
GET /reports/:id/comments
— List commentsPOST /reports/:id/comments
— Add commentPUT /comments/:id
— Update commentDELETE /comments/:id
— Delete comment
POST /reports/:id/vote
— VoteGET /reports/:id/votes
— Get votesDELETE /votes/:id
— Remove vote
GET /metadata
— All metadataGET /metadata/report-types
— Report typesGET /metadata/locations
— Locations
You can override settings with environment variables:
export DB_USER=your_username
export DB_PASSWORD=your_password
export JWT_SECRET=your_jwt_secret
export GOOGLE_MAPS_API_KEY=your_api_key
Dhaka-Alert/
├── backend/
│ ├── api/
│ ├── middleware/
│ ├── data_import_scripts/
│ ├── index.js
│ ├── settings.js
│ └── setup.js
├── frontend-web/
│ ├── index.html
│ ├── style.css
│ ├── settings.js
│ └── res/
└── README.md
- Start backend:
cd backend && npm start
- Serve frontend:
cd frontend-web && npx serve .
orpython -m http.server 8000
- Ensure
frontend-web/settings.js
points to your backend
- Set
NODE_ENV=production
- Update secrets and credentials
- Set up HTTPS and CORS
- Use production MySQL and backups
- Monitor logs and health
- Fork the repo
- Create a feature branch
- Make changes and add tests
- Submit a pull request
This project is licensed under the GNU GPLv3 License.
- Google Maps API
- MySQL
- Express.js
- The open-source community