How daisynbn/tquest works
TQuest is an Expo app that layers collectible-card gameplay onto MBTA rides. The rider-facing flow centers on the home screen and trip tracker: transit data and trip planning support a ride, while ride check-ins can lead to stamp pulls, stories, and collection progress. Separate screens provide station and art views, rewards, and train-card duels. The graph includes the major transit, collection, duel, and account/theme layers. Evidence is limited to the README and sampled/indexed references; unsampled screen behavior and several integrations are not asserted.
Main entry points: [matchId].tsx Duel match · index.tsx Ride home · auth.tsx Authentication · game.tsx Game state
Components 26
Transit and rides
- Ride home
src/app/(tabs)/index.tsx - Trip tracker
src/hooks/useTrip.ts - Trip planning
src/lib/linePlan.ts - MBTA client
src/api/mbta.ts - Lines and stations
src/data/lines.ts - Station catalog
src/data/stations.ts - Station details
src/app/station/[id].tsx
Questie and collection
- Stamp pull
src/components/PullModal.tsx - Questie stories
src/api/questie.ts - Stamp cards
src/components/StampCard.tsx - Offline content
src/data/offline.ts - Rewards screen
src/app/(tabs)/rewards.tsx - Station art
src/app/art/[id].tsx
Card duels
- Duel match
src/app/duel/[matchId].tsx - Matchmaking
src/duel/match/useMatchmaking.ts - Duel interface
src/duel/ui/ClashArena.tsx - Duel transport
src/features/duel/transport.ts - Bot transport
src/features/duel/botTransport.ts - Realtime duel
src/duel/supabaseTransport.ts
Account and app
- Authentication
src/state/auth.tsx - Game state
src/state/game.tsx - Supabase client
src/lib/supabase.ts - Feedback settings
src/state/feedback.tsx - Theme provider
src/theme/ThemeContext.tsx - Profile screen
src/app/(tabs)/you.tsx
Other components
- Rider
Connections 28
- Rider → Ride home: opens
- Ride home → Trip tracker: tracks trip
src/app/(tabs)/index.tsx - Trip tracker → Trip planning: ticks plan
src/hooks/useTrip.ts - Trip planning → Lines and stations: uses routes
src/lib/linePlan.ts - Trip planning → Station catalog: looks up stops
src/lib/linePlan.ts - Trip tracker → MBTA client: fetches arrivals
src/hooks/useTrip.ts - MBTA client → Station catalog: maps stops
src/api/mbta.ts - Ride home → Station details: links stations
- Ride home → Stamp pull: opens pull
src/app/(tabs)/index.tsx - Stamp pull → Questie stories: requests story
src/components/PullModal.tsx - Stamp pull → Stamp cards: renders card
src/components/PullModal.tsx - Questie stories → Offline content: uses fallback
src/api/questie.ts - Rewards screen → Game state: reads collection
- Station art → Game state: records art
- Duel match → Matchmaking: starts matching
- Duel match → Duel interface: renders duel
- Duel match → Duel transport: selects transport
src/app/duel/[matchId].tsx - Duel transport → Bot transport: implemented by
src/features/duel/botTransport.ts - Duel match → Realtime duel: uses realtime
src/app/duel/[matchId].tsx - Realtime duel → Supabase client: uses client
src/duel/supabaseTransport.ts - Duel match → Authentication: reads rider
src/app/duel/[matchId].tsx - Duel match → Game state: uses cards
src/app/duel/[matchId].tsx - Authentication → Supabase client: auth and profiles
src/state/auth.tsx - Game state → Supabase client: syncs game data
src/state/game.tsx - Game state → Authentication: uses session
src/state/game.tsx - Authentication → Feedback settings: syncs preferences
src/state/auth.tsx - Profile screen → Authentication: manages profile
- Ride home → Theme provider: uses theme
src/app/(tabs)/index.tsx