How mohithac8109/bunkmates-v2 works
BunkMates is an Expo/React Native app for social connections, messaging and calls, shared trips, and local discovery. Users sign in, reach the tabbed home experience, and use feature screens to browse or update shared content; trip details and calls have distinct planning and real-time communication stages. Firebase provides authentication and app data, while weather uses OpenWeather. The tree and excerpts support the major feature areas, but many routes were not sampled, so their internal interactions are intentionally left unspecified.
Main entry points: firebase.ts Firebase services · TripDetails.tsx Trip details · home.tsx Home dashboard · CallContext.tsx Call coordination
Components 29
Identity and Navigation
- Sign in and signup
src/app/(auth)/login.tsx - User session
src/contexts/UserContext.tsx - Firebase services
src/lib/firebase.ts - Home dashboard
src/app/(tabs)/home.tsx - Profile and settings
src/app/profile.tsx
Social and Messaging
- Universal search
src/app/search.tsx - Search queries
src/hooks/useSearch.ts - Direct messaging
src/app/chat/[friendId].tsx - Chat list
src/app/(tabs)/chats.tsx - Group chat
src/components/group_chat/GroupChatScreen.tsx - Group chat service
src/lib/native-chats/firebaseService.ts - Notifications
src/hooks/useNotifications.ts
Trip Planning
- Trip listing
src/app/(tabs)/trips.tsx - Trip details
src/app/trips/TripDetails.tsx - Trip creation
src/components/trips/CreateTripSheet.tsx - Trip planning drawers
src/components/trip_components/ChecklistDrawer.tsx - Trip budget
src/components/trip_components/BudgetDrawer.tsx - AI trip assistance
src/hooks/useGroqAI.ts
Discovery and Weather
- Weather and AQI
src/app/(tabs)/Weather/WeatherDetailsSheet.tsx - AQI details
src/app/(tabs)/Weather/AQIDetailsSheet.tsx - Weather service
src/lib/WeatherService.ts - Place details
src/app/(tabs)/place-details.tsx
Voice and Video
- Call coordination
src/contexts/CallContext.tsx - Call screen
src/components/call/CallScreen.tsx - WebRTC signaling
src/lib/webrtcManager.ts - Audio routing
src/lib/incallManager.ts - Call notifications
src/lib/callNotifications.ts
Other components
- App user
- OpenWeather API
Connections 29
- App user → Sign in and signup: signs in
- Sign in and signup → Firebase services: authenticates
- User session → Firebase services: reads session and profile
src/contexts/UserContext.tsx - Home dashboard → User session: uses profile
src/app/(tabs)/home.tsx - Home dashboard → Firebase services: reads dashboard data
src/app/(tabs)/home.tsx - App user → Home dashboard: opens dashboard
- Universal search → Search queries: searches content
- Search queries → Firebase services: queries records
src/hooks/useSearch.ts - Direct messaging → Firebase services: exchanges messages
- Chat list → Firebase services: loads conversations
- Group chat → Group chat service: uses chat service
- Group chat service → Firebase services: reads and writes
src/lib/native-chats/firebaseService.ts - Notifications → Firebase services: reads notifications
src/hooks/useNotifications.ts - Trip listing → Trip details: opens trip
- Trip creation → Firebase services: creates trips
- Trip details → Firebase services: updates trip records
src/app/trips/TripDetails.tsx - Trip details → Trip planning drawers: opens planning tools
src/app/trips/TripDetails.tsx - Trip details → Trip budget: uses budget view
src/app/trips/TripDetails.tsx - Trip details → AI trip assistance: requests trip suggestions
src/app/trips/TripDetails.tsx - Home dashboard → Weather and AQI: opens weather details
src/app/(tabs)/home.tsx - Home dashboard → AQI details: opens air quality
src/app/(tabs)/home.tsx - Weather and AQI → Weather service: loads forecast
src/app/(tabs)/Weather/WeatherDetailsSheet.tsx - Weather service → OpenWeather API: fetches conditions
src/lib/WeatherService.ts - App user → Place details: browses places
- Call screen → Call coordination: controls call
src/components/call/CallScreen.tsx - Call coordination → WebRTC signaling: starts signaling
src/contexts/CallContext.tsx - WebRTC signaling → Firebase services: exchanges signaling data
src/lib/webrtcManager.ts - Call coordination → Audio routing: manages call audio
src/contexts/CallContext.tsx - Call coordination → Call notifications: sends call notifications
src/contexts/CallContext.tsx