A prototype for marina operations with a hybrid architecture:
- Simulated vessel telemetry, alerts, and workflow UI with conceptual ledger terminology
- SQLite persistence and REST API for local state durability
- Live weather integration for Dana Point using OpenWeatherMap
- Authentication skeleton with a Marina Operator role
- Scenario engine unit tests to verify critical behavior
/api/vesselspersists vessel state in SQLite underdata/harborchain.db/api/weatherfetches live conditions from OpenWeatherMap for Dana Point/api/auth/meand/api/auth/loginprovide an auth skeleton for role-based UI flowssrc/hooks/useHarborSimulation.tsseparates business logic from presentationsrc/lib/scenarioEngine.tscontains the scenario engine and is covered by tests
- Vessel health, bilge alarms, and charter transactions are still demo data
- Chain and ledger concepts shown in the UI are conceptual simulation labels, not live on-chain integrations
- Compliance report generation remains a mock or Gemini fallback unless
GEMINI_API_KEYis configured - The UI is a prototype cockpit, not a production operator dashboard
Prerequisites: Node.js
- Install dependencies:
npm install - Copy
.env.exampleto.envand add your keys:OPENWEATHER_API_KEYGEMINI_API_KEY(optional)
- Run the app:
npm run dev - Run tests:
npm test
A GitHub Actions workflow is included at .github/workflows/ci.yml.
It runs on pushes and pull requests to main/master, and executes:
npm cinpm run lintnpm testnpm run build
- The app uses local SQLite persistence via
sql.jsfor portable state durability. - The auth flow is intentionally lightweight so the Marina Operator role can be extended later with Clerk or Auth0.
- Transparency is important: the app now clearly separates real API-backed features from the simulation layer.