How hossain-13/football-manager works
TURF is a multi-tenant matchday manager for pickup football. Players authenticate, create or join sessions by code, and use session screens to manage availability, teams, formations, schedules, live matches, standings, history, expenses, and profiles. The React app orchestrates screens and session state; its data-access layer switches between mock data and Supabase, whose Postgres policies enforce permissions. The README documents lazy loading and realtime synchronization; implementation excerpts are partial, so some feature-to-data links below rely on that documentation rather than inspected calls.
Main entry points: App.jsx App orchestrator · liveDb.js Supabase data access · LiveScreen.jsx Live match control · dataView.js Shared data view
Components 25
Application shell
- App orchestrator
src/App.jsx - Google sign-in
src/screens/AuthScreen.jsx
Session management
- Dashboard
src/screens/DashboardScreen.jsx - Create or join
src/screens/SessionsScreen.jsx - Availability
src/screens/AvailabilityScreen.jsx - Player profile
src/screens/ProfileScreen.jsx - Session details
src/screens/DetailScreen.jsx
Matchday operations
- Teams and captains
src/screens/TeamsScreen.jsx - Tactical formations
src/screens/FormationScreen.jsx - Fixtures and standings
src/screens/ScheduleScreen.jsx - Live match control
src/screens/LiveScreen.jsx - Match history
src/screens/HistoryScreen.jsx - Fees and payments
src/screens/ExpensesScreen.jsx
Data and persistence
- Supabase data access
src/lib/liveDb.js - Shared data view
src/lib/dataView.js - Mock reference data
src/lib/db.js - Supabase client
src/lib/supabase.js - Postgres and RLS
supabase/schema.sql - Realtime sync
src/lib/liveDb.js
Shared interface
- Standings and match widgets
src/components/signature.jsx - Shared UI primitives
src/components/core.jsx - Icon set
src/components/Icon.jsx
Other components
- Player or organizer
- Google OAuth
- Supabase service
Connections 32
- Player or organizer → App orchestrator: uses
README.md - App orchestrator → Google sign-in: shows
src/App.jsx - Google sign-in → Google OAuth: starts OAuth
README.md - App orchestrator → Dashboard: routes to
src/App.jsx - App orchestrator → Create or join: routes to
src/App.jsx - App orchestrator → Availability: routes to
src/App.jsx - App orchestrator → Player profile: routes to
src/App.jsx - App orchestrator → Teams and captains: routes to
src/App.jsx - App orchestrator → Tactical formations: routes to
src/App.jsx - App orchestrator → Fixtures and standings: routes to
src/App.jsx - App orchestrator → Live match control: routes to
src/App.jsx - App orchestrator → Match history: routes to
src/App.jsx - App orchestrator → Fees and payments: routes to
src/App.jsx - App orchestrator → Session details: routes to
src/App.jsx - App orchestrator → Supabase data access: loads and saves
src/App.jsx - App orchestrator → Shared data view: sets active data
README.md - Shared data view → Mock reference data: defaults to
src/lib/dataView.js - Supabase data access → Supabase client: queries through
src/lib/liveDb.js - Supabase client → Supabase service: connects to
README.md - Supabase service → Postgres and RLS: reads and writes
README.md - Supabase service → Google OAuth: authenticates with
README.md - Supabase service → Realtime sync: publishes changes
README.md - Realtime sync → App orchestrator: patches state
README.md - Fixtures and standings → Standings and match widgets: renders standings
src/screens/ScheduleScreen.jsx - Live match control → Standings and match widgets: uses match controls
README.md - App orchestrator → Shared UI primitives: uses primitives
src/App.jsx - Shared UI primitives → Icon set: renders icons
src/components/core.jsx - Availability → Shared data view: reads shared data
src/screens/AvailabilityScreen.jsx - Teams and captains → Supabase data access: persists team changes
src/screens/TeamsScreen.jsx - Live match control → Supabase data access: persists match state
- Fees and payments → Supabase data access: manages fee data
- Create or join → Supabase data access: creates and joins
src/screens/SessionsScreen.jsx