- Lower Kabete Rd, Nairobi 00100, Kenya
- Mon-Fri, 08:00am - 06:00pm
- +254 (798) 586113 +254 (728) 922269
- info@afriqsilicon.com
4 Min Read
How to build a multi‑tenant micro‑finance SaaS that meets Kenya’s data‑residency rules
Learn the practical options, trade‑offs and first steps for building a multi‑tenant micro‑finance SaaS that complies with Kenya’s data‑residency and privacy
Learn the practical options, trade‑offs and first steps for building a multi‑tenant micro‑finance SaaS that complies with Kenya’s data‑residency and privacy
Decision brief: options for a multi‑tenant micro‑finance SaaS under Kenyan data‑residency
You have three realistic ways to deliver a SaaS platform that lets multiple micro‑finance institutions (MFIs) share code but keep their data in Kenya.
| Approach | Typical effort | Main risk | Data‑residency control |
|---|---|---|---|
| Build from scratch, product‑design‑implementation + system‑orchestration | High (full stack, custom UI, custom IAM) | Scope creep, longer time‑to‑value | Full control, you decide the exact cloud region or on‑prem host |
| Adapt an open‑source IAM (Keycloak) with separate realms, see our Keycloak guide | Medium (reuse of authentication, custom tenant logic) | Realm‑level isolation may not meet strict audit needs | You can host Keycloak and all databases in a Kenyan data centre |
| Buy a multi‑tenant SaaS framework (e.g., SpectaBill) and extend it, saas‑development | Low‑to‑medium (configuration + small extensions) | Vendor lock‑in, limited custom workflow | Provider must guarantee Kenyan hosting; you verify the hosting contract |
1. Define the residency requirement up front
Kenya’s Data Protection Act 2019 mandates that personal data be stored in Kenya unless a cross‑border transfer is expressly permitted. Your first deliverable is a data‑location matrix that lists every data element (customer profile, loan ledger, audit log) and the approved storage location.
If you choose a public cloud, pick a region that is physically in Kenya (e.g., Microsoft Azure Kenya or a local data‑centre partner). If you go on‑prem, the hardware must be in a Kenyan facility and you need a documented run‑book for backup and disaster recovery that also stays in‑country.
2. Choose the tenant isolation model
| Model | How it works | When it fits |
|---|---|---|
| Separate databases per tenant, each MFI gets its own PostgreSQL schema or instance | Guarantees physical separation of data, simplifies GDPR‑type audits | High‑value MFIs, strict audit requirements |
| Shared database with tenant‑ID column, all rows carry a tenant identifier | Reduces infrastructure cost, easier to scale | Many small MFIs, limited budget |
| Separate Keycloak realms, each tenant has its own realm for users and clients | Allows branding and independent login flows; see our Keycloak Multi‑Tenant Approaches article for implementation details | When you need per‑tenant authentication policies |
The choice impacts the system‑orchestration effort: separate databases need automated provisioning scripts, while shared databases need robust row‑level security policies.
3. Map the integration points
Most MFIs already run a legacy core banking system, a mobile money gateway (e.g., M‑PESA) and a reporting tool. During the discovery session (step 03 in our process) we produce:
- a diagram of existing systems,
- a list of required data flows, and
- a gap analysis for APIs or batch extracts.
Typical integration patterns are:
- API façade, a thin Node.js service that translates the SaaS API to the legacy system’s protocol.
- Scheduled ETL, a Python script that pulls nightly loan data, transforms it and writes to the SaaS tenant’s schema.
4. Build the core platform
If you go the build‑from‑scratch route, we follow the two‑week sprint cadence described on our process page. The first sprint stands up the Docker‑based CI/CD pipeline, Pulumi‑defined infrastructure and a basic Keycloak realm. Subsequent sprints add tenant onboarding, loan‑origination flows and reporting dashboards.
When re‑using Keycloak, the proof‑of‑concept step (our technical validation phase) creates a single realm and a test client to prove that the federation with the M‑PESA API works before any contract is signed.
5. Harden for compliance and resilience
- Encryption at rest, enable PostgreSQL Transparent Data Encryption in the chosen Kenyan region.
- Audit logging, configure Keycloak and the application to write immutable logs to an append‑only bucket that lives in‑country.
- Monitoring, Grafana dashboards and Prometheus alerts are provisioned via the same Pulumi stack so you can see uptime, latency and any data‑location drift.
All of these are part of the system‑orchestration service we offer.
6. Handover and long‑term support
Our handover includes:
- full documentation of the architecture,
- run‑books for scaling the tenant database,
- a monitoring configuration that the client can own, and
- a support contract that keeps us on‑site for the life of the system (our “stay‑and‑run” model).
If you need capacity without a permanent hire, the team‑as‑a‑service offering can embed senior engineers into your team for any phase.
7. Quick checklist for the first 30 days
- Sign NDA (step 02) and schedule a discovery session.
- Produce a data‑location matrix and get approval from the data‑privacy officer.
- Choose tenant isolation model and document the decision.
- Validate a single integration (e.g., M‑PESA payment callback) with a proof‑of‑concept.
- Agree on the hosting region and obtain a hosting‑contract clause that guarantees Kenyan residency.
Related reading
- Designing multi tenant SaaS for Kenyan banking compliance
- SaaS multi tenant approaches using Keycloak
- Scalable IT infrastructure what IT actually takes to build systems that grow with your business
If you’re ready to turn these steps into a concrete plan, talk to our team about it.
Photo by Tima Miroshnichenko on Pexels.
Frequently Asked Questions
Common questions on this topic, answered by the Afriq Silicon team.
What drives the cost of a multi‑tenant micro‑finance platform?
Who owns the operational responsibilities after launch?
What happens if the chosen hosting region no longer meets residency rules?
Can I switch from a shared‑realm Keycloak setup to separate realms later?
What’s the first concrete step I should take?
Related Services
Working through this problem? These are the services we offer that connect to it.
Product Design & Implementation
From idea to production-ready software, built right the first time.
Custom software product design and development from Afriq Silicon. We build scalable, user-centered applications, from concept to deployment.
Explore serviceSystem Orchestration
Make your infrastructure invisible, reliably fast, quietly resilient.
IT system orchestration and infrastructure from Afriq Silicon. We design scalable, secure, integrated IT environments for growing organizations.
Explore serviceMulti-Tenant Platform Development
Platforms that scale from first deployment to millions of users.
Multi-tenant platform development from Afriq Silicon. We build platforms with tenant isolation, subscription billing, enterprise SSO, and resilient infrastructure.
Explore serviceRelated
Similar Articles
Stay Informed with Our Latest Articles: Explore the most recent insights, trends, and updates from our industry experts. Dive into a wealth of knowledge to keep you ahead in the ever-evolving tech landscape.
September 22nd, 2026
Designing Multi‑tenant SaaS for Kenyan Banking Compliance
Learn which multi‑tenant architecture fits Kenyan banking regulations, including data residency, KYC handling, and the trade‑offs of shared vs isolated
June 11th, 2026
Scalable IT Infrastructure: What It Actually Takes
Scalability sounds simple until you need it. Then it becomes the most expensive problem you didn't plan for.
October 15th, 2025
How Fintech Automation Is Reshaping African Finance
From mobile money to CFO automation, fintech is quietly rewiring how African businesses handle money. Here is what is changing, why now, and where to start.
January 4th, 2024
Keycloak Multitenancy Approaches for SaaS
Learn how to implement Keycloak multitenancy for SaaS platforms, with practical patterns for realms, groups, clients, and identity‑provider federation.
Pages
- - Work
- - Services
- - Our Process
- - Contact Us
Solutions
- - Acts ML
- - Kilelehub
- - Other Projects
Legal
Contact
- - Lower Kabete Rd, Nairobi 00100, Kenya
- - Mon-Fri, 08:00am - 06:00pm
- - +254 (798) 586113
- - +254 (728) 922269
- - info@afriqsilicon.com