How arthavgonda/coolcommute works
CoolCommute is a cross-platform climate-aware commuting app. Its main flow restores a session and saved profile, guides users through authentication, location and travel-preference onboarding, then lets them search for and compare commute routes. The Home screen also manages profile sync, account actions and optional background location. The graph includes documented profile and route-service integrations; several UI, map and location modules are unsampled, so their internal wiring is shown only where the index or excerpts support it.
Main entry points: Home.tsx Home dashboard · App.tsx App bootstrap · profile.ts Profile sync · otpRoutes.ts Route scoring
Components 24
App experience
- App bootstrap
App.tsx - Onboarding flow
src/onboarding/Onboarding.tsx - Home dashboard
src/home/Home.tsx - Travel preferences
src/data/questions.ts
Commute planning
- Place search
src/dashboard/locationSearch.ts - Route scoring
src/dashboard/otpRoutes.ts - Route service
- Commute map
src/dashboard/CommuteMap.tsx - Platform map
src/dashboard/MapboxMap.native.tsx - Route mode markers
src/dashboard/RouteModeMarker.tsx - Background location
src/location/backgroundLocationTask.native.ts - Device location
Identity and profile
- Cognito auth
src/auth/cognito.ts - AWS Cognito
- Profile sync
src/data/profile.ts - Local persistence
src/data/localStore.ts - Profile API
- Backend failure state
src/data/backendFailure.ts
UI and platform
- Backdrop
src/components/Backdrop.tsx - Backend error screen
src/components/BackendErrorScreen.tsx - Glass surfaces
src/components/GlassSurface.ts - Lottie animations
src/components/Lottie.ts - Theme tokens
src/theme.ts
Other components
- Commuter
Connections 30
- Commuter → App bootstrap: opens
- App bootstrap → Cognito auth: restores session
App.tsx - App bootstrap → Profile sync: loads profile
App.tsx - App bootstrap → Onboarding flow: routes to
App.tsx - App bootstrap → Home dashboard: routes to
App.tsx - App bootstrap → Backdrop: renders
App.tsx - App bootstrap → Backend error screen: renders
App.tsx - App bootstrap → Backend failure state: subscribes to
App.tsx - App bootstrap → Theme tokens: reads
App.tsx - Onboarding flow → Home dashboard: completes into
- Home dashboard → Place search: searches places
src/home/Home.tsx - Home dashboard → Route scoring: requests routes
src/home/Home.tsx - Route scoring → Route service: posts route request
src/dashboard/otpRoutes.ts - Route scoring → Route service: requests fare quote
src/dashboard/otpRoutes.ts - Home dashboard → Commute map: renders
src/home/Home.tsx - Commute map → Platform map: delegates rendering
- Route scoring → Route mode markers: provides route modes
- Home dashboard → Travel preferences: reads preferences
src/home/Home.tsx - Home dashboard → Cognito auth: uses account actions
src/home/Home.tsx - Cognito auth → AWS Cognito: authenticates
src/auth/cognito.ts - Home dashboard → Profile sync: syncs profile
src/home/Home.tsx - Profile sync → Local persistence: reads and writes
src/data/profile.ts - Profile sync → Cognito auth: gets username
src/data/profile.ts - Profile sync → Profile API: calls profile API
src/data/profile.ts - Profile sync → Backend failure state: reports failures
src/data/profile.ts - Home dashboard → Background location: controls tracking
src/home/Home.tsx - Background location → Device location: requests updates
src/location/backgroundLocationTask.native.ts - Home dashboard → Lottie animations: uses animations
src/home/Home.tsx - Onboarding flow → Glass surfaces: uses glass cards
- Glass surfaces → Theme tokens: reads tokens
src/components/GlassCard.tsx