How r-g-made/chatsite works
ЧатТоэ is a web assistant for finding answers in a seeded FAQ collection. A user submits a question in the Vue chat; the frontend posts it to the FastAPI chat endpoint, which searches FAQ candidates, ranks them, and returns up to three results for the interface to display or offer as suggestions. The backend also exposes an FAQ-list endpoint and initializes its SQLite and full-text search structures at startup. The excerpts show these runtime boundaries; frontend behavior beyond the sampled chat flow and any deployment wiring is not inferred.
Main entry points: app.py Chat and FAQ API · repository.py FAQ repository · search.py Search service · db.py Full-text index
Components 14
Chat client
- Chat interface
frontend/src/App.vue - Vue entry
frontend/src/main.js
API and startup
- Chat and FAQ API
backend/app.py - API schemas
backend/schemas.py - DB setup
backend/db.py
FAQ search
- Search service
backend/search.py - Fuzzy ranker
backend/search.py - Full-text index
backend/db.py
FAQ storage
- FAQ seeder
backend/repository.py - FAQ seed data
backend/seed_faq.json - FAQ repository
backend/repository.py - FAQ model
backend/models.py - SQLite database
backend/db.py
Other components
- Chat user
Connections 18
- Chat user → Chat interface: asks question
frontend/src/App.vue - Vue entry → Chat interface: mounts
frontend/src/main.js - Chat interface → Chat and FAQ API: posts question
frontend/src/App.vue - Chat and FAQ API → API schemas: validates and shapes
backend/app.py - Chat and FAQ API → Search service: searches FAQs
backend/app.py - Chat and FAQ API → FAQ repository: lists FAQs
backend/app.py - Chat and FAQ API → DB setup: initializes database
backend/app.py - Chat and FAQ API → FAQ seeder: seeds on startup
backend/app.py - FAQ seeder → FAQ seed data: reads seed data
backend/repository.py - Search service → Fuzzy ranker: scores candidates
backend/search.py - Search service → FAQ repository: loads candidates
backend/search.py - Search service → Full-text index: gets ranked IDs
backend/search.py - FAQ repository → FAQ model: queries and creates
backend/repository.py - FAQ repository → Full-text index: gets candidate IDs
backend/repository.py - DB setup → FAQ model: creates tables for
backend/db.py - DB setup → Full-text index: sets up index
backend/db.py - Full-text index → SQLite database: queries and indexes
backend/db.py - FAQ repository → SQLite database: reads and writes
backend/repository.py