How princeraj-in/city-helpline works
City Helpline is a student-focused local-services platform. The main journey is choosing or detecting a city, discovering and filtering housing and other student services, then viewing a listing; users can also sign in to save listings or contribute services. Separate capabilities include budget planning, peer-to-peer sales, roommate matching, emergency guidance, AI assistance, and role-based administration. The graph uses README descriptions for major capabilities and sampled code for location syncing, image uploads, and AI requests; unsampled feature wiring is not inferred.
Main entry points: App.tsx App routing · BudgetCalculator.tsx Budget estimator · aiChatService.ts AI assistant · LocationContext.tsx Location state
Components 24
Student experience
- App routing
src/App.tsx - Service discovery
src/pages/Search.tsx - Listing details
src/pages/ListingDetails.tsx - Service listings
src/pages/AddListing.tsx - Budget estimator
src/pages/BudgetCalculator.tsx - Student marketplace
src/pages/Marketplace.tsx - Sell item
src/pages/SellItem.tsx - Roommate finder
src/pages/RoommatesPage.tsx - AI assistant
src/services/aiChatService.ts - AI response
src/components/ai/AiMessageRenderer.tsx
Identity and location
- Authentication state
src/contexts/AuthContext.tsx - Location state
src/contexts/LocationContext.tsx - Geolocation tools
src/lib/locationService.ts
Student services
- Roommate data service
src/lib/roommateService.ts - City benchmarks
src/lib/budgetBenchmarks.ts
Platform operations
- Image upload
src/lib/storage.ts - Admin console
src/pages/AdminDashboard.tsx - Chat API
server.ts
External services
- Firebase SDK
src/lib/firebase.ts - Firestore
- Firebase Auth
- Cloudinary CDN
- Gemini AI
Other components
- Student
Connections 29
- Student → App routing: opens
- App routing → Service discovery: routes to
- App routing → Listing details: routes to
- App routing → Budget estimator: routes to
- App routing → Student marketplace: routes to
- App routing → Roommate finder: routes to
- App routing → Admin console: routes to
- Student → Location state: sets location
- Location state → Geolocation tools: requests coordinates
- Location state → Firebase SDK: updates profile
- Authentication state → Firebase SDK: uses SDK
- Firebase SDK → Firebase Auth: authenticates
- Service discovery → Firestore: queries listings
- Listing details → Firestore: reads listing
- Service listings → Firestore: writes listing
- Student marketplace → Firestore: reads items
- Sell item → Firestore: writes item
- Budget estimator → City benchmarks: uses costs
- Budget estimator → Firestore: loads services
- Roommate finder → Roommate data service: requests profiles
- Roommate data service → Firestore: reads and writes
- Service listings → Image upload: uploads images
- Sell item → Image upload: uploads images
- Image upload → Cloudinary CDN: uploads image
- Student → AI assistant: asks question
- AI assistant → Chat API: posts chat
- Chat API → Gemini AI: requests generation
- AI assistant → AI response: renders reply
- Admin console → Firestore: manages records