How selawi7/jetsetgo works
JetSetGo is a travel-planning web application: users browse destinations, view destination details, get recommendations, and search flights and hotels; account registration, login, and profile preferences support personalized use. The React client routes requests through its API service to an Express server, while travel and place searches also use external providers. The graph reflects shown imports, calls, and route mounts; several UI-to-API connections and unsampled backend details are omitted rather than inferred.
Main entry points: App.jsx App router · server.js Express server · recommendations.js Recommendation routes · DestinationDetails.jsx Destination details
Components 28
Travel client
- App router
client/src/App.jsx - Travel pages
client/src/pages - Destination details
client/src/components/DestinationDetails.jsx - Travel search
client/src/components/TravelSearch.jsx - Auth state
client/src/store/slices/authSlice.js - Destination state
client/src/store/slices/destinationSlice.js - Recommendation state
client/src/store/slices/recommendationSlice.js
Client services
- API client
client/src/services/apiService.js - Destination service
client/src/services/destinationService.js - Flight and hotel service
client/src/services/travelService.js - Places service
client/src/services/placesService.js - Weather service
client/src/services/weatherService.js
API server
- Express server
server/src/server.js - Authentication routes
server/src/routes/auth.js - Destination routes
server/src/routes/destinations.js - Recommendation routes
server/src/routes/recommendations.js - Accommodation routes
server/src/routes/accommodations.js - Activity routes
server/src/routes/activities.js - JWT middleware
server/src/middleware/auth.js - Photo lookup
server/src/utils/unsplash.js
Domain data
- User model
server/src/models/User.js - Destination model
server/src/models/Destination.js
Other components
- Traveler
- MongoDB
- Booking.com API
- Google Places
- OpenWeather
- OpenAI
Connections 29
- Traveler → App router: uses
client/src/App.jsx - App router → Travel pages: routes to
client/src/App.jsx - App router → Destination details: routes to
client/src/App.jsx - App router → Travel search: routes to
client/src/App.jsx - App router → Auth state: dispatches
client/src/App.jsx - Auth state → API client: requests user data
client/src/store/slices/authSlice.js - API client → Express server: sends API requests
client/src/services/apiService.js - Express server → Authentication routes: mounts
server/src/server.js - Express server → Destination routes: mounts
server/src/server.js - Express server → Recommendation routes: mounts
server/src/server.js - Express server → Accommodation routes: mounts
server/src/server.js - Express server → Activity routes: mounts
server/src/server.js - Authentication routes → User model: reads and saves
server/src/routes/auth.js - JWT middleware → User model: loads user
server/src/middleware/auth.js - Destination routes → Destination model: queries
server/src/routes/destinations.js - Recommendation routes → JWT middleware: protects routes
server/src/routes/recommendations.js - Recommendation routes → Destination model: queries
server/src/routes/recommendations.js - Recommendation routes → OpenAI: requests suggestions
server/src/routes/recommendations.js - Recommendation routes → Photo lookup: gets city photos
server/src/routes/recommendations.js - Express server → MongoDB: connects
server/src/server.js - Travel search → Flight and hotel service: searches flights and hotels
client/src/components/TravelSearch.jsx - Flight and hotel service → Booking.com API: searches
client/src/services/travelService.js - Destination details → Places service: loads place information
client/src/components/DestinationDetails.jsx - Destination details → Weather service: loads weather
client/src/components/DestinationDetails.jsx - Places service → Google Places: searches places
client/src/services/placesService.js - Weather service → OpenWeather: requests forecasts
- API client → Destination service: shares API configuration
- App router → Destination state: provides shared state
- App router → Recommendation state: provides shared state