How xinyiloh027-arch/campus-loop works
CampusLoop combines a UTM-focused campus marketplace with a virtual-pet experience. The main user flow is navigating marketplace sections, creating or browsing listings, and submitting purchase or rental requests; account and marketplace state are managed through services backed by Firebase with local fallback behavior. Pet World is a substantial separate capability for caring for, customizing, and interacting with a virtual pet. Several feature modules are represented from the source index rather than inspected excerpts, so their internal interactions are not expanded.
Main entry points: App.tsx App coordinator · PetWorldView.tsx Pet World hub · CustomPetStudio.tsx Pet customization · PetShopModal.tsx Pet shop
Components 29
Marketplace
- App coordinator
src/App.tsx - Navigation
src/components/Navbar.tsx - Home listings
src/components/HomeView.tsx - Marketplace browse
src/components/MallView.tsx - Listing details
src/components/ListingDetailModal.tsx - Create listing
src/components/CreateListingModal.tsx - Cart and requests
src/components/CartView.tsx - Rental listings
src/components/RentView.tsx - Campus chat
src/components/ChatView.tsx - Account hub
src/components/MeView.tsx
Accounts
- UTM sign-in
src/components/UtmAuthModal.tsx - Faculty selection
src/components/FacultySelect.tsx - Authentication
src/services/authService.ts
Pet World
- Pet World hub
src/components/PetWorldView.tsx - Pet customization
src/components/petworld/CustomPetStudio.tsx - Pet renderer
src/components/petworld/PetVisual.tsx - Pet state service
src/services/petWorldService.ts - Pet room
src/components/petworld/PetRoom.tsx - Mini-games
src/components/petworld/MiniGames.tsx - Pet chat
src/components/petworld/PetChatDrawer.tsx - Pet shop
src/components/petworld/PetShopModal.tsx - Pet sounds
src/services/soundService.ts - Scene definitions
src/types/petScenes.ts - Scene customization
src/services/sceneCustomizationService.ts
Services and data
- Marketplace storage
src/services/storageService.ts - Firebase
src/services/firebase.ts - Seed data
src/data/mockData.ts - Image storage
src/services/imageStorageService.ts
Other components
- UTM student
Connections 38
- UTM student → App coordinator: uses
src/App.tsx - App coordinator → Navigation: renders
src/App.tsx - App coordinator → Home listings: renders
src/App.tsx - App coordinator → Marketplace browse: renders
src/App.tsx - App coordinator → Cart and requests: renders
src/App.tsx - App coordinator → Rental listings: renders
src/App.tsx - App coordinator → Campus chat: renders
src/App.tsx - App coordinator → Account hub: renders
src/App.tsx - App coordinator → Create listing: opens
src/App.tsx - App coordinator → Marketplace storage: creates listings
src/App.tsx - App coordinator → Authentication: checks account
src/App.tsx - App coordinator → UTM sign-in: opens
src/App.tsx - UTM sign-in → Authentication: authenticates
src/components/UtmAuthModal.tsx - UTM sign-in → Faculty selection: uses selection
src/components/UtmAuthModal.tsx - Authentication → Firebase: uses Firebase auth
src/services/authService.ts - Marketplace storage → Firebase: reads and writes
src/services/storageService.ts - Create listing → Image storage: uploads images
src/components/CreateListingModal.tsx - Home listings → Listing details: opens details
src/components/HomeView.tsx - Marketplace browse → Listing details: opens details
src/components/MallView.tsx - Cart and requests → Seed data: uses initial data
src/components/CartView.tsx - Account hub → Faculty selection: renders selection
src/components/MeView.tsx - Account hub → Pet World hub: opens
src/components/MeView.tsx - Pet World hub → Pet state service: updates pet
src/components/PetWorldView.tsx - Pet World hub → Pet room: renders
src/components/PetWorldView.tsx - Pet World hub → Pet renderer: renders
src/components/PetWorldView.tsx - Pet World hub → Pet customization: opens
src/components/PetWorldView.tsx - Pet World hub → Mini-games: renders
src/components/PetWorldView.tsx - Pet World hub → Pet chat: opens
src/components/PetWorldView.tsx - Pet World hub → Pet shop: opens
src/components/PetWorldView.tsx - Pet World hub → Pet sounds: plays sounds
src/components/PetWorldView.tsx - Pet customization → Pet renderer: previews
src/components/petworld/CustomPetStudio.tsx - Pet customization → Pet state service: saves customization
src/components/petworld/CustomPetStudio.tsx - Pet customization → Image storage: stores images
src/components/petworld/CustomPetStudio.tsx - Pet shop → Pet state service: updates pet
src/components/petworld/PetShopModal.tsx - Pet shop → Pet renderer: renders preview
src/components/petworld/PetShopModal.tsx - Pet shop → Pet sounds: plays sounds
src/components/petworld/PetShopModal.tsx - Pet World hub → Scene definitions: uses definitions
src/components/PetWorldView.tsx - Scene customization → Scene definitions: uses scene types
src/services/sceneCustomizationService.ts