This repository contains the full-stack MediGo application, including the Admin Dashboard (React), the Backend API (NestJS), and the Driver Application (Flutter).
/admin-dash: React + Vite frontend for hospital administrators./server: NestJS backend API with Firebase Admin SDK integration./driver_application: Flutter mobile application for ambulance drivers.
To run this project locally, follow these steps:
- Node.js (v18 or higher)
- Firebase Project (Realtime Database + Authentication)
- Docker (optional, for containerized dev)
- Navigate to the server directory:
cd server - Install dependencies:
npm install
- Configure environment variables:
- Create a
.envfile in theserver/root. - Add your
FIREBASE_DATABASE_URL. - Place your
serviceAccountKey.jsonin theserver/root.
- Create a
- Start the server:
The API will be available at http://localhost:3001/api
npm run start:dev
- Navigate to the admin-dash directory:
cd admin-dash - Install dependencies:
npm install
- Configure environment variables:
- Create a
.envfile with your Firebase Web Config and Google Maps API Key.
- Create a
- Start the development server:
The dashboard will be available at http://localhost:5173
npm run dev
This starts both the NestJS API and the Vite dev server via Docker Compose.
docker compose up --build- Admin Dashboard: http://localhost:5173
- API: http://localhost:3001/api
- Server expects at least
FIREBASE_DATABASE_URL(and optionallyFIREBASE_SERVICE_ACCOUNT_JSON/FIREBASE_SERVICE_ACCOUNT_PATH). - Admin Dash expects your Vite env vars (for Firebase web config / Google Maps key, etc.).
With the current compose setup, the easiest approach is to create:
server/.envadmin-dash/.env
Never commit .env files or serviceAccountKey.json to version control. These files are listed in .gitignore for your protection.