How shifanhusen/innovitech_ai works
This is a web-based AI assistant: a browser chat workflow sends messages through the React UI and Nginx to FastAPI, which combines conversation history with optional web search or scraping context, builds a prompt, calls Ollama, and stores the exchange in Redis. The API also exposes session reset/history and health endpoints. The README documents the deployment topology; sampled source supports the chat, search, scraping, memory, and inference wiring, but not the detailed frontend-to-Nginx configuration.
Main entry points: routes_chat.py Chat endpoints · default.conf Nginx proxy · main.py FastAPI app · Chat.tsx Chat UI
Components 17
Chat interface
- Chat UI
frontend/src/components/Chat.tsx - React app
frontend/src/App.tsx - React entry
frontend/src/main.tsx
API orchestration
- FastAPI app
backend/app/main.py - Chat endpoints
backend/app/api/routes_chat.py - Health endpoint
backend/app/api/routes_health.py
Assistant services
- Web search
backend/app/services/search_service.py - Page scraping
backend/app/services/scrape_service.py - Prompt builder
backend/app/utils/prompt_builder.py - Inference client
backend/app/services/ollama_service.py
Session state
- Memory service
backend/app/services/memory_service.py - Redis sessions
Edge delivery
- Nginx proxy
nginx/conf.d/default.conf
Other components
- Browser user
- DuckDuckGo
- Web pages
- Ollama model
Connections 17
- Browser user → Nginx proxy: uses
- Nginx proxy → React entry: serves UI
- React entry → React app: renders
- React app → Chat UI: renders
- Chat UI → Nginx proxy: sends chat
- Nginx proxy → FastAPI app: proxies API
- FastAPI app → Chat endpoints: mounts routes
- FastAPI app → Health endpoint: mounts routes
- Chat endpoints → Memory service: reads/writes
- Memory service → Redis sessions: stores history
- Chat endpoints → Web search: searches when needed
- Web search → DuckDuckGo: queries
- Chat endpoints → Page scraping: scrapes on request
- Page scraping → Web pages: fetches pages
- Chat endpoints → Prompt builder: builds prompt
- Chat endpoints → Inference client: requests inference
- Inference client → Ollama model: generates reply