Author & Lead Architect: Maxwell Mathew
Repository: https://github.com/Maxwell343/CodeRedAI.git
A production-grade emergency medical mobility and autonomous dispatch management system featuring real-time triage, driver routing, WhatsApp bot integration, and specialized portals for Hospitals, Drivers, and Administrators.
Before starting, ensure you have the following installed on your system:
- Node.js (v18 or higher)
- Python (v3.10 or higher)
- Git
Since the project uses a shared MongoDB Atlas cluster, your IP address must be allowlisted before you can run the backend successfully.
- Ask the project owner (Maxwell) for the shared MongoDB Atlas credentials OR to be invited to the MongoDB Atlas project.
- In the Atlas dashboard, navigate to Security -> Network Access on the left sidebar.
- Click "+ ADD IP ADDRESS".
- Click "ADD CURRENT IP ADDRESS", then click Confirm.
Warning
If your IP is not in this list, the backend will fail to start and give a 503 Service Unavailable error due to timeouts!
- Go to Database on the left sidebar.
- Click Connect on the cluster.
- Choose Drivers (Python).
- Copy the connection string. It will look like this:
mongodb+srv://<username>:<password>@cluster0.abcde.mongodb.net/?retryWrites=true&w=majority
git clone https://github.com/Maxwell343/CodeRedAI.git
cd CodeRedAIWe use FastAPI and Python. Open a terminal in the project root:
# Navigate to backend directory
cd backend
# Create a virtual environment (Windows)
python -m venv .venv
# Activate it (Windows)
.\.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Copy the environment template
cp .env.example .envConfigure Backend backend/.env:
Open .env and fill in your details:
MONGO_URL: Paste the Atlas DB string from the steps above (replace<username>and<password>).JWT_SECRET: Any random string (e.g.mysecrettoken123).
Start Backend Server:
uvicorn main:app --reloadThe backend should now say Application startup complete. and run on http://localhost:8000.
We use React with Vite. Open a new, separate terminal:
# Navigate to the frontend directory
cd frontend
# Install Node dependencies
npm install
# Copy the environment template
cp .env.example .envConfigure Frontend frontend/.env:
The frontend .env just needs to point to your local backend. Ensure it has:
VITE_API_BASE_URL=http://localhost:8000
Start Frontend Server:
npm run dev- Open http://localhost:5173 in your browser.
- Go to the Hospital module.
- Create a new account — if it instantly navigates to the dashboard, your entire stack (Frontend ↔ Backend ↔ MongoDB Atlas) is connected perfectly!
To speed up testing, the application has quick-fill demo accounts pre-seeded in the database:
-
Hospitals (Default Password:
Password@123):apollo.er@codered.ai(Apollo Emergency Center)lilavati.er@codered.ai(Lilavati Hospital ER)fortis.er@codered.ai(Fortis Hospital ER)kokilaben.er@codered.ai(Kokilaben Hospital ER)nanavati.er@codered.ai(Nanavati Max ER)rubyhall.er@codered.ai(Ruby Hall Clinic ER)
-
Drivers (Default Password:
Password@123):driver.rajesh@codered.ai(Rajesh Kumar - AMB-101)driver.vikram@codered.ai(Vikram Singh - AMB-102)driver.amit@codered.ai(Amit Sharma - AMB-103)driver.suresh@codered.ai(Suresh Patil - AMB-104)driver.priya@codered.ai(Priya Deshmukh - AMB-105)driver.rohit@codered.ai(Rohit Verma - AMB-106)
-
Admins (Default Password:
Admin@123):admin.ops@codered.ai(Aarav Mehta - Chief Ops)admin.verify@codered.ai(Siya Iyer - Verification Lead)admin.reviews@codered.ai(Kabir Khan - Quality Admin)admin.compliance@codered.ai(Neha Desai - Compliance Admin)