How jehbath/al-musaid-2.0 works
Al-Musaid 2.0 is an Arabic banking assistant with chat, account-aware banking tools, general banking answers, location search, exchange rates, and authenticated or guest conversations. The main workflow runs from the React chat through the API to the FastAPI chat route and Assistant, which interprets requests, consults memory, and can use Gemini, RAG, or MCP tools before returning a response. The graph also includes authentication, conversation history, and UI components. Some MCP server dispatch details and unsampled capabilities are documented but not verified in excerpts.
Main entry points: App.jsx Chat interface · main.py FastAPI routes · assistant.py Request orchestrator · mcp_client.py MCP tool manager
Components 24
Chat interface
- Chat interface
frontend/src/App.jsx - Login modal
frontend/src/AuthModal.jsx - Message rendering
frontend/src/FormattedMessage.jsx - Location cards
frontend/src/LocationCard.jsx - Confirm dialog
frontend/src/ConfirmDialog.jsx - Alternate interface
frontend/src/improvement/app2.jsx - HTTP client
frontend/src/services/api.js
API and identity
- FastAPI routes
main.py - Login endpoint
application/auth.py - JWT validation
application/dependencies.py - Password and tokens
application/security.py - Conversation routes
application/conversations.py
Assistant runtime
- Request orchestrator
application/assistant.py - Intent and response
application/gemini_client.py - Conversation memory
application/memory/memory_manager.py
Banking data
- Bank database
database/database.py
Domain tools
- Banking knowledge search
application/rag.py - FAQ knowledge base
Knowledge_base/banking_faq.md - MCP tool manager
application/mcp_client.py - Core banking tools
mcp_servers/core_banking/server.py - Currency tools
mcp_servers/currency/server.py - Branch and ATM tools
mcp_servers/location/server.py
Other components
- User
- Google Gemini
Connections 27
- User → Chat interface: sends messages
frontend/src/App.jsx - Chat interface → HTTP client: sends chat
frontend/src/App.jsx - HTTP client → FastAPI routes: calls endpoints
frontend/src/services/api.js - Chat interface → Login modal: opens login
frontend/src/App.jsx - Login modal → HTTP client: requests login
frontend/src/AuthModal.jsx - Chat interface → Message rendering: renders replies
frontend/src/App.jsx - Chat interface → Location cards: renders locations
frontend/src/App.jsx - FastAPI routes → Login endpoint: registers routes
main.py - FastAPI routes → JWT validation: validates chat identity
main.py - FastAPI routes → Conversation routes: registers routes
main.py - FastAPI routes → Request orchestrator: processes chat
main.py - Login endpoint → Bank database: looks up user
application/auth.py - Login endpoint → Password and tokens: verifies password
application/auth.py - JWT validation → Bank database: loads user
application/dependencies.py - JWT validation → Password and tokens: uses token settings
application/dependencies.py - Request orchestrator → Intent and response: requests decisions
application/assistant.py - Intent and response → Google Gemini: generates responses
- Request orchestrator → MCP tool manager: dispatches tools
application/assistant.py - Request orchestrator → Banking knowledge search: searches knowledge
application/assistant.py - Request orchestrator → Conversation memory: loads conversation state
application/assistant.py - Conversation routes → Conversation memory: uses conversation store
application/conversations.py - Banking knowledge search → FAQ knowledge base: searches FAQ
- MCP tool manager → Core banking tools: dispatches banking tools
- MCP tool manager → Currency tools: dispatches currency tools
- MCP tool manager → Branch and ATM tools: dispatches location tools
- Core banking tools → Bank database: reads banking data
mcp_servers/core_banking/server.py - Branch and ATM tools → Bank database: reads locations
mcp_servers/location/server.py