Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
bf-manage-connect
Initializing search
    bf-dev
    • Home
    • Product Capabilities
    • Process
    • Current Work
    • System Design
    • Software Reference
    • Operations
    bf-dev
    • Home
      • Overview
      • Manage
      • Overview
      • Product Engineering Workflow
      • Product Engineering Delivery
      • Product Engineering Workflow in Linear
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
      • Templates
      • Publishing
      • Workflow Companions
      • Overview
      • Active Artifacts
      • Backlog Artifacts
      • Archived Artifacts
      • Overview
      • Microgrid
      • OSCP
        • Challenge
        • Specification
        • Spec
        • Architecture
        • Overview
        • Script Runtime Model
        • Compose Profiles and Modes
        • Repo Topology
        • CI and Release Integration
        • Overview
        • Internal Application Diagrams
          • Overview
          • Web Model
          • Core Model
        • Service Interaction Flows
        • Data and State
          • Index
          • bf-manage-web
          • bf-manage-core
          • bf-manage-connect
            • What this service is
            • Code anatomy
            • Architectural characteristics
            • Documentation and tests in-repo
            • Internal request lifecycle
          • bf-manage-sitepwrmon
          • bf-manage-incidents
          • bf-telematics
          • bf-depot-sim
          • bf-manage-roaming
          • bf-support-microsite
          • bf-digital-twin
          • bf-schedule-creator
        • Overview
        • Internal Application Diagrams
        • Migration and Flags
        • Simulation Request Lifecycle
          • Index
          • bf-bnl-ui
          • bf-bnl-settings
          • bf-bnl-schedule-analysis-compute
          • bf-route-modelling
          • bf-schedule-creator
          • bf-digital-twin
        • Overview
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • ADRs
        • Service Matrix
        • Cloud Dependencies
        • Ports and URLs
      • Onboarding
      • Daily Operations Runbook
        • Overview
        • Staging Hotfix Release
        • Production Hotfix Release
        • Terraform Plan Dry Runs
      • Troubleshooting
      • Testing Guide
    • What this service is
    • Code anatomy
    • Architectural characteristics
    • Documentation and tests in-repo
    • Internal request lifecycle

    bf-manage-connect¶

    What this service is¶

    bf-manage-connect is the charging-protocol integration backend. It brokers OCPP interactions between charge point devices and the BetterFleet platform.

    Code anatomy¶

    • src/main.py: FastAPI app entrypoint.
    • src/core_connection/*: integration to core platform workflows.
    • src/ocpp_connection/*: OCPP connection/session lifecycle management.
    • src/ocpp_handlers/v1_6 and src/ocpp_handlers/v2_0_1: protocol-version-specific message handling.
    • src/auth, src/admin, src/_config, src/_helpers: shared cross-cutting modules.

    Architectural characteristics¶

    • Protocol adapter service with clear version partitioning for OCPP 1.6 and 2.0.1.
    • Strong testing focus around protocol handling and fake apps/clients for simulation.

    Documentation and tests in-repo¶

    • docs/connect.md, docs/arch.md, OCPP reference documents in docs/OCPP-2.0.1/.
    • Tests under test/ocpp_connection and test/ocpp_handlers/*.

    Internal request lifecycle¶

    sequenceDiagram
      participant Device as charger device
      participant Conn as ocpp connection
      participant Handler as ocpp handler
      participant CoreLink as core connection
      participant Core as manage core
    
      Device->>Conn: protocol message
      Conn->>Handler: dispatch by protocol version
      Handler->>CoreLink: translate to platform action
      CoreLink->>Core: call core endpoint
      Core-->>CoreLink: operation result
      CoreLink-->>Handler: response payload
      Handler-->>Device: protocol response
    Made with Material for MkDocs