For the complete documentation index, see llms.txt. This page is also available as Markdown.

Physical Organization

Physical organization of source code in the g2p-bridge monorepo

The G2P Bridge source code is consolidated into a single repository: g2p-bridge. What were previously seven separate repositories are now folders within this one monorepo, with each component's internal structure kept intact.

The redundant openg2p-g2p-bridge- prefix has been stripped from folder and file names within the repo. Python package names (e.g. openg2p_g2p_bridge_models), Docker image names, and Helm Chart.yaml names are intentionally left unchanged.

Repository layout

Folder
Origin repo
Contents

openg2p-g2p-bridge

Core services and libraries: models, partner-api, bene-portal-api, celery-beat-producers, celery-workers.

openg2p-g2p-bridge-example-bank

Reference Sponsor Bank simulator (not for production): api, celery-beat-producers, celery-workers, models.

openg2p-g2p-bridge-docker

Dockerfiles for the API and Celery service images.

openg2p-g2p-bridge-deployment + openg2p-g2p-bridge-example-bank-deployment

The single consolidated Helm chart charts/openg2p-bridge (Bridge + bundled Example Bank, toggled via exampleBank.enabled) and the scripts/ (e.g. uninstall-bridge.sh).

openg2p-g2p-bridge-test

Test artefacts — the sanity/ regression suite (API coverage, full e2e cash flow, business-rule negatives and MT940 reconciliation-error checks).

The pluggable connectors (bank, mapper, notification, geo, agency, warehouse) no longer live in this repo. They were moved to a separate repository, g2p-bridge-connectors, so this platform repo stays standard and versioned and adopters extend it without forking. The Celery image pulls the reference connectors from there by git ref at build time. See Connectors & Extensibility.

Core modules (core/)

Module
Type
Purpose

partner-api

service (pod)

FastAPI REST APIs for partner systems. Upstream systems like PBMS call this to hand over disbursement instructions. Secured via partner signature validation — in-process local JWS; see Partner APIs → Authentication. Scale horizontally.

bene-portal-api

service (pod)

FastAPI REST APIs for the OpenG2P Beneficiary Portal. Secured via an access token from an identity provider. Scale horizontally.

celery-beat-producers

service (pod)

Produces periodic Celery beats. Run as a single replica.

celery-workers

service (pod)

Celery workers that execute the beats (check balance, block funds, initiate payments, reconcile MT940, and — for in-kind — geo/warehouse/agency tasks). Scale horizontally.

models

library

SQLAlchemy persistence models and Pydantic schemas shared by the api, beat producer and workers.

The beat producer and workers ship as a single Docker image (registry.gitlab.com/openg2p/g2p-bridge/g2p-bridge/celery); the Helm chart runs it as beat or worker by configuration.

Example Bank modules (example-bank/)

Module
Type
Purpose

example-bank-api

service (pod)

FastAPI REST APIs of a fictitious "Example Bank" — check balance, block funds, initiate payments. Self-seeds the treasury account on migrate.

example-bank-celery (beat-producers + workers)

service (pod)

Asynchronous processing — payments and MT940 statement generation.

example-bank-models

library

SQLAlchemy models and Pydantic schemas shared by the api and celery modules.

CI

CI runs on GitLab (.gitlab-ci.yml). Building, versioning and publishing the images and the Helm chart are handled by OpenG2P's central Helm & Docker packaging pipeline (shared across repos) — the old per-image docker-build-* and helm-publish GitHub Actions are retired. Images publish to the project's GitLab Container Registry and the chart to the shared openg2p/charts Helm registry. See Versions and Helm & Docker Versioning Strategy and CI. Lint (pre-commit) and unit tests run as separate jobs.

The Python packages are not published to PyPI. The images build the core from local in-repo source; the connectors are pulled from g2p-bridge-connectors by git ref at build time (G2P_BRIDGE_CONNECTORS_REF), and the external OpenG2P libraries (openg2p-fastapi-common, openg2p-spar-models) are overridable git-ref build args. See Connectors & Extensibility.

Last updated

Was this helpful?