Architecture
Three layers, 16 service modules and 4 shared modules, communicating Experience → Process → System over gRPC, with domain events over Kafka and Apache APISIX transcoding external REST/JSON into gRPC.
Tech stack
| Component | Version |
|---|---|
| Quarkus platform | 3.36.2 |
| Apache Camel | 4.x (via quarkus-camel-bom) |
| Java | 21 |
| Protobuf / gRPC | 4.33.2 / 1.81.0 |
| Avro | 1.12.1 |
| Gradle (wrapper) | 9.5.1 |
| Container images | Jib (quarkus-container-image-jib) |
| Gateway | Apache APISIX 3.16 |
| Event bus | Kafka / Redpanda (schema registry: Apicurio in dev) |
Cross-cutting in every service: Camel (core/gRPC/Kafka), Quarkus OIDC, OpenTelemetry, Micrometer/Prometheus, SmallRye Health, JSON logging.
The layers
Experience APIs (XAPI) — experience-apis/
Channel-facing, REST-exposed (Camel Platform HTTP + camel-quarkus-openapi-java),
gRPC clients only. Modules: customer-portal-xapi, internal-ops-xapi,
exco-dashboard-xapi. (All skeletons today.)
Process APIs (PAPI) — process-apis/
Business orchestration — saga, MicroProfile fault tolerance, Quartz scheduling,
PDF generation — owning persistence (PostgreSQL via Hibernate Panache + Redis).
Modules: payment-processing-papi, trade-finance-papi,
statement-management-papi, notification-alert-papi,
document-generation-papi. (All skeletons today.)
System APIs (SAPI) — system-apis/
Adapters wrapping external systems of record.
cbs-finacle-sapi— Infosys Finacle core-banking adapter (Oracle/JDBC, wraps GAM views; Camel gRPC routes for accounts & facilities). The one substantively implemented service.salesforce-crm-sapi,swift-messaging-sapi,tms-treasury-sapi,calypso-trade-sapi,docusign-sapi,file-transfer-sapi,appian-bpm-sapi— skeletons today.
Shared — shared/
proto-definitions— gRPC/Protobuf contracts (currentlycommon.proto+ the CBSaccount.proto/facility.proto; the broader set is planned).avro-schemas— Avro schemas for Kafka event serialization (wired, schemas to be authored).domain-events— CloudEvents envelope + topic constants (stub today).apisix-registry— the most-built shared module: at startup each service registers its own gRPC routes + flattened proto with the APISIX Admin API (self-service route registration via@ConfigMapping("apisix.registry")).
Request & event flow
- Client → APISIX over HTTP/JSON (proxy
:9080, admin:9180). - APISIX → gRPC via the
grpc-transcodeplugin. Each service registers its routes/proto at startup throughapisix-registry(ormake init-routesas a manual seeder). Example:GET /api/v1/system/cbs/accounts/:account_id→ gRPCAccountService/GetAccountById. - Layer-to-layer gRPC — Experience → Process → System (one direction).
- System APIs → external systems (Finacle/Oracle, Salesforce, SWIFT, S3/SFTP…).
- Domain events over Kafka (Avro, Apicurio registry) — decoupled
side-effects across layers (the event-bus code path is still conceptual; the
domain-events/avro-schemasmodules are stubs).
:::note No OpenAPI reference
This platform has no published OpenAPI document — the machine-readable
contracts are the gRPC .proto files in shared/proto-definitions. The
Experience layer is "REST/OpenAPI" conceptually (Camel can generate an OpenAPI
doc at runtime), but no REST routes are implemented yet.
:::
Build & deploy
- Gradle 9.5.1 monorepo with
buildSrcconvention plugins (afreximbank.java-conventions,afreximbank.quarkus-service, and per-layersystem-api/process-api/experience-apiplugins). Versions centralized ingradle/libs.versions.toml. - Jib images (
imageBuild) on a BellSoft Liberica JRE 21 base, pushed to ECR. - Makefile drives everything:
make build/build-system|process|experience,make infra-up(13-service Docker Compose dev stack: postgres, redis, redpanda, apicurio, keycloak, openfga, vault, etcd, apisix, prometheus, grafana, tempo),make init-routes,make images-all, and the one-shotmake k8s-local(k8s-up → k8s-images → k8s-load-images → k8s-deploy → k8s-status). - Local Kubernetes deploys the datasource-free slice (the 5 Process + 3
Experience APIs) via the
infra/prod/helm/afxm-enterpriseumbrella chart; pods serve health endpoints, proving deploy mechanics (System APIs are disabled locally since they need external systems). Seedocs/LOCAL-K8S-DEPLOYMENT.mdin the repo.