Skip to content

About

Repository for team 3 Brain Cell

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

UDDHAR - Disaster Management Platform

Uddhar Logo

Contributors

Overview • Table of Contents • Key Features • Architecture • Diagrams • Stakeholders • Getting Started • Technology Stack • API Documentation • Roadmap • License

📋 Overview

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.

📑 Table of Contents

🎯 Key Features

  • 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

🏗️ Architecture

Uddhar follows a Clean Architecture / Hexagonal Architecture approach with elements of a Modular Monolith design. The system is organized into the following layers:

Presentation Layer

  • Controllers: Handle incoming HTTP requests and delegate tasks
  • Routes: Define API endpoints for different functionalities
  • Socket Communication: Supports real-time features like emergency notifications

Application Layer

  • 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

Domain Layer

  • Models: Represent core entities (Disaster, User, Team, ReliefItem)
  • Validation: Ensures input data meets required constraints
  • Domain Events: Handles business-specific events across the system

Infrastructure Layer

  • Repositories: Manage data persistence and retrieval
  • Third-Party Integrations: Connect to external systems for weather updates, etc.
  • Authentication: Handles user authentication and authorization

📊 Diagrams

Use Case Diagram

Use Case Diagram
Figure 2: System use cases and actor interactions

Workflow Diagram

Workflow Diagram
Figure 3: Disaster management workflow from initiation to completion

ER Diagram

ER Diagram
Figure 4: Database entity relationship model

👥 Stakeholders

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

🚀 Getting Started

Prerequisites

  • 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)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/uddhar.git
  2. Navigate to the project directory:

    cd uddhar
  3. Install dependencies:

    npm install
  4. Set up environment variables:

    cp .env.example .env
  5. Start the development server:

    npm run dev

Configuration

Server Configuration

PORT=3000
NODE_ENV=development

Database 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=true

Authentication

JWT_SECRET=your_jwt_secret_key
JWT_EXPIRES_IN=24h

External Services

GOOGLE_MAPS_API_KEY=your_google_maps_api_key
SENDGRID_API_KEY=your_sendgrid_api_key

Redis Configuration

REDIS_HOST=localhost
REDIS_PORT=6379

🛠️ Technology Stack

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 Documentation

API Endpoints Overview

Authentication

  • POST /api/auth/register - Register a new user
  • POST /api/auth/login - User login
  • GET /api/auth/me - Get current user

Disasters

  • GET /api/disasters - List all disasters
  • POST /api/disasters - Create a new disaster (Coordinator only)
  • GET /api/disasters/:id - Get disaster details
  • PUT /api/disasters/:id - Update disaster (Coordinator only)

Organizations

  • GET /api/organizations - List all organizations
  • POST /api/organizations/apply - Apply to join disaster response
  • GET /api/organizations/:id/teams - Get teams for an organization

Volunteers

  • GET /api/volunteers - List all volunteers
  • POST /api/volunteers/:id/apply - Apply to join an organization
  • GET /api/volunteers/:id/notifications - Get volunteer notifications

Full API documentation is available at https://api.uddhar.org/docs and includes interactive examples.

🧪 Testing

Running Tests

Run all tests:

npm test

Run unit tests:

npm run test:unit

Run integration tests:

npm run test:integration

Run e2e tests:

npm run test:e2e

Generate coverage report:

npm run test:coverage

📊 Deployment

Deployment Options

Docker Deployment

Build the Docker image:

docker build -t uddhar:latest .

Run the container:

docker run -p 3000:3000 --env-file .env uddhar:latest

Manual Deployment

Build for production:

npm run build

Start production server:

npm start

🤝 Contributing

We welcome contributions to Uddhar! Please see our CONTRIBUTING.md for details on how to get started.

Contribution Guidelines

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🔮 Roadmap

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

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgements

Title Link
Website 3-brain-cell-p2yc.vercel.app

About

Repository for team 3 Brain Cell

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages