How wh0ami-init/sikkim_tourism_department--ai_chatbot works
This is a Sikkim Tourism Department visitor-information platform: visitors browse destinations and advisories or ask questions, while staff manage destination records and official circulars. The documented chat path streams answers grounded in department data; the backend also supports image-assisted questions and circular ingestion. The graph preserves these capabilities and the MySQL-to-vector-index layer. Some subsystem links rely on README statements or the SOURCE INDEX because their implementation was not excerpted; those limits are reflected in the evidence paths.
Main entry points: main.py FastAPI application · App.tsx React application · chat.py Chat endpoints · rag_chain.py Retrieval and generation
Components 28
Visitor experience
- React application
frontend/src/App.tsx - Home and explore
frontend/src/pages/home.tsx - Destination views
frontend/src/pages/destinations.tsx - Chat interface
frontend/src/components/chat.tsx - Live weather
frontend/src/hooks/use-weather.ts - API client
frontend/src/lib/api.ts
Application API
- FastAPI application
backend/main.py - Chat endpoints
backend/app/routers/chat.py - Destination endpoints
backend/app/routers/destinations.py - Domain schemas
backend/app/models/schemas.py
Official knowledge
- Repository interface
backend/app/database/base.py - MySQL repository
backend/app/database/mysql_repo.py - Vector store
backend/app/services/vectorstore.py - Destination indexing
backend/app/startup.py - Retrieval and generation
backend/app/services/rag_chain.py - Circular ingestion
backend/app/services/circular_scraper.py - Agency ingestion
backend/app/services/travel_agency_scraper.py
Administration
- Admin console
frontend/src/pages/admin.tsx - Admin security
frontend/src/pages/admin-security.tsx - Admin authorization
backend/app/dependencies.py - Password security
backend/app/services/admin_auth.py - Signed sessions
backend/app/services/admin_session.py
Other components
- Visitor
- Department staff
- Gemini AI
- Groq language model
- Qdrant
- Department website
Connections 34
- Visitor → React application: uses
- React application → Home and explore: routes to
frontend/src/App.tsx - React application → Destination views: routes to
frontend/src/App.tsx - React application → Admin console: routes to
frontend/src/App.tsx - React application → Admin security: routes to
frontend/src/App.tsx - Home and explore → Chat interface: presents
- Home and explore → Live weather: presents
- React application → API client: uses
- API client → FastAPI application: requests
- FastAPI application → Chat endpoints: registers
backend/main.py - FastAPI application → Destination endpoints: registers
backend/main.py - Chat endpoints → Retrieval and generation: invokes
backend/main.py - Chat endpoints → Repository interface: reads and writes
- Destination endpoints → Repository interface: reads
backend/app/routers/destinations.py - Repository interface → MySQL repository: implemented by
backend/app/database/mysql_repo.py - Destination indexing → Repository interface: loads destinations
backend/app/startup.py - Destination indexing → Vector store: indexes snapshot
backend/app/startup.py - Retrieval and generation → Vector store: retrieves context
backend/app/services/rag_chain.py - Retrieval and generation → Gemini AI: embeds and analyzes images
- Retrieval and generation → Groq language model: generates responses
- Vector store → Qdrant: stores vectors
- FastAPI application → Destination indexing: initializes
backend/main.py - Department staff → Admin console: maintains records
- Admin console → FastAPI application: admin requests
- Admin security → FastAPI application: security requests
- FastAPI application → Admin authorization: uses guards
backend/main.py - Admin authorization → Password security: verifies passwords
backend/app/dependencies.py - Admin authorization → Signed sessions: checks sessions
backend/app/dependencies.py - FastAPI application → Circular ingestion: schedules ingestion
backend/main.py - Circular ingestion → Department website: scrapes notices
- Department staff → FastAPI application: uploads circulars
backend/main.py - FastAPI application → Agency ingestion: runs ingestion
backend/main.py - Chat endpoints → Domain schemas: uses models
- Destination endpoints → Domain schemas: returns models
backend/app/routers/destinations.py