bf-bnl-ui¶
What this service is¶
bf-bnl-ui is the Plan frontend. It provides schedule/resource/simulation workflows and routes requests to either legacy Plan backends or digital twin APIs depending on migration flags.
Code anatomy¶
src/api/endpoints.ts: API path selection logic for legacy vs digital twin modes.src/hooks/useAxios.ts,src/hooks/usePlanDigitalTwinMigration.tsx: base URL routing and feature-flag behavior.src/components/pages/plan-v2/*: newer Plan v2 flows.src/services/*: domain-specific service hooks for vehicles, depots, scenarios, parser, reports, and energy data.src/router/*andsrc/context/*: route and app context boundaries.
Architectural characteristics¶
- Flag-driven dual-backend client behavior (
plan-digital-twin-migration). - Hybrid codebase with legacy and plan-v2 page structures.
- Hook/service-heavy architecture for API interaction boundaries.
Documentation and tests in-repo¶
- Endpoint and migration behavior heavily represented in hooks and endpoint tests.
- UI tests under
src/__tests__and module tests in API/hooks areas.