How akashpg-m/polaris works
Polaris is a real-time IoT fleet orchestration platform. Fleet devices send telemetry through a WebSocket gateway; events are streamed for independent spatial processing, archival, and traffic analysis. Live fleet state and routing support matching and demand analysis, which feed autonomous rebalancing and commands back to devices. Operators use the React command center for fleet, mobility, registry, and operations workflows. Backend implementation links are chiefly based on the README architecture; unsampled implementation details are represented at their existing source paths, with those evidence limits noted.
Main entry points: main.go API Gateway · engine.go Spatial Engine · App.tsx React Command Center · DashboardContext.tsx Live Dashboard
Components 25
Device Ingestion
- API Gateway
v3.0/backend/cmd/gateway/main.go - Telemetry Handler
v3.0/backend/internal/adapter/handler/ingestion.go - Node Registry
- Event Publisher
v3.0/backend/internal/adapter/repository/kafka_event_publisher.go
Streaming And Spatial
- Telemetry Consumer
v3.0/backend/internal/application/stream/kafka_consumer.go - Spatial Engine
v3.0/backend/internal/application/spatial/engine.go - Mobility Module
v3.0/backend/internal/modules/mobility/module.go - Nearby Matching
v3.0/backend/internal/modules/mobility/matching/candidate_provider.go - Traffic Consumer
v3.0/backend/internal/modules/mobility/traffic_consumer.go
Fleet Orchestration
- Demand Prediction
v3.0/backend/internal/application/orchestrator/predictive_strategy.go - Fleet Rebalancer
v3.0/backend/internal/application/orchestrator/strategies.go - Command Delivery
v3.0/backend/internal/application/dispatch/dispatcher.go
Storage And Routing
- Telemetry Archiver
v3.0/backend/internal/application/stream/archiver.go - OSM Routing
v3.0/backend/internal/modules/mobility/routing/engine.go
Operator Console
- React Command Center
v3.0/frontend/src/App.tsx - Live Dashboard
v3.0/frontend/src/features/dashboard/DashboardContext.tsx - API Client
v3.0/frontend/src/lib/api/client.ts - Authentication
v3.0/frontend/src/features/auth/AuthContext.tsx - Query Cache
v3.0/frontend/src/lib/query/queryClient.tsx - Task Operations
v3.0/frontend/src/pages/Tasks.tsx
Other components
- Fleet Devices
- Kafka Stream
- PostgreSQL
- Redis Pub/Sub
- Fleet Operator
Connections 30
- Fleet Devices → API Gateway: sends telemetry
README.md - API Gateway → Telemetry Handler: routes telemetry
- Telemetry Handler → Node Registry: processes nodes
- Telemetry Handler → Event Publisher: publishes events
README.md - Event Publisher → Kafka Stream: writes events
README.md - Kafka Stream → Telemetry Consumer: streams telemetry
README.md - Kafka Stream → Telemetry Archiver: streams telemetry
README.md - Kafka Stream → Traffic Consumer: streams telemetry
README.md - Telemetry Consumer → Spatial Engine: updates state
- Spatial Engine → Mobility Module: maintains fleet state
- Spatial Engine → Nearby Matching: finds candidates
README.md - Traffic Consumer → OSM Routing: updates traffic
README.md - Telemetry Archiver → PostgreSQL: archives telemetry
README.md - Spatial Engine → OSM Routing: uses routing
README.md - PostgreSQL → Demand Prediction: supplies history
README.md - Demand Prediction → Fleet Rebalancer: predicts demand
README.md - Spatial Engine → Fleet Rebalancer: supplies live state
README.md - Fleet Rebalancer → Redis Pub/Sub: publishes commands
README.md - Redis Pub/Sub → API Gateway: delivers commands
README.md - API Gateway → Fleet Devices: sends directives
README.md - Fleet Operator → React Command Center: uses console
- React Command Center → Authentication: provides session
v3.0/frontend/src/App.tsx - React Command Center → Live Dashboard: provides live context
v3.0/frontend/src/App.tsx - Live Dashboard → API Client: fetches twin data
v3.0/frontend/src/features/dashboard/DashboardContext.tsx - Live Dashboard → Query Cache: updates cached data
v3.0/frontend/src/features/dashboard/DashboardContext.tsx - React Command Center → Task Operations: routes task views
v3.0/frontend/src/App.tsx - Task Operations → API Client: requests task data
- React Command Center → API Client: serves API workflows
- API Client → API Gateway: calls gateway APIs
README.md - API Gateway → Live Dashboard: streams live updates
README.md