How thesachinyyadav/sociomobilev2 works
SOCIO is a mobile-first campus events and student-life app, delivered as a Next.js PWA and Capacitor hybrid app. Users sign in, discover events and festivals, view details, register, and access tickets; volunteers scan tickets online or queue scans for later synchronization. The graph also captures clubs, catering, feedback, notifications, wallet passes, offline support, and native startup. Source excerpts establish key calls; other subsystem relationships are included only where the README documents them.
Main entry points: apiClient.ts API client · AuthContext.tsx Authentication state · page.tsx Event and fest browsing · ScannerClient.tsx QR ticket scanner
Components 34
App experience
- Dashboard and discovery
app/page.tsx - Event and fest browsing
app/events/page.tsx - Event details
app/event/[id]/EventDetailClient.tsx - Festival details
app/fest/[id]/FestDetailClient.tsx - Clubs and catering
app/clubs/page.tsx - Profile and tickets
app/profile/page.tsx - Shared interface components
components/EventCard.tsx - Buttons and empty states
components/Button.tsx - Date formatting
lib/dateUtils.ts - Search debounce
lib/useDebounce.ts
Identity and data
- Authentication state
context/AuthContext.tsx - Event state and cache
context/EventContext.tsx - API client
lib/apiClient.ts - SOCIO API gateway
- Supabase client
lib/supabaseClient.ts - Cache policy
lib/cache/policy.ts
Registration and attendance
- Event registration
app/event/[id]/register/RegisterClient.tsx - Volunteer event access
app/volunteer/page.tsx - QR ticket scanner
app/volunteer/scanner/[eventId]/ScannerClient.tsx - Scanner service
lib/ScannerService.ts - Volunteer authorization
lib/volunteerAccess.ts
Offline and native
- Offline IndexedDB
lib/offline/db.ts - Queued scan sync
lib/offline/syncEngine.ts - Trusted time checks
lib/offlineTime/index.ts - Offline asset fallback
public/sw.js - Capacitor native runtime
components/native/NativeLaunchController.tsx
Engagement and extras
- Notifications
context/NotificationContext.tsx - Push provider
- Wallet pass routes
app/api/wallet/apple/route.ts - Wallet signing
lib/walletCrypto.ts - Event feedback
app/feedback/[eventId]/FeedbackClient.tsx - Club applications
app/api/clubs/apply/route.ts - Share links
lib/share.ts
Other components
- Student or volunteer
Connections 41
- Student or volunteer → Dashboard and discovery: opens app
- Dashboard and discovery → Authentication state: reads session
app/page.tsx - Dashboard and discovery → Event state and cache: reads events
app/page.tsx - Event and fest browsing → Event state and cache: reads events
app/events/page.tsx - Event details → API client: fetches event
app/event/[id]/EventDetailClient.tsx - Festival details → API client: fetches festival
app/fest/[id]/FestDetailClient.tsx - Event details → Event registration: links to signup
- Event registration → API client: submits signup
app/event/[id]/register/RegisterClient.tsx - Clubs and catering → API client: loads club data
app/clubs/page.tsx - Club applications → SOCIO API gateway: handles application
- Profile and tickets → Authentication state: reads session
app/profile/page.tsx - Profile and tickets → API client: loads ticket data
app/profile/page.tsx - Authentication state → API client: requests user data
context/AuthContext.tsx - Authentication state → Supabase client: uses client
context/AuthContext.tsx - Event state and cache → API client: fetches events
context/EventContext.tsx - Event state and cache → Offline IndexedDB: loads cached events
context/EventContext.tsx - API client → Cache policy: applies policy
lib/apiClient.ts - API client → SOCIO API gateway: sends requests
- Volunteer event access → Authentication state: checks role
- Volunteer event access → QR ticket scanner: opens scanner
- QR ticket scanner → Volunteer authorization: checks permission
app/volunteer/scanner/[eventId]/ScannerClient.tsx - QR ticket scanner → API client: verifies ticket
app/volunteer/scanner/[eventId]/ScannerClient.tsx - QR ticket scanner → Scanner service: uses scanner
app/volunteer/scanner/[eventId]/ScannerClient.tsx - QR ticket scanner → Queued scan sync: queues offline scan
- Queued scan sync → Offline IndexedDB: reads and deletes queue
lib/offline/syncEngine.ts - Queued scan sync → API client: posts scan
lib/offline/syncEngine.ts - Queued scan sync → Trusted time checks: builds provenance
lib/offline/syncEngine.ts - Offline asset fallback → Student or volunteer: serves cached assets
- Capacitor native runtime → Authentication state: observes session
components/native/NativeLaunchController.tsx - Capacitor native runtime → Event state and cache: observes events
components/native/NativeLaunchController.tsx - Notifications → Authentication state: uses user state
context/NotificationContext.tsx - Notifications → API client: calls API
context/NotificationContext.tsx - Notifications → Push provider: registers push
- Wallet pass routes → Wallet signing: signs pass data
app/api/wallet/apple/route.ts - Event feedback → API client: posts feedback
app/feedback/[eventId]/FeedbackClient.tsx - Event and fest browsing → Shared interface components: renders cards
app/events/page.tsx - Event and fest browsing → Buttons and empty states: renders controls
app/events/page.tsx - Event and fest browsing → Date formatting: formats dates
app/events/page.tsx - Event and fest browsing → Search debounce: debounces search
app/events/page.tsx - Event details → Share links: creates share link
app/event/[id]/EventDetailClient.tsx - Festival details → Share links: creates share link
app/fest/[id]/FestDetailClient.tsx