How uday2319/citywise works
CityWise turns a traveller’s preferences into a day-by-day trip plan, then presents it in a workspace for mapping and editing. The documented planning stages are live-place discovery, semantic matching, ranking, scheduling, hotel-based ordering, and meal completion. The React app also supports destination discovery, saved trips and favorites, and an always-available voice translator. The README documents these capabilities; backend route wiring and several frontend pages were not sampled, so their detailed call relationships are not asserted.
Main entry points: ml_service.py Itinerary orchestration · itineraApi.ts API client · App.tsx App routing and providers · Discover.tsx Discover and explore
Components 25
Travel app
- App routing and providers
frontend/src/App.tsx - Trip workspace
frontend/src/pages/TripView.tsx - Discover and explore
frontend/src/pages/Discover.tsx - Trips and favorites
frontend/src/pages/Trips.tsx - Voice translator
frontend/src/components/VoiceTranslator.tsx - Trip state
frontend/src/context/TripContext.tsx
Backend services
- API client
frontend/src/api/itineraApi.ts - Itinerary endpoint
backend/api/routes/itinerary.py - Discovery and info endpoints
backend/api/routes - Road routing endpoint
backend/api/routes/routing.py - Translation endpoint
backend/api/routes/translate.py - Live place services
backend/services/geo_service.py - Translation service
backend/services/translate_service.py - Weather endpoint
backend/api/routes/weather.py - Place photos endpoint
backend/api/routes/media.py
Itinerary planning
- Itinerary orchestration
backend/services/ml_service.py - Day scheduler
ml/scheduler/day_scheduler.py - Route optimization
ml/optimizer/route_optimizer.py
Recommendation engine
- Semantic matching
ml/recommender/semantic_search.py - Candidate ranking
ml/ranking/train_ranker.py - Restaurant recommendations
ml/recommender/restaurant_recommender.py
Trip utilities
- Browser storage
frontend/src/lib/storage.ts - Async itinerary task
workers/tasks.py - Database sessions
backend/core/database.py
Other components
- Traveller
Connections 26
- Traveller → App routing and providers: uses
- App routing and providers → Trip workspace: routes to
frontend/src/App.tsx - App routing and providers → Discover and explore: routes to
frontend/src/App.tsx - App routing and providers → Trips and favorites: routes to
frontend/src/App.tsx - App routing and providers → Trip state: provides state
frontend/src/App.tsx - Trip workspace → Trip state: edits
- Trip state → Browser storage: persists
- Trip workspace → API client: requests routes
- API client → Itinerary endpoint: requests plan
- API client → Discovery and info endpoints: requests places
- API client → Road routing endpoint: requests road route
- API client → Translation endpoint: requests translation
- Itinerary endpoint → Itinerary orchestration: generates plan
- Itinerary orchestration → Live place services: fetches places
backend/services/ml_service.py - Itinerary orchestration → Semantic matching: matches candidates
backend/services/ml_service.py - Itinerary orchestration → Candidate ranking: reranks candidates
backend/services/ml_service.py - Itinerary orchestration → Day scheduler: builds days
backend/services/ml_service.py - Day scheduler → Route optimization: optimizes day route
ml/scheduler/day_scheduler.py - Itinerary orchestration → Live place services: fetches meals and hotels
backend/services/ml_service.py - Itinerary orchestration → Restaurant recommendations: recommends meals
- Translation endpoint → Translation service: translates text
- Discover and explore → API client: searches places
- Discover and explore → Weather endpoint: gets forecast
- Discover and explore → Place photos endpoint: gets photos
- Async itinerary task → Itinerary orchestration: generates itinerary
workers/tasks.py - Itinerary orchestration → Database sessions: uses sessions