# Smart Bank – AI Powered Banking Assistant

# Smart Bank – AI Powered Banking Assistant

Role-Based Dashboards using Semantic Kernel, Azure OpenAI, MySQL &amp; OpenTelemetry

A Reference Architecture for Intelligent, Secure, and Observable Digital Banking

Banking customers now expect instant, conversational, and personalized service, while banks must keep every interaction secure, auditable, and compliant. **Smart Bank** answers both needs: an AI-powered banking assistant built on **role-based dashboards** for customers and administrators, orchestrated by **Semantic Kernel**, reasoning with **Azure OpenAI**, backed by a **MySQL** core data store, and observed end-to-end with **OpenTelemetry**.

<div id="bkmrk-figure-1-diagram" style="max-width: 880px; margin: 0 auto 6px auto; font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; color: #1c2330;"><div style="font-size: 16px; font-weight: bold; color: #0a66c2; text-align: center; margin: 0 0 12px 0;">Smart Bank: AI Powered Banking Assistant Architecture</div><div style="border: 2px solid #0a66c2; border-radius: 8px; background: #f0f6ff; padding: 10px 14px;"><div style="font-size: 12px; font-weight: bold; color: #0a66c2; letter-spacing: 1px; text-align: center; margin-bottom: 8px;">USERS &amp; ROLE-BASED ACCESS</div><table style="width: 100%; border-collapse: collapse;"><tbody><tr><td style="width: 50%; padding: 5px; vertical-align: top;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 8px 10px;"><div style="font-weight: bold; font-size: 13px;">Customer</div><div style="font-size: 12px; color: #44556b;">Own accounts, transactions, loans, cards &amp; complaints</div></div></td><td style="width: 50%; padding: 5px; vertical-align: top;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 8px 10px;"><div style="font-weight: bold; font-size: 13px;">Bank Admin</div><div style="font-size: 12px; color: #44556b;">All customers, analytics, reports, operations &amp; branches</div></div></td></tr></tbody></table>

</div><div style="text-align: center; color: #9bb3cc; font-size: 22px; line-height: 1; margin: 3px 0;">↓</div><div style="border: 2px solid #e0a83e; border-radius: 8px; background: #fff7e8; padding: 10px 14px;"><div style="font-size: 12px; font-weight: bold; color: #b9770e; letter-spacing: 1px; text-align: center; margin-bottom: 8px;">AUTHENTICATION &amp; ACCESS CONTROL</div><table style="width: 100%; border-collapse: collapse; text-align: center;"><tbody><tr><td style="padding: 5px; vertical-align: middle;"><div style="border: 1px solid #edc980; border-radius: 6px; background: #fff; padding: 8px 6px;"><div style="font-weight: bold; font-size: 13px;">Login</div><div style="font-size: 11px; color: #44556b;">Username / ID, Password, MFA</div></div></td><td style="width: 26px; color: #c9a24a; font-size: 16px;">→</td><td style="padding: 5px; vertical-align: middle;"><div style="border: 1px solid #edc980; border-radius: 6px; background: #fff; padding: 8px 6px;"><div style="font-weight: bold; font-size: 13px;">JWT Token</div><div style="font-size: 11px; color: #44556b;">Access &amp; Refresh tokens</div></div></td><td style="width: 26px; color: #c9a24a; font-size: 16px;">→</td><td style="padding: 5px; vertical-align: middle;"><div style="border: 1px solid #edc980; border-radius: 6px; background: #fff; padding: 8px 6px;"><div style="font-weight: bold; font-size: 13px;">RBAC Engine</div><div style="font-size: 11px; color: #44556b;">Roles mapped to permissions</div></div></td></tr></tbody></table>

</div><div style="text-align: center; color: #9bb3cc; font-size: 22px; line-height: 1; margin: 3px 0;">↓</div><div style="border: 2px solid #0a66c2; border-radius: 8px; background: #f0f6ff; padding: 10px 14px;"><div style="font-size: 12px; font-weight: bold; color: #0a66c2; letter-spacing: 1px; text-align: center; margin-bottom: 8px;">APPLICATION LAYER (FastAPI)</div><table style="width: 100%; border-collapse: collapse; text-align: center;"><tbody><tr><td style="width: 25%; padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**Auth Service**  
Login, MFA, tokens</div></td><td style="width: 25%; padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**User Service**  
Profile, roles</div></td><td style="width: 25%; padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**Account Service**  
Balances, summaries</div></td><td style="width: 25%; padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**Transaction Service**  
Transactions, payments</div></td></tr><tr><td style="padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**Loan Service**  
Loans, EMIs, dues</div></td><td style="padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**Card Service**  
Cards, limits</div></td><td style="padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**Complaint Service**  
Register, track, resolve</div></td><td style="padding: 4px;"><div style="border: 1px solid #b8d4f0; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px; line-height: 1.35;">**Analytics Service**  
Reports, insights</div></td></tr></tbody></table>

<div style="margin-top: 6px; border: 1px solid #b8d4f0; border-radius: 6px; background: #eaf2fb; padding: 8px; text-align: center; font-size: 12px;">**Chat Assistant API:** send / receive messages, maintain conversation session state</div></div><div style="text-align: center; color: #9bb3cc; font-size: 22px; line-height: 1; margin: 3px 0;">↓</div><div style="border: 2px solid #8661c5; border-radius: 8px; background: #f3effb; padding: 10px 14px;"><div style="font-size: 12px; font-weight: bold; color: #6a3fb0; letter-spacing: 1px; text-align: center; margin-bottom: 8px;">SEMANTIC KERNEL ORCHESTRATION LAYER</div><table style="width: 100%; border-collapse: collapse; text-align: center;"><tbody><tr><td style="width: 33.33%; padding: 4px;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px;">**Intent Detection**</div></td><td style="width: 33.33%; padding: 4px;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px;">**Prompt Management**</div></td><td style="width: 33.33%; padding: 4px;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px;">**Function Calling**</div></td></tr><tr><td style="padding: 4px;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px;">**Context &amp; Memory**</div></td><td style="padding: 4px;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px;">**Plugin Invocation**</div></td><td style="padding: 4px;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 7px 5px; font-size: 12px;">**Response Generation**</div></td></tr></tbody></table>

</div><div style="text-align: center; color: #9bb3cc; font-size: 22px; line-height: 1; margin: 3px 0;">↓</div><table style="width: 100%; border-collapse: collapse; vertical-align: top;"><tbody><tr><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #4a9b5e; border-radius: 8px; background: #eef7f0; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #2f7d43; letter-spacing: 0.5px; text-align: center; margin-bottom: 6px;">PLUGINS (BANKING CAPABILITIES)</div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">Account, Transaction, Loan, Card, Complaint, Analytics, Customer &amp; Payment. Typed operations mapped to application services.</div></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #3a9aa0; border-radius: 8px; background: #e9f5f5; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #1f7a80; letter-spacing: 0.5px; text-align: center; margin-bottom: 6px;">KNOWLEDGE &amp; SEARCH (RAG)</div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">Azure AI Search (vector) over policy docs, FAQs, statements &amp; guidelines. Grounds answers in the bank's own content.</div></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #3a9aa0; border-radius: 8px; background: #e9f5f5; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #1f7a80; letter-spacing: 0.5px; text-align: center; margin-bottom: 6px;">AZURE OPENAI SERVICE</div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">GPT-4o / GPT-4.1 with embeddings: chat completion, function calling &amp; response generation.</div></div></td></tr></tbody></table>

<div style="text-align: center; color: #9bb3cc; font-size: 22px; line-height: 1; margin: 3px 0;">↓</div><table style="width: 100%; border-collapse: collapse; vertical-align: top;"><tbody><tr><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #b83a8b; border-radius: 8px; background: #fbeef6; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #99306f; letter-spacing: 0.5px; text-align: center; margin-bottom: 6px;">MYSQL DATABASE (CORE DATA STORE)</div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">users, roles, customers, accounts, transactions, loans, credit_cards, complaints, branches.</div></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #0a66c2; border-radius: 8px; background: #f0f6ff; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #0a66c2; letter-spacing: 0.5px; text-align: center; margin-bottom: 6px;">AZURE BLOB STORAGE</div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">Statements, KYC files, loan agreements, policies &amp; forms.</div></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #0a66c2; border-radius: 8px; background: #f0f6ff; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #0a66c2; letter-spacing: 0.5px; text-align: center; margin-bottom: 6px;">EXTERNAL INTEGRATIONS</div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">Payment Gateway, SMS / Email, KYC / AML, Credit Bureau &amp; Core Banking.</div></div></td></tr></tbody></table>

<div style="text-align: center; color: #9bb3cc; font-size: 22px; line-height: 1; margin: 3px 0;">↓</div><div style="border: 2px solid #e0a83e; border-radius: 8px; background: #fff7e8; padding: 10px 14px;"><div style="font-size: 12px; font-weight: bold; color: #b9770e; letter-spacing: 1px; text-align: center; margin-bottom: 8px;">OBSERVABILITY &amp; TELEMETRY (OpenTelemetry)</div><div style="text-align: center;"><span style="display: inline-block; border: 1px solid #edc980; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; margin: 3px 2px; background: #fff;">Instrumentation</span> <span style="color: #c9a24a;">→</span> <span style="display: inline-block; border: 1px solid #edc980; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; margin: 3px 2px; background: #fff;">OTel Collectors</span> <span style="color: #c9a24a;">→</span> <span style="display: inline-block; border: 1px solid #edc980; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; margin: 3px 2px; background: #fff;">Telemetry Data</span> <span style="color: #c9a24a;">→</span> <span style="display: inline-block; border: 1px solid #edc980; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; margin: 3px 2px; background: #fff;">Azure Monitoring</span> <span style="color: #c9a24a;">→</span> <span style="display: inline-block; border: 1px solid #edc980; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; margin: 3px 2px; background: #fff;">Audit &amp; Security Logging</span> <span style="color: #c9a24a;">→</span> <span style="display: inline-block; border: 1px solid #edc980; border-radius: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; margin: 3px 2px; background: #fff;">Alerting &amp; Notifications</span></div></div><div style="border: 2px solid #0a66c2; border-radius: 8px; background: #f0f6ff; padding: 10px 14px; margin-top: 10px;"><div style="font-size: 12px; font-weight: bold; color: #0a66c2; letter-spacing: 1px; text-align: center; margin-bottom: 8px;">END-TO-END DATA FLOW</div><div style="text-align: center; line-height: 2;"><span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">User</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">React UI</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">JWT Auth</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">FastAPI APIs</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">Semantic Kernel</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">Plugins / Functions</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">MySQL DB</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">Azure OpenAI</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">Response to UI</span> <span style="color: #7fa8d4;">→</span> <span style="display: inline-block; border: 1px solid #b8d4f0; border-radius: 6px; padding: 5px 9px; font-size: 12px; font-weight: 600; margin: 2px; background: #fff;">Telemetry Captured</span></div></div></div>Figure 1 — The complete Smart Bank architecture, from role-based user access through the FastAPI application layer, Semantic Kernel orchestration, Azure OpenAI reasoning, MySQL persistence, and full-stack observability.

## Smart Bank Architecture — Layer Overview

<table id="bkmrk-layer-component-role" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Layer</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Component(s)</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Role</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Users / Access</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Role-Based Dashboards</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Separate Customer &amp; Bank Admin experiences, enforced by RBAC</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Authentication</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">JWT + MFA + RBAC Engine</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Verify identity, issue tokens, map roles to permissions</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Application Layer</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">FastAPI Services</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Auth, User, Account, Transaction, Loan, Card, Complaint, Analytics, Chat APIs</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Orchestration</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Semantic Kernel</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Intent, prompts, function calling, memory, response generation</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">AI Reasoning</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Azure OpenAI (GPT-4o / 4.1)</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Language understanding, function-calling decisions, replies</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Knowledge</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Azure AI Search (RAG)</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Grounds answers in policy docs, FAQs, statements, guidelines</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Plugins</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Banking Capability Plugins</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Typed banking operations mapped to application services</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Core Data</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">MySQL Database</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">System of record for users, accounts, transactions, loans</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Documents</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Azure Blob Storage</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Statements, KYC files, loan agreements, policies, forms</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Integrations</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">External Services</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Payment, SMS/Email, KYC/AML, Credit Bureau, Core Banking</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Observability</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">OpenTelemetry + Azure Monitor</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Traces, metrics, logs, alerts, audit &amp; security logging</td></tr></tbody></table>

## 1. What Is Smart Bank?

Smart Bank is a reference architecture for an intelligent banking assistant that lets users converse naturally with their bank instead of navigating dozens of screens. It is not a single product but a composition of cloud-native services that turn natural-language requests like "show my last five transactions," "what is my EMI due date," or "raise a complaint" into safe, governed actions against real banking data.

<table id="bkmrk-principle-what-it-mea" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Principle</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">What it means</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Conversational</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">A chat assistant replaces complex navigation for everyday banking tasks.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Role-aware</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Distinct experiences for Customers and Bank Admins, enforced by RBAC.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Grounded</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Answers are based on the bank's own data and documents, not guesswork.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Secure</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">JWT authentication, MFA, and least-privilege permissions throughout.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Observable</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">OpenTelemetry traces, metrics, and logs feed Azure monitoring and alerting.</td></tr></tbody></table>

## 2. Users and Role-Based Access

Two primary roles drive the entire experience. The architecture deliberately keeps their capabilities separate so that a single platform can serve very different needs without compromising security.

<table id="bkmrk-role-scope-of-access" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Role</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Scope of Access</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Customer</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Own accounts, transactions, loans, cards, and complaints (self-service only).</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Bank Admin</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">All customers, analytics, reports, operations, and branch data (organization-wide).</td></tr></tbody></table>

## 3. Authentication &amp; Access Control

Every session begins at the security boundary. Credentials are verified, a token is issued, and a role-based engine decides what the authenticated identity is allowed to do.

<table id="bkmrk-stage-purpose" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Stage</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Purpose</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Login</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Username or ID, password, and multi-factor authentication (MFA) for identity assurance.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">JWT Token</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Issues a short-lived access token and a refresh token for stateless, scalable sessions.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">RBAC Engine</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Maps roles (Customer and Admin) to a granular set of least-privilege permissions.</td></tr></tbody></table>

## 4. Role-Based Dashboards

Once authenticated, each role lands on a tailored dashboard. Both dashboards embed the same AI Banking Assistant, but its scope and verbs differ by role.

<table id="bkmrk-customer-dashboard-ba" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Customer Dashboard</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Bank Admin Dashboard</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Account summary &amp; balances</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Customer &amp; account management</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Transactions history</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Transactions &amp; analytics</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Loan details and EMIs</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Loan &amp; credit card management</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Credit cards and limits</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Complaint management</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Complaints register &amp; tracking</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Branch performance</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">AI Banking Assistant: chat with the bank</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Reports &amp; operational analytics</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Profile management</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">AI Banking Assistant: ask, analyze, act</td></tr></tbody></table>

## 5. The Application Layer (FastAPI)

A set of focused, independently scalable services, built with FastAPI, exposes the bank's capabilities as clean APIs. Each service owns a single domain, making the system easier to reason about, test, and evolve.

<table id="bkmrk-service-responsibilit" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Service</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Responsibility</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Auth Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Login, MFA, and token issuance &amp; validation.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">User Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Profile, preferences, and role management.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Account Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Accounts, balances, and summaries.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Transaction Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Transactions and payments.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Loan Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Loans, EMIs, and dues.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Card Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Cards, limits, and payments.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Complaint Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Register, track, and resolve complaints.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Analytics Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Reports, insights, and dashboards.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Chat Assistant API</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Send/receive messages and maintain conversation session state.</td></tr></tbody></table>

## 6. MySQL Database: The Core Data Store

A relational MySQL database is the system of record. A normalized schema links identities, roles, and financial entities through primary and foreign keys, keeping data consistent and queryable.

<table id="bkmrk-table-key-fields-purp" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Table</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Key Fields</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Purpose</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">users</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">user\_id (PK), username, password\_hash, role\_id (FK)</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Authentication identities.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">roles</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">role\_id (PK), role\_name, description</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">RBAC role definitions.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">customers</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">customer\_id (PK), name, email, phone, address</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Customer master data.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">accounts</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">account\_id (PK), customer\_id (FK), account\_type, balance</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Bank accounts &amp; balances.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">transactions</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">transaction\_id (PK), account\_id (FK), amount, status</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Money movement records.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">loans</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">loan\_id (PK), customer\_id (FK), loan\_amount, emi\_amount</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Loan lifecycle &amp; dues.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">credit\_cards</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">card\_id (PK), customer\_id (FK), credit\_limit, available\_limit</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Card limits &amp; usage.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">complaints</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">complaint\_id (PK), customer\_id (FK), type, status</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Complaint tracking.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">branches</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">branch\_id (PK), branch\_name, location, manager\_id</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Branch &amp; operations data.</td></tr></tbody></table>

## 7. Semantic Kernel Orchestration Layer

The intelligence of Smart Bank lives in the Semantic Kernel orchestration layer. It sits between the chat interface and the bank's capabilities, turning a free-form request into a precise, governed sequence of operations.

<table id="bkmrk-kernel-stage-what-it" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Kernel Stage</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">What it does</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Intent Detection</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Interprets what the user actually wants from natural language.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Prompt Management</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Builds and templates the prompts that guide the model's reasoning.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Function Calling</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Selects and invokes the right banking function for the intent.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Context &amp; Memory</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Maintains conversation context so multi-turn dialogue stays coherent.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Plugin Invocation</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Routes the request to the correct banking capability plugin.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Response Generation</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Composes a clear, grounded answer to return to the user.</td></tr></tbody></table>

<div id="bkmrk-figure-2-diagram" style="max-width: 820px; margin: 0 auto 6px auto; font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; color: #1c2330;"><div style="font-size: 16px; font-weight: bold; color: #0a66c2; text-align: center; margin: 0 0 2px 0;">Semantic Kernel Orchestration Flow</div><div style="font-size: 12px; color: #7a8aa0; text-align: center; margin: 0 0 12px 0;">Intent → Plan → Ground → Invoke → Reason → Respond</div><div style="max-width: 420px; margin: 0 auto; border: 2px solid #9bb3cc; border-radius: 8px; background: #eef2f7; padding: 9px 12px; text-align: center;"><div style="font-weight: bold; font-size: 13px;">Customer / Admin</div><div style="font-size: 12px; color: #44556b;">React UI · Chat Message</div></div><div style="text-align: center; color: #9bb3cc; font-size: 20px; line-height: 1; margin: 3px 0;">↓ <span style="font-size: 11px; color: #0a66c2; font-weight: bold;">1</span></div><div style="max-width: 560px; margin: 0 auto; border: 2px solid #0a66c2; border-radius: 8px; background: #f0f6ff; padding: 9px 12px; text-align: center;"><div style="font-weight: bold; font-size: 13px; color: #0a66c2;">JWT Auth · Chat Assistant API (FastAPI)</div><div style="font-size: 12px; color: #44556b;">Validates role &amp; session, forwards message + identity</div></div><div style="text-align: center; color: #9bb3cc; font-size: 20px; line-height: 1; margin: 3px 0;">↓ <span style="font-size: 11px; color: #0a66c2; font-weight: bold;">2</span></div><div style="border: 2px solid #8661c5; border-radius: 8px; background: #f3effb; padding: 10px 14px;"><div style="text-align: center; margin-bottom: 8px;"><span style="font-size: 12px; font-weight: bold; color: #6a3fb0; letter-spacing: 1px;">SEMANTIC KERNEL (KERNEL CORE)</span> <span style="font-size: 11px; color: #8a7aa8; font-style: italic;">orchestrator &amp; policy boundary</span></div><table style="width: 100%; border-collapse: collapse; text-align: center;"><tbody><tr><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 8px 6px; font-size: 12px; line-height: 1.4;">**Intent Detection**  
<span style="color: #44556b;">Understands what the user is asking for</span></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 8px 6px; font-size: 12px; line-height: 1.4;">**Prompt Management**  
<span style="color: #44556b;">Builds templated prompts + system instructions</span></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 8px 6px; font-size: 12px; line-height: 1.4;">**Function Calling / Planner**  
<span style="color: #44556b;">Chooses which plugin function(s) to run</span></div></td></tr><tr><td style="padding: 4px; vertical-align: top;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 8px 6px; font-size: 12px; line-height: 1.4;">**Context &amp; Memory**  
<span style="color: #44556b;">Keeps multi-turn chat history &amp; state</span></div></td><td style="padding: 4px; vertical-align: top;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 8px 6px; font-size: 12px; line-height: 1.4;">**Plugin Invocation**  
<span style="color: #44556b;">Executes the function with typed arguments</span></div></td><td style="padding: 4px; vertical-align: top;"><div style="border: 1px solid #cdbbe8; border-radius: 6px; background: #fff; padding: 8px 6px; font-size: 12px; line-height: 1.4;">**Response Generation**  
<span style="color: #44556b;">Composes grounded, natural-language reply</span></div></td></tr></tbody></table>

</div><div style="text-align: center; color: #9bb3cc; font-size: 20px; line-height: 1; margin: 3px 0;">↓</div><table style="width: 100%; border-collapse: collapse;"><tbody><tr><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #4a9b5e; border-radius: 8px; background: #eef7f0; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #2f7d43; text-align: center; margin-bottom: 5px;">PLUGINS (BANKING CAPABILITIES) <span style="color: #2f7d43;">5</span></div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">Account · Transaction · Loan · Card · Complaint · Analytics · Customer · Payment. Typed functions call FastAPI services, which query / update the **MySQL Database**.</div></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #3a9aa0; border-radius: 8px; background: #e9f5f5; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #1f7a80; text-align: center; margin-bottom: 5px;">KNOWLEDGE &amp; SEARCH (RAG) <span style="color: #1f7a80;">4</span></div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">Azure AI Search · vector search over policy docs, FAQs, statements &amp; guidelines. Grounds answers in the bank's own content.</div></div></td><td style="width: 33.33%; padding: 4px; vertical-align: top;"><div style="border: 2px solid #3a9aa0; border-radius: 8px; background: #e9f5f5; padding: 9px 11px; height: 100%;"><div style="font-size: 11px; font-weight: bold; color: #1f7a80; text-align: center; margin-bottom: 5px;">AZURE OPENAI SERVICE <span style="color: #1f7a80;">6</span></div><div style="font-size: 12px; color: #33475b; line-height: 1.5;">GPT-4o / GPT-4.1 · embeddings. Chat completion &amp; function-calling decisions, reasoning over context + retrieved knowledge.</div></div></td></tr></tbody></table>

<div style="text-align: center; color: #9bb3cc; font-size: 20px; line-height: 1; margin: 3px 0;">↓</div><div style="border: 2px solid #e0a83e; border-radius: 8px; background: #fff7e8; padding: 9px 12px; text-align: center;"><div style="font-size: 12px; font-weight: bold; color: #b9770e; letter-spacing: 0.5px; margin-bottom: 3px;">OBSERVABILITY · OpenTelemetry (every step is traced)</div><div style="font-size: 12px; color: #33475b;">Traces · Metrics · Logs · AI Token Usage → OTel Collector → Azure Monitor / Application Insights</div></div><div style="font-size: 11px; color: #7a8aa0; font-style: italic; text-align: center; margin: 10px 0 0 0;">Request path: steps 1 to 6. Response path returns through the Chat Assistant API to the user (steps 7 to 8). Telemetry is captured throughout.</div></div>Figure 2 — The Semantic Kernel orchestration flow, from chat message to grounded response, with OpenTelemetry tracing every step.

## 8. Plugins, Knowledge Search &amp; Azure OpenAI

Three capabilities power the assistant's reasoning: a library of banking plugins for actions, a retrieval-augmented knowledge base for grounding, and Azure OpenAI for language understanding.

<table id="bkmrk-capability-role" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Capability</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Role in the assistant</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Plugins (Banking Capabilities)</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Safe, typed operations the assistant can call: Account, Transaction, Loan, Card, Complaint, Analytics, Customer, and Payment. Each maps to an application-layer service.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Knowledge &amp; Search (RAG)</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Retrieval-Augmented Generation over Azure AI Search (vector search) across policy documents, FAQs, statements, and guidelines, grounding responses in the bank's own content.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Azure OpenAI Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">GPT-4o / GPT-4.1 with an embeddings model provide chat completion, function calling, and response generation: the linguistic engine behind every conversation.</td></tr></tbody></table>

## 9. External Integrations &amp; Document Storage

Smart Bank does not operate in isolation. It connects to the broader banking ecosystem and stores documents durably in the cloud.

<table id="bkmrk-component-purpose-int" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Component</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Purpose</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Payment Gateway</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Processes payments and settlements.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">SMS / Email Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Delivers alerts, OTPs, and notifications.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">KYC / AML Service</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Identity verification and anti-money-laundering checks.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Credit Bureau API</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Credit scores and history for lending decisions.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Core Banking System</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Authoritative ledger and account operations.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Azure Blob Storage</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Statements, documents, KYC files, loan agreements, policies, and forms.</td></tr></tbody></table>

## 10. Observability &amp; Telemetry (OpenTelemetry)

Observability is the feedback loop that keeps the platform healthy. OpenTelemetry instruments the entire stack and pipes signals into Azure monitoring, audit logging, and alerting.

**Pipeline:** Instrumentation (traces, metrics, logs, events) → OTel Collectors → Telemetry Data → Azure Monitoring → Audit &amp; Security Logging → Alerting &amp; Notifications

<table id="bkmrk-stage-what-it-capture" style="width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 28px 0;"><tbody><tr><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">Stage</th><th style="background: #0a66c2; color: #fff; text-align: left; padding: 9px 12px; font-weight: 600; border: 1px solid #0a66c2;">What it captures</th></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Instrumentation</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Request/response traces, DB query performance, API latency, and AI token usage.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Collectors</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">The OTel Collector gathers and forwards telemetry to backends.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Azure Monitoring</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Application Insights dashboards, workbooks, alerts, and performance views.</td></tr><tr style="background: #f5f8fc;"><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Audit &amp; Security Logging</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Login attempts, RBAC changes, data-access logs, and compliance trails.</td></tr><tr><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Alerting &amp; Notifications</td><td style="padding: 8px 12px; border: 1px solid #e0e8f2;">Email, Teams/Slack, SMS alerts, and incident escalation.</td></tr></tbody></table>

## 11. End-to-End Data Flow

Bringing every layer together, a single request travels a clear, traceable path from the user interface to the AI and back, while telemetry is captured at every hop.

**Flow:** User → React UI (Dashboard / Chat) → JWT Auth → FastAPI APIs → Semantic Kernel (Orchestration) → Plugins / Functions → MySQL DB (Data Retrieval) → Azure OpenAI (Response Generation) → Response to UI → Telemetry Captured

## Conclusion

Smart Bank shows how modern AI can be woven into banking without sacrificing security or control. Role-based dashboards keep experiences tailored and safe; Semantic Kernel and Azure OpenAI turn natural language into grounded action; MySQL provides a trustworthy system of record; and OpenTelemetry ensures the whole platform is observable and auditable. Every component is a managed, cloud-native service that integrates natively with the others, eliminating the friction of stitching together disparate tools and positioning the bank to deliver intelligent service that is **fast, secure, and reliable**.

A reference architecture for intelligent, secure, and observable digital banking.