Skip to content

CtrlAltDuo/CodeBlue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeBlue

Real-time ambulance dispatch and emergency response optimization platform with live tracking, ETA prediction, hospital fleet management, and intelligent nearest-unit assignment.

Tech Stack

  • Client: React, Vite, TypeScript, TailwindCSS, Mappls Web Maps, Recharts, Socket.io-client
  • Server: Node.js, Express, TypeScript, PostgreSQL, Socket.io
  • Monorepo: npm workspaces, concurrently

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/CtrlAltDuo/CodeBlue.git
    cd CodeBlue
  2. Install dependencies:

    npm install
  3. Database Setup: Ensure you have a PostgreSQL instance running. Execute the schema script located at server/src/db/schema.sql to initialize your database tables.

  4. Environment variables: Create .env files in both client and server folders using the examples provided.

    client/.env:

    VITE_MAPPLS_API_KEY=your_mappls_key_here
    VITE_API_URL=http://localhost:5000

    server/.env:

    DATABASE_URL=postgres://user:password@localhost:5432/codeblue
    JWT_SECRET=your_jwt_secret
    MAPPLS_API_KEY=your_mappls_key_here
    PORT=5000
    CLIENT_URL=http://localhost:5173
  5. Run development servers:

    npm run dev

User Roles & Navigation

  • Citizen: Accessible at /citizen. Request emergency services, track ambulance ETA, and view live location via Mappls SDK. No login required.
  • Admin: Accessible at /admin-map (Dispatch map with hotspot toggle) and /analytics (Performance charts, 30-day volume, utilization metrics).
  • Hospital Staff: Accessible at /hospital. Manage hospital ambulances and view dispatch status.
  • Driver: Accessible at /driver. Interface for accepting calls and navigating.

API Health Check

You can verify the backend is running and connected to the database by visiting: GET http://localhost:5000/health

About

real-time ambulance dispatch and emergency response optimization platform with live tracking, ETA prediction, hospital fleet management, and intelligent nearest-unit assignment, built for a hackathon :)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages