How rapmraran/kel works
KelanaAI is a travel-planning application with authenticated trip management and AI travel assistance. The user workflow runs from the frontend to the FastAPI endpoints: users can generate and manage saved trips, or ask a conversational or knowledge-base-backed assistant. The graph also captures authentication, persistence, and trip-budget logic. Backend routes and service calls are evidenced in sampled source; some frontend-to-backend and unsampled subsystem links are documented only by the available UI or are left unconnected where evidence is insufficient.
Main entry points: main.py FastAPI routes · services API clients · auth_service.py Authentication · kb_service.py Knowledge retrieval
Components 19
Web application
- Next.js pages
frontend/app - Trip dashboard
frontend/components/TripDashboard.tsx - Trip card
frontend/components/TripCard.tsx - Trip forms
frontend/components - Chat dashboard
frontend/components/ChatDashboard.tsx - Auth pages
frontend/app/login/page.tsx - API clients
frontend/services
Backend API
- FastAPI routes
backend/main.py
Trip planning
- Trip rules
backend/services/trip_service.py - Trip operations
backend/services/trip_service.py
AI assistance
- Knowledge retrieval
backend/services/kb_service.py - Base model and chat
backend/services/bedrock_service.py
Identity and data
- Authentication
backend/services/auth_service.py - SQLAlchemy database
backend/database.py - User records
backend/models/user.py - Trip records
backend/models/trip.py - Conversation records
backend/models/conversation.py
Other components
- Traveler
- AWS Bedrock
Connections 21
- Traveler → Next.js pages: uses
- Trip dashboard → Trip card: renders
frontend/components/TripDashboard.tsx - Traveler → Trip dashboard: browses trips
- Traveler → Chat dashboard: chats
- Next.js pages → API clients: uses
- API clients → FastAPI routes: HTTP requests
- Trip forms → API clients: submits trip data
- Chat dashboard → API clients: sends messages
- Auth pages → API clients: auth requests
- FastAPI routes → Trip rules: calculates trip details
backend/main.py - FastAPI routes → Trip operations: manages trips
backend/main.py - FastAPI routes → Knowledge retrieval: retrieves answers
backend/main.py - FastAPI routes → Base model and chat: generates base answers
backend/main.py - FastAPI routes → Authentication: authenticates users
backend/main.py - FastAPI routes → SQLAlchemy database: queries and writes
backend/main.py - Authentication → SQLAlchemy database: opens sessions
backend/services/auth_service.py - Authentication → User records: queries users
backend/services/auth_service.py - FastAPI routes → Trip records: reads and writes
backend/main.py - FastAPI routes → Conversation records: reads and writes
backend/main.py - Knowledge retrieval → AWS Bedrock: retrieves knowledge
- Base model and chat → Knowledge retrieval: serves retrieval