A comprehensive maritime operations platform demonstrating offline-first architecture, real-time WebSocket communication, and edge computing capabilities for fleet management. Built as a modern monorepo showcasing distributed systems, data synchronization, and maritime-specific UI/UX patterns.
Fleet Command Center - Real-time vessel monitoring and fleet overview
Vessel Bridge System - Engine monitoring with animated gauges
Sync Verification - Data integrity and compression metrics
This project emerged from a product management exercise exploring edge computing benefits in maritime operations. Following the scientific method approach where every feature is an experiment, this platform demonstrates how offline-first architecture can revolutionize distributed systems.
As a Product Manager, I identified several key problems in maritime operations:
- Connectivity Challenges: Vessels operate in remote areas with unreliable internet
- Data Costs: Satellite bandwidth is expensive ($50-100/MB)
- Operational Continuity: Systems must function without cloud connectivity
- Real-time Coordination: Fleet visibility is critical for operations
EdgeFleet serves as a proof-of-concept showing how edge computing can address these challenges while reducing operational costs and improving reliability.
This project was built using a structured approach:
- Phase 1 Technical Specification - Detailed requirements for offline-first implementation
- Product Requirements Document (PRD) - Scientific experiment-based feature development
- Iterative Development - Built with Claude Code following test-driven development principles
Our PRD follows the principle that product documentation should evolve with learnings. Unlike traditional waterfall specifications, this PRD:
- Updates with Results: Each experiment section includes actual metrics alongside targets
- Documents Failures: Failed hypotheses are as valuable as successful ones
- Guides Future Work: Phase 2 experiments are based on Phase 1 learnings
- Maintains History: Version control tracks how our understanding evolved
This approach ensures that the PRD remains a valuable reference throughout the product lifecycle, not just a planning artifact.
EdgeFleet simulates a real-world maritime operations environment where vessels operate in remote areas with intermittent connectivity. It demonstrates:
- Edge Computing: Vessels continue operating independently when offline
- Offline-First Architecture: Data persistence and queue management using IndexedDB
- Real-time Communication: WebSocket-based fleet coordination
- Maritime Operations: Authentic vessel monitoring with engine systems, navigation, and fleet tracking
Perfect for testing edge computing scenarios, distributed systems patterns, and maritime industry workflows.
Fleet Command Center (Port 3000)
βββ Real-time vessel monitoring
βββ Fleet tracking map with live positions
βββ Sync verification dashboard
βββ Offline vessel detection with last-seen timestamps
Vessel Applications (Ports 3001-3003)
βββ Individual bridge control systems
βββ Engine monitoring with animated gauges
βββ Offline data persistence (IndexedDB)
βββ Automatic sync queue management
βββ Maritime-themed dashboard UI
WebSocket Server (Port 3999)
βββ Real-time vessel-to-fleet communication
βββ Connection status broadcasting
βββ Offline notification handling
βββ Message routing and relay
Shared Packages
βββ Dexie.js database with sync queue
βββ Offline manager with localStorage persistence
βββ Maritime simulation engine
βββ Supabase client for cloud sync
- React 18 with TypeScript for type-safe UI development
- Vite for fast development and optimized builds
- Tailwind CSS with maritime-themed design system
- Lucide React for consistent iconography
- Dexie.js for IndexedDB management and offline data persistence
- Supabase for cloud database and real-time features
- LocalStorage for offline mode preferences
- JSON for WebSocket message protocols
- WebSocket (ws) for real-time bidirectional communication
- Turborepo for efficient monorepo management
- TypeScript throughout for type safety and developer experience
- Node.js for WebSocket server and tooling
- Offline-first data architecture with automatic sync queues
- Data compression with bandwidth usage calculations
- Connection status management with manual offline toggle
- Persistent offline mode that survives page refreshes
- Node.js (v18 or higher)
- npm (comes with Node.js)
- Git for cloning the repository
git clone https://github.com/ebarronh/edge-fleet.git
cd edge-fleet
npm install./start-demo.shThis launches all services simultaneously:
- Fleet Command Center: http://localhost:3000
- MV Pacific Explorer: http://localhost:3001 (cargo vessel)
- SS Northern Star: http://localhost:3002 (tanker vessel)
- MV Coastal Pioneer: http://localhost:3003 (container vessel)
- WebSocket Server: ws://localhost:3999
- Open any vessel app (ports 3001-3003)
- Click "Go Offline" to simulate connectivity loss
- Observe data continuing to be collected and stored locally
- Check Fleet Command to see vessel marked as offline with timestamp
- Click "Go Online" to restore connectivity and sync data
- Put a vessel offline
- Refresh the browser page
- Vessel remains in offline mode (persistent across sessions)
- Data collection continues seamlessly
- Open Fleet Command Center (port 3000)
- View real-time vessel positions on the tracking map
- Monitor vessel status with live engine metrics
- Use "Verify Sync" to inspect local vs cloud data integrity
- Persistent Storage: All vessel data stored in IndexedDB using Dexie.js
- Sync Queue Management: Changes queued automatically when offline
- Data Compression: Bandwidth savings calculated and displayed
- Conflict Resolution: Automatic sync when connectivity restored
- WebSocket Heartbeats: Connection monitoring and automatic reconnection
- Message Broadcasting: Fleet-wide status updates and position sharing
- Graceful Degradation: Seamless transition between online/offline modes
- Status Propagation: Immediate notification of vessel connectivity changes
- Engine System Monitoring: RPM, fuel rate, temperature, oil pressure
- Navigation Display: Speed, heading with animated compass
- Fleet Tracking: Multi-vessel position visualization
- Critical Threshold Alerts: Animated warnings for abnormal readings
- True offline-first architecture with IndexedDB persistence
- Animated engine gauges with critical threshold detection
- Real-time vessel position tracking on fleet map
- Sync verification dashboard with compression metrics
- WebSocket communication with automatic reconnection
- Maritime-themed UI with authentic vessel bridge aesthetics
- Data compression with bandwidth and cost savings calculations
- Offline status persistence across browser sessions
- Multi-vessel simulation with different vessel types
- Connection status indicators with last-seen timestamps
- Real-time position updates every 5 seconds when online
- Sensor data collection every 2 seconds (engine metrics)
- Automatic sync when returning online from offline mode
- Sync queue visualization showing pending data items
- Bandwidth usage tracking with data compression metrics
- Network outage simulation with manual offline toggle
- Data integrity verification between local and cloud storage
- Queue management with automatic retry mechanisms
- Connection monitoring with graceful degradation
# Build all packages
npm run build
# Start WebSocket server only
cd apps/websocket-server && npm start
# Start Fleet Command only
cd apps/fleet-command && npm run dev
# Start individual vessels
cd apps/vessel-app && npm run dev # Port 3001
cd apps/vessel-app && npm run dev:3002 # Port 3002
cd apps/vessel-app && npm run dev:3003 # Port 3003edge-fleet/
βββ apps/
β βββ fleet-command/ # Fleet Command Center (React + Vite)
β β βββ src/
β β β βββ App.tsx # Main fleet dashboard
β β β βββ components/ # Sync verification, vessel cards
β β βββ package.json
β βββ vessel-app/ # Vessel Bridge System (React + Vite)
β β βββ src/
β β β βββ App.tsx # Vessel dashboard with engine monitoring
β β β βββ components/ # Animated gauges, navigation displays
β β βββ package.json
β βββ websocket-server/ # Communication Hub (Node.js + ws)
β βββ src/
β β βββ server.ts # WebSocket server with message routing
β βββ package.json
βββ packages/
β βββ shared/ # Shared Libraries
β βββ src/
β β βββ db.ts # Dexie.js database with sync queue
β β βββ offline.ts # Offline manager with localStorage
β β βββ simulation.ts # Vessel movement simulation
β β βββ types.ts # TypeScript interfaces
β βββ package.json
βββ specs/ # Documentation
β βββ phase-1.md # Phase 1 requirements specification
β βββ initial-setup.md # Setup instructions
βββ start-demo.sh # Complete demo launcher
βββ demo-phase-1.md # Demo guide for product managers
βββ CLAUDE.md # Development guidelines
# Run all builds (required before demo)
npm run build
# Run linting
npm run lint
# Run type checking
npm run type-check
# Run tests
npm run test- Fleet Coordination: Multiple vessels operating with real-time position sharing
- Emergency Scenarios: Vessel goes offline, fleet command tracks last known position
- Data Synchronization: Large amounts of sensor data syncing efficiently when online
- Bandwidth Optimization: Data compression reducing transmission costs
- Offline Resilience: Applications continue functioning without internet
- Data Persistence: Critical information never lost during connectivity issues
- Automatic Recovery: Seamless sync when connectivity restored
- Resource Efficiency: Minimal bandwidth usage through compression
- Message Broadcasting: WebSocket communication patterns
- State Management: Distributed state across multiple applications
- Conflict Resolution: Handling data conflicts during sync
- Connection Monitoring: Heartbeat and reconnection strategies
EdgeFleet can optionally integrate with Supabase for cloud storage and real-time features:
- Create a Supabase project at https://supabase.com
- Set up tables using the SQL schema in
specs/initial-setup.md - Configure environment variables in
.envfiles - Enable real-time subscriptions for live fleet coordination
Note: The demo works fully offline without any cloud configuration required.
- Port conflicts: Ensure ports 3000-3003 and 3999 are available
- WebSocket connection: Check that the WebSocket server (port 3999) is running
- Build errors: Run
npm run buildbefore starting development servers - Browser storage: Clear IndexedDB if experiencing data sync issues
# Clear all local data and restart
./start-demo.sh --clean- Mesh networking between vessels
- Distributed consensus for fleet coordination
- Edge AI for predictive maintenance
- Satellite communication simulation
- Multi-fleet management
- Advanced analytics and reporting
- Integration APIs for third-party systems
- Enhanced security and authentication
EdgeFleet - Demonstrating the future of maritime edge computing with modern web technologies.