Overview • Table of Contents • Key Features • Architecture • Diagrams • Stakeholders • Getting Started • Technology Stack • API Documentation • Roadmap • License
Uddhar is a comprehensive disaster management platform designed to streamline emergency response and volunteer coordination across Bangladesh. In a region highly vulnerable to natural calamities, Uddhar provides a centralized system that enhances coordination, facilitates effective resource allocation, and promotes rapid response during emergencies.
By leveraging technology, Uddhar connects volunteer organizations, coordinators, volunteers, and community members to ensure unified and efficient disaster response efforts, ultimately reducing the impact of disasters on affected communities.
- Overview
- Key Features
- Architecture
- Diagrams
- Stakeholders
- Getting Started
- Technology Stack
- API Documentation
- Testing
- Deployment
- Contributing
- Roadmap
- License
- Acknowledgements
- Contact
- Real-time Disaster Tracking - Monitor ongoing disasters with interactive maps and visualizations
- Coordinator Dashboard - Initialize, manage, and report on disaster events
- Organization Management - Approve organizations, assign teams, and track relief distribution
- Volunteer Coordination - Register volunteers based on skills and preferred locations
- Notification System - Send real-time alerts to stakeholders in affected areas
- Resource Allocation - Track and manage relief materials and funds distribution
- Reporting Tools - Generate comprehensive reports on disaster response activities
- User Role Management - Role-based access control for different stakeholders
- Interactive Maps - Visualization of affected areas with severity indicators
- Relief Distribution Tracking - Monitor distribution of resources to avoid duplication
- Mobile Responsiveness - Accessible from any device with internet connection
- Multilingual Support - Available in Bangla and English
- Offline Capability - Basic functionality available during connectivity issues
Uddhar follows a Clean Architecture / Hexagonal Architecture approach with elements of a Modular Monolith design. The system is organized into the following layers:
- Controllers: Handle incoming HTTP requests and delegate tasks
- Routes: Define API endpoints for different functionalities
- Socket Communication: Supports real-time features like emergency notifications
- DisasterService: Implements logic for creating, updating, and visualizing disasters
- TeamService: Manages team creation, assignments, and relief allocations
- NotificationService: Sends notifications via email or WebSocket
- ReportingService: Generates reports and analytics on disaster response
- Models: Represent core entities (Disaster, User, Team, ReliefItem)
- Validation: Ensures input data meets required constraints
- Domain Events: Handles business-specific events across the system
- Repositories: Manage data persistence and retrieval
- Third-Party Integrations: Connect to external systems for weather updates, etc.
- Authentication: Handles user authentication and authorization
Use Case Diagram
Figure 2: System use cases and actor interactions
Workflow Diagram
Figure 3: Disaster management workflow from initiation to completion
ER Diagram
Figure 4: Database entity relationship model
| Stakeholder | Description | Primary Needs |
|---|---|---|
| Coordinators | Oversee operations during emergencies | Initialize disaster events, assign teams, monitor operations |
| Organizations | Manage volunteers and relief activities | Team management, resource allocation, reporting |
| Volunteers | Contribute to disaster relief efforts | Real-time notifications, task assignments, location preferences |
| Members/Visitors | Access information about disasters | Disaster updates, relief distribution information, alerts |
- Node.js (v18.x or higher)
- NPM (v10.x or higher) or Yarn (v1.22.x or higher)
- PgAdmin4 (v9.x or higher)
- Redis (for caching and socket.io)
- Google Maps API key (for map integration)
-
Clone the repository:
git clone https://github.com/yourusername/uddhar.git
-
Navigate to the project directory:
cd uddhar -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env
-
Start the development server:
npm run dev
Server Configuration
PORT=3000
NODE_ENV=developmentDatabase Configuration (PostgreSQL with TypeORM)
DB_TYPE=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=your_password
DB_DATABASE=uddhar
DB_SYNCHRONIZE=true
DB_LOGGING=trueAuthentication
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=24hExternal Services
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
SENDGRID_API_KEY=your_sendgrid_api_keyRedis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379| Category | Technologies |
|---|---|
| Frontend | React, Redux, Tailwind CSS, Leaflet.js, Socket.io-client |
| Backend | Node.js, Express.js, Socket.io, JSON Web Tokens |
| Database | PostgreSQL |
| DevOps | GitHub Actions, Nginx |
| Testing | Jest, Cypress, Supertest |
| Documentation | Postman |
API Endpoints Overview
POST /api/auth/register- Register a new userPOST /api/auth/login- User loginGET /api/auth/me- Get current user
GET /api/disasters- List all disastersPOST /api/disasters- Create a new disaster (Coordinator only)GET /api/disasters/:id- Get disaster detailsPUT /api/disasters/:id- Update disaster (Coordinator only)
GET /api/organizations- List all organizationsPOST /api/organizations/apply- Apply to join disaster responseGET /api/organizations/:id/teams- Get teams for an organization
GET /api/volunteers- List all volunteersPOST /api/volunteers/:id/apply- Apply to join an organizationGET /api/volunteers/:id/notifications- Get volunteer notifications
Full API documentation is available at https://api.uddhar.org/docs and includes interactive examples.
Running Tests
Run all tests:
npm testRun unit tests:
npm run test:unitRun integration tests:
npm run test:integrationRun e2e tests:
npm run test:e2eGenerate coverage report:
npm run test:coverageDeployment Options
Build the Docker image:
docker build -t uddhar:latest .Run the container:
docker run -p 3000:3000 --env-file .env uddhar:latestBuild for production:
npm run buildStart production server:
npm startWe welcome contributions to Uddhar! Please see our CONTRIBUTING.md for details on how to get started.
Contribution Guidelines
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Project Roadmap
- Initial project setup and core functionality
- User authentication and role-based access
- Disaster management features
- Advanced analytics and reporting
- Mobile application development
- Integration with weather forecasting APIs
- Offline mode enhancements
- Multi-language support expansion
This project is licensed under the MIT License - see the LICENSE file for details.
- Bangladesh Red Crescent Society for domain expertise
- OpenStreetMap for map data
- All the volunteers who provided feedback during testing
| Title | Link |
|---|---|
| Website | 3-brain-cell-p2yc.vercel.app |
