How surajj7/voc-chidambaram-port works
This is a port container operations command center: stakeholder and simulated sensor events advance containers from inbound manifest through inspection, clearance and escrow release to departure. The backend serves the dashboard and APIs, maintains shipment state and a hash-chained ledger, and exposes dwell predictions and delay advice. Documented capabilities also include a GIS radar and Solidity escrow contract. Source excerpts establish the HTTP/backend, lifecycle, ledger and prediction connections; links to unsampled UI or contract behavior are shown only when documented.
Main entry points: app.py HTTP API · core.py Event lifecycle · dashboard.html Command dashboard · train_model.py Model training
Components 17
Port Operations
- Lifecycle simulator
iot_simulator/simulate.py - HTTP API
backend/app.py - Event lifecycle
backend/core.py - Operational stages
backend/core.py - GIS radar
backend/static/dashboard.html - Shipment state
runtime/state.json
Delay Intelligence
- Dwell prediction
backend/core.py - Delay mitigation
backend/core.py - Random forest model
ml/model/delay_model.joblib - Model training
ml/train_model.py - Dwell dataset
data/voc_port_dwell_dataset.csv
Ledger and Escrow
- Hash-chain ledger
backend/core.py - Ledger state
runtime/ledger.json - Escrow contract
contracts/ContainerTracker.sol
User Interfaces
- Command dashboard
backend/static/dashboard.html
Other components
- Port stakeholders
- Port dashboard users
Connections 21
- Port stakeholders → Lifecycle simulator: supplies events
iot_simulator/simulate.py - Lifecycle simulator → HTTP API: posts lifecycle events
iot_simulator/simulate.py - Port dashboard users → HTTP API: requests operations
- HTTP API → Command dashboard: serves dashboard
backend/app.py - Command dashboard → HTTP API: uses API
- HTTP API → Event lifecycle: processes events
backend/app.py - HTTP API → Dwell prediction: requests predictions
backend/app.py - HTTP API → Delay mitigation: enriches advice
backend/app.py - HTTP API → Operational stages: groups shipments
backend/app.py - Event lifecycle → Operational stages: sets stage
backend/core.py - Event lifecycle → Dwell prediction: forecasts inbound
backend/core.py - Dwell prediction → Random forest model: predicts dwell
backend/core.py - Dwell prediction → Delay mitigation: assesses delay
backend/core.py - Model training → Dwell dataset: trains from
ml/train_model.py - Model training → Random forest model: saves pipeline
ml/train_model.py - Event lifecycle → Hash-chain ledger: appends events
backend/core.py - HTTP API → Hash-chain ledger: verifies chain
backend/app.py - Hash-chain ledger → Ledger state: persists chain
- HTTP API → Shipment state: loads and saves state
- Event lifecycle → Escrow contract: mirrors escrow rules
README.md - Command dashboard → GIS radar: displays harbor map
README.md