How vijayarawat/ai_mentor works
AI Personal Mentor & Leadership Coach combines account access, retrieval-grounded coaching conversations, and dated chat history with session continuation and summaries. The frontend selects authentication or history/chat views; its components call the FastAPI backend, which handles requests and persists conversation messages. The README documents Gemini and FAISS retrieval, while the excerpts show the backend’s model/index imports and prompt generation. Some backend route implementations and retrieval details are omitted, so those internal links are not expanded beyond supported evidence.
Main entry points: chatbot.py FastAPI coaching API · App.jsx Application router · config.js API endpoint config · Login.jsx Login
Components 16
Web application
- Application router
frontend/src/App.jsx - Login
frontend/src/Login.jsx - Registration
frontend/src/Register.jsx - Coaching chat
frontend/src/ChatAuthenticated.jsx - Chat history
frontend/src/ChatHistory.jsx - Name-based chat
frontend/src/chat.jsx - API endpoint config
frontend/src/config.js
API and coaching
- FastAPI coaching API
backend/chatbot.py
Knowledge retrieval
- Embedding generation
backend/enbedding_generation.py - Curated knowledge
backend/raw_data - FAISS vector index
backend/faiss_index.bin
Session and accounts
- Accounts and chat store
backend/db.py - Redis history cache
backend/redis_client.py
Other components
- Mentor user
- Google Gemini
- Redis
Connections 22
- Mentor user → Application router: uses
- Application router → Login: shows
frontend/src/App.jsx - Application router → Registration: shows
frontend/src/App.jsx - Application router → Chat history: shows
frontend/src/App.jsx - Application router → Coaching chat: shows
frontend/src/App.jsx - Login → API endpoint config: reads URL
frontend/src/Login.jsx - Registration → API endpoint config: reads URL
frontend/src/Register.jsx - Coaching chat → API endpoint config: reads URL
frontend/src/ChatAuthenticated.jsx - Chat history → API endpoint config: reads URL
frontend/src/ChatHistory.jsx - Login → FastAPI coaching API: posts login
frontend/src/Login.jsx - Registration → FastAPI coaching API: posts registration
frontend/src/Register.jsx - Coaching chat → FastAPI coaching API: posts messages
frontend/src/ChatAuthenticated.jsx - Chat history → FastAPI coaching API: requests history and summary
frontend/src/ChatHistory.jsx - Name-based chat → API endpoint config: reads URL
frontend/src/chat.jsx - Name-based chat → FastAPI coaching API: posts messages
frontend/src/chat.jsx - FastAPI coaching API → Accounts and chat store: auth and history calls
backend/chatbot.py - FastAPI coaching API → Redis history cache: saves messages
backend/chatbot.py - Redis history cache → Redis: reads and writes
backend/redis_client.py - FastAPI coaching API → Google Gemini: generates responses
README.md - FastAPI coaching API → FAISS vector index: retrieves context
README.md - Embedding generation → Curated knowledge: embeds sources
- Embedding generation → FAISS vector index: builds index