How sov-ereign/globetrotter-personalized-travel-planning-odoo- works
Purpose and Entry Points
Globe Trotter is a travel-planning system with a React/Vite TypeScript client and a Python API backend. The client bootstraps at src/main.tsx, composes application navigation and views in src/App.tsx, and centralizes HTTP/auth client behavior in src/utils/api.ts and src/utils/auth.ts. The backend API starts from back_rent/doc/main.py.
Frontend Application Shell
The SPA separates public presentation, authenticated dashboard, and administration views. Shared layout/navigation is implemented in src/components/Layout/PublicLayout.tsx, src/components/Layout/Header.tsx, and src/components/Layout/MobileNav.tsx; major application destinations are dashboard and admin components at src/components/Dashboard/Dashboard.tsx and src/components/Admin/AdminDashboard.tsx.
Identity and Access Boundary
Authentication includes signup, login, password changes, JWT handling, and OTP-related support. Client credential flows originate in src/components/Auth/LoginForm.tsx and src/components/Auth/SignupForm.tsx; server routes and token/security utilities are back_rent/doc/routes/auth.py, back_rent/doc/utils/jwt_handler.py, and back_rent/doc/utils/security.py. User persistence is represented by back_rent/doc/models/user.py.
Trip Planning and Itinerary Flow
Users search destinations/activities, create trips, choose activities, then construct and view itineraries. The primary UI stages are src/components/Search/CitySearch.tsx, src/components/Trips/CreateTrip.tsx, and src/components/Trips/ItineraryBuilder.tsx. API boundaries are trip, activity, and itinerary route modules: back_rent/doc/routes/trips.py, back_rent/doc/routes/activities.py, and back_rent/doc/routes/itineraries.py; their persisted domain models live in back_rent/doc/models/trip.py, back_rent/doc/models/activity.py, and back_rent/doc/models/itinerary.py.
Travel Content, Discovery, and Sharing
Cities, venues, activities, saved destinations, and public trip sharing form the discovery layer. Client views include src/components/Search/ActivitySearch.tsx, src/components/Trips/PublicSharedTrip.tsx, and src/components/Trips/SharedItineraryView.tsx. Backend resources are exposed through back_rent/doc/routes/cities.py, back_rent/doc/routes/venues.py, and back_rent/doc/routes/saved_destinations.py, backed by corresponding models such as back_rent/doc/models/city.py and back_rent/doc/models/saved_destination.py.
Booking, Budget, and Travel Utilities
The backend supports booking and budget records through back_rent/doc/routes/bookings.py, back_rent/doc/routes/budgets.py, and models back_rent/doc/models/booking.py and back_rent/doc/models/budget.py. The client surfaces budget information in BudgetView.tsx and provides currency/timezone utilities in src/components/CurrencyConverter.tsx, src/utils/currency.ts, and src/utils/timezone.ts.
Persistence and External Services
The Python backend has a database abstraction at back_rent/doc/database.py, ORM-style domain models under back_rent/doc/models/, request/response schemas under back_rent/doc/schemas/, and CRUD separation under back_rent/doc/crud/. A checked-in SQLite database exists at back_rent/globe_trotter.db; migration scripts indicate possible MySQL deployment support. Media uploads cross into Cloudinary through back_rent/doc/routes/upload.py and back_rent/doc/utils/cloudinary_handler.py. Client email functionality is isolated in src/utils/EmailJs.ts.
Main entry points: App.tsx App navigation · main.py API entry point · api.ts HTTP & auth client · trip.py Schemas, CRUD & models
Components 21
React/Vite Client
- Client bootstrap
src/main.tsx - App navigation
src/App.tsx - Public layout & nav
src/components/Layout/PublicLayout.tsx - Login & signup
src/components/Auth/LoginForm.tsx - Dashboard
src/components/Dashboard/Dashboard.tsx - Admin dashboard
src/components/Admin/AdminDashboard.tsx - Trip planning · City search, trip creation, and itinerary building.
src/components/Trips/CreateTrip.tsx - Discovery & sharing · Activity search and public/shared trip views.
src/components/Search/ActivitySearch.tsx - Budget & travel tools · Budget display plus currency and timezone support.
src/components/CurrencyConverter.tsx - HTTP & auth client
src/utils/api.ts
Python API
- API entry point
back_rent/doc/main.py - Identity API · Signup, login, password, JWT, and OTP flows.
back_rent/doc/routes/auth.py - Trip & itinerary API · Trip, activity, and itinerary resources.
back_rent/doc/routes/trips.py - Discovery API · City, venue, and saved-destination resources.
back_rent/doc/routes/cities.py - Booking & budget API
back_rent/doc/routes/bookings.py - Media upload API
back_rent/doc/routes/upload.py - Schemas, CRUD & models · Validates requests and maps API operations to persisted entities.
back_rent/doc/models/trip.py
Persistence
- Database abstraction
back_rent/doc/database.py - Globe Trotter SQLite
back_rent/globe_trotter.db
External Services
- Cloudinary
back_rent/doc/utils/cloudinary_handler.py - EmailJS
src/utils/EmailJs.ts
Connections 26
- Client bootstrap → App navigation: mounts
- App navigation → Public layout & nav: composes
- App navigation → Login & signup: routes to
- App navigation → Dashboard: routes to
- App navigation → Admin dashboard: routes to
- App navigation → Trip planning: routes to
- App navigation → Discovery & sharing: routes to
- App navigation → Budget & travel tools: routes to
- Login & signup → HTTP & auth client: auth requests
- Trip planning → HTTP & auth client: API requests
- Discovery & sharing → HTTP & auth client: API requests
- Budget & travel tools → HTTP & auth client: API requests
- HTTP & auth client → API entry point: HTTP with JWT
- App navigation → EmailJS: client email
- API entry point → Identity API: mounts routes
- API entry point → Trip & itinerary API: mounts routes
- API entry point → Discovery API: mounts routes
- API entry point → Booking & budget API: mounts routes
- API entry point → Media upload API: mounts routes
- Identity API → Schemas, CRUD & models: users
- Trip & itinerary API → Schemas, CRUD & models: trips, activities, itineraries
- Discovery API → Schemas, CRUD & models: cities & saved destinations
- Booking & budget API → Schemas, CRUD & models: bookings & budgets
- Schemas, CRUD & models → Database abstraction: persists through
- Database abstraction → Globe Trotter SQLite: uses
- Media upload API → Cloudinary: uploads media