π View the Detailed Platform Website
OceanOS is an integrated marine conservation platform that simulates, monitors, and manages ocean cleanup operations in real time. It combines a Node.js backend, an interactive admin dashboard, a fisherman incentive app, and multiple standalone 3D simulations β all communicating via WebSockets and a REST API.
Built with a local-first approach using sql.js for zero-dependency database storage, OceanOS is designed to run entirely on your machine with no cloud infrastructure required (except for the Gemini AI feature).
OceanOS/
β
βββ backend/ # Express.js REST API + WebSocket server
β βββ server.js # Main server (API routes, DB, WebSocket, Gemini)
β βββ package.json
β βββ .env # Your API key goes here (not committed)
β βββ .env.example # Template for .env
β
βββ dashboard/ # Admin monitoring dashboard (HTML/CSS/JS)
β βββ index.html
β βββ app.js # Dashboard logic, charts, WebSocket client
β βββ style.css
β
βββ fisherman-app/ # Fisherman incentive & reporting app (HTML/CSS/JS)
β βββ index.html
β βββ app.js
β βββ style.css
β
βββ simulation/ # MAIN Unified 3D world simulation (Three.js)
β βββ index.html # Connected to backend, dashboard & fisherman app
β βββ world.js # Full world engine
β
βββ ocean-drone-sim/ # Standalone: Drone patrol simulation
β βββ index.html
β βββ main.js
β βββ style.css
β
βββ ocean-pollution-sim/ # Standalone: Ocean pollution simulation
β βββ index.html
β βββ main.js
β βββ style.css
β
βββ river simulator/ # Standalone: River plastic collection sim (Vite/TS)
β βββ index.html
β βββ main.js
β βββ src/
β βββ package.json
β
βββ ocean clean/ # Standalone: Ocean boom cleanup sim (Vite/TS)
β βββ index.html
β βββ main.js
β βββ src/
β βββ package.json
β
βββ flowchart.html # Interactive system architecture flowchart
βββ start-all.ps1 # One-click startup script (Windows PowerShell)
βββ LICENSE
βββ CONTRIBUTING.md
βββ README.md
| Feature | Description |
|---|---|
| Unified 3D Simulation | Three.js world with ocean cleanup boom, drone patrols, river nets & oil spills |
| Admin Dashboard | Real-time charts (Chart.js), stat cards, live WebSocket feed |
| Fisherman App | Credit system for fishermen who return nets & report debris |
| Gemini AI | Image-based marine debris detection + conversational AI assistant |
| Illegal Fishing Tracker | Real-time vessel monitoring with MPA zone violation detection |
| Pollution Monitor | Oil spill detection, chemical composition analysis, buoy alerts |
| Live Notifications | WebSocket-driven alerts across all connected clients |
| Local Database | sql.js SQLite β no external DB required |
| WebSocket Feed | Live data broadcast every 5 seconds across all modules |
- Node.js v18 or higher
- A modern browser (Chrome, Firefox, Edge)
- A Gemini API key from Google AI Studio (free)
git clone (https://github.com/ishaaqdev/OceanOS.git)
cd cd backend
npm installCopy the environment template and add your Gemini API key:
# Windows
copy .env.example .env
# macOS / Linux
cp .env.example .envOpen .env and replace the placeholder:
GEMINI_API_KEY=your_gemini_api_key_hereFrom the project root, run the PowerShell startup script:
.\start-all.ps1This will launch 4 services simultaneously:
| Service | URL | Port |
|---|---|---|
| Backend API | http://localhost:3001 | 3001 |
| Dashboard | http://localhost:3002 | 3002 |
| Fisherman App | http://localhost:3003 | 3003 |
| 3D Simulation | http://localhost:3004 | 3004 |
The script will automatically open the dashboard in your browser.
Open 4 separate terminal windows and run each of the following:
Terminal 1 β Backend:
cd backend
node server.jsTerminal 2 β Dashboard:
cd dashboard
npx serve -l 3002Terminal 3 β Fisherman App:
cd fisherman-app
npx serve -l 3003Terminal 4 β Main Simulation:
cd simulation
npx serve -l 3004The standalone simulations are independent β they do not require the backend or other services to run. Open them directly in your browser or use a simple file server.
Just double-click the index.html file inside each folder.
# Drone Patrol Simulation
cd ocean-drone-sim
npx serve .
# Ocean Pollution Simulation
cd ocean-pollution-sim
npx serve .
# River Collector Simulation (Node.js required)
cd "river simulator"
npm install
npm run dev
# Ocean Cleanup Boom Simulation (Node.js required)
cd "ocean clean"
npm install
npm run dev| Simulation | Backend Required | Description |
|---|---|---|
ocean-drone-sim |
No | Standalone drone patrol over ocean with detection events |
ocean-pollution-sim |
No | Standalone oil spill & chemical pollution visualizer |
river simulator |
No | Standalone river plastic collection net simulator |
ocean clean |
No | Standalone ocean boom cleanup system |
simulation |
Yes | Full unified world β posts data to backend, links to dashboard & fisherman app |
The backend exposes a REST API at http://localhost:3001.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/stats/overview |
Platform-wide stats summary |
| GET/POST | /api/plastic |
Plastic collection records |
| GET/POST | /api/detections |
Drone detection events |
| GET/POST | /api/pollution |
Pollution events |
| GET/POST | /api/river |
River net collection data |
| GET | /api/fishing-zones |
Fishing zone map data |
| GET | /api/fisherman/credits |
Fisherman credit leaderboard |
| POST | /api/fisherman/return-net |
Log a net return & award credits |
| GET/POST | /api/illegal-boats |
Illegal vessel records |
| GET | /api/notifications |
Notification feed |
| PUT | /api/notifications/:id/read |
Mark notification as read |
| POST | /api/gemini/analyze |
AI debris image analysis |
| POST | /api/gemini/chat |
AI chat assistant |
WebSocket: Connect to ws://localhost:3001 for live event streaming.
| Layer | Technology |
|---|---|
| Backend | Node.js, Express.js, WebSocket (ws) |
| Database | sql.js (SQLite in-memory, file-persisted) |
| AI | Google Gemini 2.5 Flash |
| 3D Graphics | Three.js (WebGL) |
| Charts | Chart.js |
| Simulations | Vanilla Canvas 2D + Three.js |
| Standalone Sims | Vite + TypeScript |
| Frontend | Vanilla HTML / CSS / JavaScript |
| File Uploads | Multer |
Open flowchart.html in your browser to see an interactive visual diagram of the full system architecture β data flows, API connections, WebSocket events, and module relationships.
- API keys are stored in
backend/.envand are never committed to the repository. .env.exampleis provided as a safe template.- The database file (
oceanos.db) is also excluded from version control.
Contributions are welcome! Please read CONTRIBUTING.md before submitting a pull request.
This project is licensed under the MIT License β see the LICENSE file for details.
Made by Team Numero Uno
Building technology for a cleaner ocean.