How usermangcut-ai/hotelchatbot works
Shanghai Resort is a Vietnamese hotel-resort chatbot and operations portal. Guests can ask grounded questions, check availability, and request a booking form; the booking is recorded only after they confirm in the UI. Staying guests can submit restaurant/spa requests and support requests, while staff process requests and admins manage bookings and accounts. The graph combines README-described capabilities with sampled wiring; some route and domain details are documented but their implementations were not sampled, so uncertain internal calls are omitted.
Main entry points: main.py FastAPI app · App.tsx Web app · agent.py Agent runtime · db.py Hotel database
Components 34
Guest interface
- Web app
frontend/src/App.tsx - Chat home
frontend/src/pages/Home.tsx - Booking page
frontend/src/pages/BookingPage.tsx - Service form
frontend/src/pages/ServiceRequestPage.tsx - Guest account
frontend/src/pages/GuestAccountPage.tsx - Staff queue
frontend/src/pages/StaffPage.tsx - Admin console
frontend/src/pages/AdminPage.tsx - API client
frontend/src/api.ts
HTTP and access
- FastAPI app
api/main.py - Chat route
api/routes/chat.py - Booking routes
api/routes/bookings.py - Service route
api/routes/service_requests.py - Auth routes
api/routes/auth.py - Admin routes
api/routes/admin.py - Staff routes
api/routes/staff.py - Guest routes
api/routes/guest.py - Session access
api/auth.py
Chat agent
- Agent runtime
agent/agent.py - Guardrail
agent/guardrail.py - Conversation memory
agent/memory.py - Agent tools
agent/tools.py - Resort knowledge
agent/knowledge.py - Prompt builder
agent/prompts.py - Photo selection
agent/photos.py - Chat trace
agent/trace.py - LLM client
agent/llm_client.py
Resort operations
- Booking and account management
api/routes/admin.py - Request handling
api/routes/staff.py - Guest support
api/routes/guest.py
Data and providers
- Hotel database
agent/db.py
Other components
- Guest
- Staff user
- Administrator
- LLM provider
Connections 46
- Guest → Web app: uses
- Staff user → Web app: uses
- Administrator → Web app: uses
- Web app → Chat home: routes to
- Web app → Booking page: routes to
- Web app → Service form: routes to
- Web app → Guest account: routes to
- Web app → Staff queue: routes to
- Web app → Admin console: routes to
- Chat home → API client: requests
- Booking page → API client: requests
- Service form → API client: submits
- Guest account → API client: requests
- Staff queue → API client: requests
- Admin console → API client: requests
- API client → FastAPI app: calls API
- FastAPI app → Chat route: dispatches
- FastAPI app → Booking routes: dispatches
- FastAPI app → Service route: dispatches
- FastAPI app → Auth routes: dispatches
- FastAPI app → Admin routes: dispatches
- FastAPI app → Staff routes: dispatches
- FastAPI app → Guest routes: dispatches
- Chat route → Agent runtime: invokes
- Agent runtime → Guardrail: checks input
- Agent runtime → Conversation memory: loads context
- Agent runtime → Prompt builder: uses prompt
- Agent runtime → LLM client: requests completion
- LLM client → LLM provider: sends messages
- Agent runtime → Agent tools: dispatches calls
- Agent tools → Resort knowledge: looks up facts
- Agent tools → Hotel database: checks availability
- Agent tools → Photo selection: selects imagery
- Agent runtime → Chat trace: records turn
- Booking routes → Hotel database: confirms booking
- Service route → Session access: requires guest role
- Auth routes → Hotel database: reads/writes sessions
- Session access → Hotel database: checks session
- Admin routes → Hotel database: manages records
- Staff routes → Hotel database: updates requests
- Guest routes → Hotel database: reads guest data
- Admin routes → Booking and account management: serves
- Staff routes → Request handling: serves
- Guest routes → Guest support: serves
- Service route → Hotel database: creates request
- FastAPI app → Photo selection: serves images