How sufiyanrauf/cpsc362_tuffyflow works
Tuffy Flow is a student-facing campus companion: students sign in or enter a sample-student demo, then use their profile and class schedule to get parking, study-spot, club, and event recommendations. Its React views use a shared campus-data layer that selects bundled sample data or account-specific Firestore data. Ranking is split between a browser-side club ranker and a Python scoring service for parking, spots, and events. Edges follow shown imports/calls or README statements; unsampled integrations are omitted where their wiring is not established.
Main entry points: App.tsx App shell · recommend.ts Recommendation client · campusData.ts Campus data access · Dashboard.tsx Dashboard
Components 22
Student experience
- App shell
src/App.tsx - Login and demo
src/components/LoginView.tsx - Dashboard
src/components/Dashboard.tsx - Parking view
src/components/ParkingView.tsx - Campus spots
src/components/SpotsView.tsx - Club discovery
src/components/ClubsView.tsx - Event discovery
src/components/EventsView.tsx - Student profile
src/components/ProfileView.tsx - Campus map
src/components/CampusMap.tsx - Shared UI components
src/components
Recommendations
- Recommendation client
src/lib/recommend.ts - Club ranker
src/lib/clubRanking.ts
Campus data
- Campus data access
src/lib/campusData.ts - Bundled campus data
src/lib/campusRows.ts - Async loading
src/lib/useAsync.ts - Data and time helpers
src/lib
Identity and persistence
- Session management
src/lib/session.ts - Firestore access
src/lib/firestoreData.ts - Firebase setup
src/lib/firebase.ts
Scoring runtime
- Scoring endpoint
api/recommend.py - Ranking engine
api/scoring.py
Other components
- Student
Connections 25
- Student → App shell: uses
README.md - App shell → Login and demo: shows signed-out view
src/App.tsx - App shell → Dashboard: routes to
src/App.tsx - App shell → Parking view: routes to
src/App.tsx - App shell → Campus spots: routes to
src/App.tsx - App shell → Club discovery: routes to
src/App.tsx - App shell → Event discovery: routes to
src/App.tsx - App shell → Student profile: routes to
src/App.tsx - Login and demo → Session management: signs in
src/components/LoginView.tsx - Dashboard → Recommendation client: requests recommendations
src/components/Dashboard.tsx - Parking view → Recommendation client: requests recommendations
src/components/ParkingView.tsx - Campus spots → Recommendation client: requests recommendations
src/components/SpotsView.tsx - Event discovery → Recommendation client: requests recommendations
src/components/EventsView.tsx - Club discovery → Club ranker: ranks clubs
src/components/ClubsView.tsx - Parking view → Campus map: renders map
src/components/ParkingView.tsx - Student profile → Campus data access: saves profile and classes
src/components/ProfileView.tsx - Recommendation client → Campus data access: loads recommendation inputs
src/lib/recommend.ts - Campus data access → Bundled campus data: uses demo data
src/lib/campusData.ts - Campus data access → Firestore access: loads account data
src/lib/campusData.ts - Firestore access → Firebase setup: uses Firebase setup
src/lib/firestoreData.ts - Session management → Firebase setup: uses Firebase Auth
src/lib/session.ts - Recommendation client → Scoring endpoint: posts ranking inputs
README.md - Scoring endpoint → Ranking engine: delegates scoring
api/recommend.py - Dashboard → Async loading: loads asynchronously
src/components/Dashboard.tsx - Async loading → Data and time helpers: uses shared data state