ProjectBuild an AI-Powered Digital Bank with RAG: the explanation · Module 7: Core banking: the ledger, transfers and synthetic customers · part 9 of 20
Part 9 · Module 7: Core banking: the ledger, transfers and synthetic customers

Module 7: Core banking: the ledger, transfers and synthetic customers

25 min read·
About 40 minutes · Needs: Module 1 (the problem), Module 6 (sign-in and roles) · Code: backend/app/services/banking_service.py, backend/app/services/seed.py, backend/app/models/banking.py, backend/app/api/routes/banking.py

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
Core banking (blue) serves both the customer's screens and the agent's tools, and reads and writes the ledger in Postgres.

The assistant is only as right as the numbers it is handed. This module owns those numbers: accounts, transactions and the code that moves money. The customer's screens and the assistant's tools call the same banking functions, which read and write the ledger in Postgres.

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