How rynrindesu/portpilot works
PortPilot combines two independent operational services with a React console: one monitors arrivals and coordinates berth, pilot, and tug assignments; the other extracts vessel documents and manages compliance, risk, and inspection progression. The console presents both workflows and can use live APIs or deterministic demo data. The README documents the operating lifecycle and domain stages; source excerpts and the SOURCE INDEX confirm selected wiring, but several route and scheduling internals were not sampled, so uncertain links are omitted.
Main entry points: monitor_service.py Arrival monitoring · pages Operations screens · orchestrator.py Port-call workflow · App.tsx Console routes
Components 24
Operations console
- Console routes
frontend/src/App.tsx - Console data store
frontend/src/lib/store.tsx - Console API client
frontend/src/lib/api.ts - Operations screens
frontend/src/pages - Time and value formatting
frontend/src/lib/format.ts - Shared UI components
frontend/src/components/ui.tsx - Berth timeline
frontend/src/components/BerthTimeline.tsx
Arrival rescheduling
- OCEANS-X arrivals
rescheduling_agent/src/PortPilot/integration/oceans.py - Arrival monitoring
rescheduling_agent/src/PortPilot/monitoring/monitor_service.py - Operating-day scheduler
rescheduling_agent/src/PortPilot/monitoring/scheduler.py - Lifecycle recovery
rescheduling_agent/src/PortPilot/monitoring/lifecycle.py - Rescheduling agent
rescheduling_agent/src/PortPilot/agent/graph.py - Scheduling options and rules
rescheduling_agent/src/PortPilot/agent/schedule_option_generator.py - Operations database
rescheduling_agent/src/PortPilot/database/postgres.py
Port-call compliance
- Document extraction and validation
port_ops_agent/src/PortPilot/documents - Compliance and port-call routes
port_ops_agent/src/PortPilot/api/routes - Port-call workflow
port_ops_agent/src/PortPilot/workflow/orchestrator.py - Compliance checks
port_ops_agent/src/PortPilot/compliance/engine.py - Risk and inspection decisions
port_ops_agent/src/PortPilot/compliance - Port-call state
port_ops_agent/src/PortPilot/workflow/state.py - Port-ops agent
port_ops_agent/src/PortPilot/agent/agent.py
Service APIs
- Rescheduling API
rescheduling_agent/src/PortPilot/api/routes - Port-ops API
port_ops_agent/src/PortPilot/api/routes
Other components
- Port operator
Connections 25
- Port operator → Console routes: uses
README.md - Console routes → Operations screens: routes to
frontend/src/App.tsx - Console routes → Console data store: provides data
frontend/src/App.tsx - Console data store → Console API client: fetches
frontend/src/lib/store.tsx - Operations screens → Console data store: reads
frontend/src/pages/PortCallDetail.tsx - Operations screens → Shared UI components: renders
frontend/src/pages/PortCallDetail.tsx - Operations screens → Time and value formatting: formats with
frontend/src/pages/PortCallDetail.tsx - Operations screens → Berth timeline: renders
frontend/src/pages/Overview.tsx - Console API client → Rescheduling API: requests
- Console API client → Port-ops API: requests
- Rescheduling API → Arrival monitoring: routes monitoring
rescheduling_agent/src/PortPilot/api/routes/monitoring.py - Port-ops API → Port-call workflow: routes workflow
- Operating-day scheduler → Arrival monitoring: runs lifecycle polls
README.md - Operating-day scheduler → Lifecycle recovery: schedules stages
- Arrival monitoring → OCEANS-X arrivals: fetches arrivals
rescheduling_agent/src/PortPilot/monitoring/monitor_service.py - Arrival monitoring → Operations database: reads and writes
rescheduling_agent/src/PortPilot/monitoring/monitor_service.py - Arrival monitoring → Rescheduling agent: requests rescheduling
README.md - Arrival monitoring → Scheduling options and rules: generates options
README.md - Port-call workflow → Compliance checks: runs checks
port_ops_agent/src/PortPilot/workflow/orchestrator.py - Port-call workflow → Risk and inspection decisions: evaluates decisions
port_ops_agent/src/PortPilot/workflow/orchestrator.py - Port-call workflow → Port-call state: updates state
port_ops_agent/src/PortPilot/workflow/orchestrator.py - Port-ops agent → Port-call workflow: invokes workflow
- Compliance and port-call routes → Compliance checks: runs checks
port_ops_agent/src/PortPilot/api/routes/compliance_demo.py - Compliance and port-call routes → Document extraction and validation: accepts documents
- Document extraction and validation → Compliance checks: supplies extracted data