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.
Repository layout
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-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).
Core modules (core/)
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 (openg2p/openg2p-bridge-celery); the Helm chart runs it as beat or worker by configuration.
Example Bank modules (example-bank/)
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 GitHub Actions (.github/workflows/build-publish.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.
Last updated
Was this helpful?