How pirathee587/travelhub works
TravelHub is a multi-role travel booking and management platform: tourists discover and book trips, while agencies, hotel owners, and administrators manage listings and operations. The React application routes users to a Spring Boot REST API; its domain services persist platform data in PostgreSQL. A separate FastAPI chatbot provides RAG-based travel assistance and syncs backend data. The graph preserves the README’s major product areas; detailed links are limited to sampled source or documented architecture, so unsampled domain relationships are not inferred.
Main entry points: controller REST API controllers · App.tsx React application · ReviewService.java Review management · AuthService.java Authentication
Components 20
User Experience
- React application
frontend/src/App.tsx - Role routes
frontend/src/routes - Authentication UI
frontend/src/auth
Travel Operations
- Review endpoints
backend/src/main/java/com/travelhub/backend/controller/ReviewController.java - Review management
backend/src/main/java/com/travelhub/backend/service/ReviewService.java - Review persistence
backend/src/main/java/com/travelhub/backend/repository/ReviewRepository.java - Image uploads
backend/src/main/java/com/travelhub/backend/service/ImageUploadService.java - Agency review replies
backend/src/main/java/com/travelhub/backend/service/AgentReviewService.java - Travel and role services
backend/src/main/java/com/travelhub/backend/service
Platform Services
- REST API controllers
backend/src/main/java/com/travelhub/backend/controller - Authentication
backend/src/main/java/com/travelhub/backend/service/AuthService.java - Email delivery
backend/src/main/java/com/travelhub/backend/service/EmailService.java - Domain entities and repositories
backend/src/main/java/com/travelhub/backend/entity
AI Assistant
- Chatbot service
chatbot-service/main.py - Backend data sync
chatbot-service/data_sync.py
Other components
- Platform users
- PostgreSQL
- Groq LLM
- Supabase storage
- PayHere gateway
Connections 20
- Platform users → React application: uses
- React application → Role routes: routes to
frontend/src/App.tsx - Role routes → Authentication UI: routes to
frontend/src/routes/TouristRoutes.tsx - React application → REST API controllers: REST requests
- React application → Chatbot service: requests assistance
- REST API controllers → Authentication: delegates auth
- Authentication → Email delivery: sends messages
backend/src/main/java/com/travelhub/backend/service/AuthService.java - Authentication → Domain entities and repositories: reads and writes users
backend/src/main/java/com/travelhub/backend/service/AuthService.java - Review endpoints → Review management: delegates reviews
backend/src/main/java/com/travelhub/backend/controller/ReviewController.java - Review management → Review persistence: reads and writes
backend/src/main/java/com/travelhub/backend/service/ReviewService.java - Review management → Image uploads: uploads images
backend/src/main/java/com/travelhub/backend/service/ReviewService.java - Agency review replies → Review persistence: reads and updates
backend/src/main/java/com/travelhub/backend/service/AgentReviewService.java - REST API controllers → Travel and role services: dispatches requests
backend/src/main/java/com/travelhub/backend/controller/ReviewController.java - Travel and role services → Domain entities and repositories: accesses records
backend/src/main/java/com/travelhub/backend/service/ReviewService.java - Domain entities and repositories → PostgreSQL: persists data
- Chatbot service → Backend data sync: uses sync module
chatbot-service/main.py - Chatbot service → Groq LLM: calls LLM
- Backend data sync → REST API controllers: syncs backend data
- Image uploads → Supabase storage: stores images
- REST API controllers → PayHere gateway: integrates payments