How hari-vignesh214/personal-chatbot works
This is a small Flask chatbot: the browser submits messages and optional files, the backend restores conversation context, calls Gemini, and saves the reply for later turns. Users can reload history or clear memory. File extraction and history-to-model formatting are distinct backend stages; persistent state is a local JSON file. The map follows the sampled backend and JavaScript plus README-documented storage and UI behavior; template and styling internals were not sampled.
Main entry points: app.py Flask routes · index.html Chat page · script.js Chat interactions · style.css Dark-mode styling
Components 10
Chat interface
- Chat page
templates/index.html - Chat interactions
static/script.js - Dark-mode styling
static/style.css
Chat backend
- Flask routes
app.py - Attachment extraction
app.py - History formatting
app.py
Conversation state
- JSON conversation memory
Other components
- Chat user
- Browser
- Gemini API
Connections 12
- Chat user → Browser: uses
README.md - Browser → Chat page: opens
README.md - Chat page → Chat interactions: hosts
- Chat interactions → Flask routes: sends chat requests
static/script.js - Flask routes → Chat page: renders
app.py - Flask routes → Attachment extraction: extracts uploads
app.py - Flask routes → JSON conversation memory: loads and saves
app.py - Flask routes → History formatting: formats history
app.py - History formatting → Gemini API: provides context
app.py - Flask routes → Gemini API: requests reply
app.py - Chat interactions → Flask routes: loads or clears memory
static/script.js - Dark-mode styling → Chat page: styles