How shivanetha1/gymlekha works
Gymlekha is a multi-gym management SaaS for gym owners. Owners create an account, confirm or accept an invitation, complete gym onboarding, and then manage gym workspaces and their members, plans, payments, attendance, and analytics. The diagram preserves these documented product stages and the API/auth layer. Several page and action implementations were not sampled, so their connections are shown only where the README or excerpts support them; database and authorization details are documented at a high level.
Main entry points: api Operational API · actions.ts Onboarding actions · server.ts Session client · route.ts Email verification
Components 20
Entry and identity
- Signup and login
components/auth/auth-form.tsx - Auth redirect
components/auth/client-auth-redirect.tsx - Email verification
app/auth/confirm/route.ts - Legacy callback
app/auth/callback/route.ts - Browser auth flow
lib/auth/client-auth-flow.ts
Workspace setup
- Gym onboarding
components/onboarding/gym-onboarding-form.tsx - Onboarding actions
app/(app)/onboarding/actions.ts - Gym workspace data
lib/data/gym.ts
Gym operations
- Dashboard
app/(app)/dashboard/page.tsx - Member management
components/members/member-directory.tsx - Membership plans
app/(app)/plans/page.tsx - Payment tracking
components/payments/payments-manager.tsx - Attendance tracking
components/attendance/attendance-manager.tsx - Analytics
app/(app)/analytics/page.tsx
API and data
- Session client
lib/supabase/server.ts - Supabase Auth
- Operational API
app/api - API authorization
lib/api/auth.ts - Supabase database
Other components
- Gym owner
Connections 30
- Gym owner → Signup and login: signs up
- Signup and login → Email verification: confirms email
- Email verification → Session client: verifies token
app/auth/confirm/route.ts - Email verification → Gym owner: routes onward
app/auth/confirm/route.ts - Legacy callback → Session client: exchanges code
app/auth/callback/route.ts - Auth redirect → Browser auth flow: handles auth state
components/auth/client-auth-redirect.tsx - Browser auth flow → Supabase Auth: checks session
- Session client → Supabase Auth: creates server client
lib/supabase/server.ts - Gym owner → Gym onboarding: sets up gym
- Gym onboarding → Onboarding actions: submits setup
- Onboarding actions → Supabase database: creates gym and plans
- Onboarding actions → Gym workspace data: uses gym data
- Gym owner → Dashboard: enters workspace
- Dashboard → Supabase database: loads summary
- Gym owner → Member management: manages members
- Gym owner → Membership plans: manages plans
- Gym owner → Payment tracking: tracks payments
- Gym owner → Attendance tracking: records attendance
- Attendance tracking → Onboarding actions: marks attendance
components/attendance/attendance-manager.tsx - Gym owner → Analytics: reviews insights
- Member management → Operational API: uses member routes
- Membership plans → Operational API: uses plan routes
- Payment tracking → Operational API: uses payment routes
- Attendance tracking → Operational API: uses attendance routes
- Analytics → Operational API: loads analytics
- Operational API → API authorization: checks access
app/api/members/route.ts - API authorization → Session client: requires user
lib/api/auth.ts - API authorization → Supabase database: checks gym ownership
lib/api/auth.ts - Operational API → Supabase database: reads and writes operations
app/api/members/route.ts - Analytics → Operational API: requests metrics