Case Study
Architecting a Modular KYC Microservice Platform
Spring Boot · Next.js/React · Android · FastAPI KYC · OCR/vision modules
Executive Summary
Designed and implemented a modular platform spanning backend, web, mobile, and a FastAPI KYC service. This case study documents service boundaries, check policy, and review states; no population-level accuracy or false-rejection outcome is published without labeled evaluation evidence.
The Problem
- Keep upload ownership, KYC case state, and component checks explicit across service boundaries
- Keep web and Android clients aligned with the Spring API without moving authorization into the clients
- Represent check thresholds and review outcomes without presenting them as measured population results
Architecture & Approach
- 1Domain-oriented Spring Boot modules (auth, accounts, analytics, kyc, wallet)
- 2FastAPI KYC service: face, liveness, OCR, document-classification checks, and an aggregate policy
- 3Spring orchestration: bounded file reads, persisted check records, and UNDER_REVIEW fallback on service failure
- 4Android Wallet: card reload, QR pay, and bill-pay intent flows through Retrofit interfaces and DTOs
- 5Next.js web client with role-gated routes, bearer-token requests, and account flows
Challenges & Trade-offs
KYC service failure → persist an error check and move the case to UNDER_REVIEW rather than approving it
Upload integrity → require four distinct owned uploads with the expected document categories
Model boundary → keep optional ONNX/Tesseract modules distinct from the current simple default factory path
Outcomes & Results
- Implemented explicit KYC upload, case, check, and status boundaries in the reviewed source
- Implemented APPROVE, UNDER_REVIEW, and REJECT policy branches with reason codes and per-check records
- Accuracy, false-rejection rate, manual-review volume, and production outcomes remain unmeasured in the reviewed evidence