How ansukhan164-rgb/nexus-ai-chatbot works
NEXUS is a browser-based chatbot backed by Flask and Gemini. A user enters a prompt in the interface; the frontend sends it with recent conversation history to the chat endpoint, which delegates generation to the AI service and returns the reply for display and local history. Separate health reporting exposes model configuration. The README also describes responsive presentation, themes, and context-aware chat; voice input is visible in the sampled frontend. Unsampled template and styling details are represented only at their tree paths, so their internal behavior is not inferred.
Main entry points: script.js Chat interface · chat_routes.py Chat endpoint · __init__.py App factory · ai_service.py AI service
Components 13
Chat interface
- Chat interface
static/js/script.js - Chat page
templates/index.html - Responsive styling
static/css/style.css
Flask application
- App factory
app/__init__.py - Chat endpoint
app/routes/chat_routes.py - Health endpoint
app/routes/system_routes.py
AI integration
- AI service
app/services/ai_service.py - Gemini API
Configuration and status
- App configuration
app/config.py
Other components
- Chat user
- Speech recognition
- Local storage
- Environment variables
Connections 18
- Chat user → Chat interface: enters prompts
static/js/script.js - Chat interface → Chat endpoint: posts message
static/js/script.js - Chat endpoint → AI service: requests response
app/routes/chat_routes.py - AI service → Gemini API: generates reply
app/services/ai_service.py - Chat endpoint → Chat interface: returns reply
app/routes/chat_routes.py - Chat interface → Local storage: stores history
static/js/script.js - Local storage → Chat interface: loads history
static/js/script.js - Chat user → Speech recognition: speaks prompt
- Speech recognition → Chat interface: provides speech input
static/js/script.js - Chat interface → Chat page: uses page
- Chat page → Responsive styling: uses styles
- App factory → Chat endpoint: registers route
app/__init__.py - App factory → Health endpoint: registers route
app/__init__.py - App factory → Chat page: renders page
app/__init__.py - Health endpoint → App configuration: checks settings
app/routes/system_routes.py - AI service → App configuration: reads model settings
app/services/ai_service.py - App configuration → Environment variables: loads variables
app/config.py - Chat interface → Health endpoint: checks status
static/js/script.js