This workspace implements a complete end-to-end fleet command system with:
- Express.js backend running a 1 Hz ship simulator
- React + Vite dashboard with real-time map sync
- Socket.IO for persistent realtime state updates
- PostgreSQL database for ship state, restricted zones, alerts, directives, and playback history
- Local Docker Compose stack for easy startup
The database is configured with the credentials below and is exposed through a local Postgres container.
- Database name:
warr_gaye - User:
postgres - Password:
NuxHH2OmMIcDlS5r
From the repository root:
docker compose up --buildThis starts three services:
dbon port5432backendon port4000frontendon port5173
Open the frontend at http://localhost:5173.
The project uses a root .env file for local development. Example values are available in .env.example.
This implementation currently runs against a PostgreSQL data layer. The backend expects a valid DATABASE_URL in the root .env file.
If you want to use hosted Supabase instead of the local Postgres container, you must provide these values:
SUPABASE_URLSUPABASE_SERVICE_ROLE_KEYSUPABASE_ANON_KEYDATABASE_URL(Supabase PostgreSQL connection string) or update the backend to use Supabase client access.
In Docker mode, the frontend is also loaded with root .env variables, so VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY are available in the React app if you add them to .env.
Important: if your
.envonly containsVITE_SUPABASE_URLandVITE_SUPABASE_PUBLISHABLE_KEY, the backend will fail because it still needs a database connection string.
docker compose up --buildcd server
npm install
npm startcd client
npm install
npm run dev -- --host- Live ship tracking for 15 ships with position, heading, fuel, cargo, destination, and status
- Realtime shared state using Socket.IO
- Command role with restricted zone creation and directive issuance
- Captain role with accept / escalate distress workflow
- Automated route planning that avoids restricted zones and uses weather impact in fuel
- Adverse weather penalties and alerts
- Proximity warnings when ships come within 2 km
- Playback snapshots every 30 seconds and event timeline support