ProjectBuild an AI-Powered Digital Bank with RAG: the explanation · Module 4: High-level design: components and flows · part 6 of 20
Part 6 · Module 4: High-level design: components and flows

Module 4: High-level design: components and flows

23 min read·
About 40 minutes · Needs: Module 1 (the problem) · Code: backend/app/main.py, backend/app/services/assistant_service.py, frontend/src/lib/api.ts, frontend/nginx.conf.template

Where this fits

WHERE THIS FITS The Kestrel Bank system this module CLIENT API LAYER FastAPI SAFETY AGENT LangGraph MODELS RETRIEVAL DATA AND INGESTION Postgres, Redis QUALITY Langfuse Customer app React Admin app React FastAPI REST + streaming Auth + RBAC tokens, roles Document upload admin only, checked Guardrails injection, PII Router small or large Agent LangGraph Banking tools ledger, transfers LLMs Groq, Gemini Retrieval hybrid + rerank Ingestion parse, chunk, embed PostgreSQL + pgvector ledger, chunks, state Redis limits, queue Observability Langfuse, metrics, logs Evaluation golden set, release gate
Almost every part is highlighted (blue): this module draws the whole map and the paths requests take through it.

This module is the map for the rest of the project. It names every part, says what each owns, and follows five requests from the browser to the database and back.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan