bf-bnl-settings¶
What this service is¶
bf-bnl-settings is the legacy Plan orchestration backend. It exposes resource and simulation APIs and coordinates downstream compute and digital twin interactions.
Code anatomy¶
src/main.py: FastAPI factory and routing.src/resources/*: resource domains (vehicle, charger, location, energy).src/settings_v2/*: v2 API domain modules and evolving endpoint contracts.src/scheduleAnalysisScenario/*andsrc/scheduleAnalysisSettings/*: simulation scenario/config orchestration.src/report/*: reporting outputs.
Architectural characteristics¶
- Legacy orchestrator pattern with multiple downstream API dependencies.
- Transitional architecture where
settings_v2and scenario modules coexist.
Documentation and tests in-repo¶
- README is generic/stale; tests provide stronger architecture signal.
- Test suites include scenario, settings_v2 domain, resources, report, and location coverage.
Internal request lifecycle¶
sequenceDiagram
participant UI
participant Router as settings router
participant Scenario as scenario orchestrator
participant Compute as compute service
participant Twin as digital twin service
UI->>Router: simulation request
Router->>Scenario: build scenario inputs
Scenario->>Compute: run compute stages
Compute-->>Scenario: compute outputs
Scenario->>Twin: run depot emulation when needed
Twin-->>Scenario: emulation outputs
Scenario-->>Router: merged response
Router-->>UI: http response
Cloud dependency map¶
flowchart LR
Settings[bf-bnl-settings] --> S3[(aws s3)]
Settings --> DDB[(aws dynamodb)]
Scenarios[schedule analysis scenarios] --> S3
Scenarios --> DDB
Gtfs[gtfs domain resources] --> S3
Settings --> Scenarios
Settings --> Gtfs