[02]
One API, seven domains
Auth, business, cards, transactions, schedules, wallet and admin inject endpoints into one RTK Query base API with shared caching and invalidation.
A role-aware fintech platform for personal, business and admin journeys over Python microservices. I own sessions, authorisation, onboarding, verification, document handling and the client data layer.
* AUTH + SERVICE TOPOLOGY
[01] The problem
A user can hold personal and business accounts, have neither selected and be verified on only one. In a money product, unresolved identity can expose the wrong balance or payment surface. Account, role and verification state must settle before any transaction can begin.
[02] The constraints
Payment surfaces do not render until verification passes for the selected account. Personal and business verification states remain independent.
Passports, incorporation papers and address evidence pass through server-controlled handlers so storage credentials never reach the browser.
FX, cards and top-ups depend on different providers. Each capability must degrade independently so one outage does not take down the platform.
[03] The approach
Identity resolves once before any money-moving interface renders. Edge middleware checks token presence; a central guard resolves account, role and verification. Six FastAPI capabilities sit behind GraphQL, with authorisation enforced at both route and row level.
[04] The trade-offs
[01]
[02]
[03]
[04]
[05] The build
[01]
After optional 2FA, a bootstrap provider fetches the user once. A central guard then resolves admin, dashboard, onboarding or account selection.
[02]
Auth, business, cards, transactions, schedules, wallet and admin inject endpoints into one RTK Query base API with shared caching and invalidation.
[03]
Personal and business onboarding use separate paths and independently gate payment access. Identity documents move through Next.js route handlers with the AWS SDK, keeping bucket credentials off the client.
[04]
Auth, onboarding, dashboard and admin route groups share Zod schemas, keeping validation consistent from signup through later edits.
[05]
Shared shells and form primitives support transfers, payment requests, scheduled payments, transaction history and card management across account types.
[06]
The platform emits authorisation rate, transfer p95, reconciliation break rate and KYC completion. These measures exist before traffic, but do not yet have reportable values.
[07]
Transfer latency uses p95 from service entry to ledger write. Reconciliation break rate tracks movements where provider and platform records disagree at day end.
[08]
KYC completion is measured per onboarding step because verification gates funding. Alfa is pre-traffic, so only events and thresholds exist; no outcome is claimed yet.
[06] The result
0
Money surfaces before identity resolves
* the guard settles the account, then the screen exists
2
Layers authorising a read
* route guard, and row-level rules at the data
6
Capabilities that fail alone
* an FX outage is not a transfers outage
4
Service levels instrumented
* auth rate · transfer p95 · recon breaks · KYC completion
Alfa has no live traffic. The first three values are verifiable architecture properties; the fourth counts instrumentation, not output. Authorisation, latency, reconciliation and KYC will carry values only after production traffic exists.
[07] What I’d do differently
Money movement and authentication need broader integration and end-to-end coverage. That is the next priority before onboarding analytics or staged rollout controls.
Written by Faizan Amir
Role on Alfa: Full-Stack Engineer — Python microservices & Next.js client
Last reviewed
Need something like this built?
Next case study [05]
WisdomUp
Multi-Service E-Commerce Platform
Read the case study →