How debjitds/trial-client works
tRIAL-CLIENTS is a SaaS practice platform for generating realistic client briefs. The main user journey is account access, choosing a challenge, receiving a brief, and managing it in the workspace and history; credits and XP/rewards support continued use. The tree and README establish these capabilities, but sampled source does not show the brief-generation caller or its persistence path, so those connections are left out. Payment, authentication, and gamification links reflect sampled code; other feature wiring is not inferred.
Main entry points: App.tsx App router · client.ts Supabase services · useCreditPurchase.ts Credit purchase · useRazorpay.ts Plan payment
Components 16
Application flow
- App router
src/App.tsx
Project practice
- Client dashboard
src/pages/ClientDashboard.tsx - Project workspace
src/pages/ProjectWorkspace.tsx - Project history
src/pages/History.tsx - Brief generation
supabase/functions/generate-project/index.ts
Account and rewards
- Auth context
src/contexts/AuthContext.tsx - Supabase services
src/integrations/supabase/client.ts - Credit purchase
src/hooks/useCreditPurchase.ts - Plan payment
src/hooks/useRazorpay.ts - XP and badges
src/hooks/useGamification.ts - XP award function
supabase/functions/award-xp/index.ts - Rewards page
src/pages/Rewards.tsx
Administration
- Admin dashboard
src/pages/AdminDashboard.tsx - Admin management
src/components/admin/sections
Other components
- Learner
- Razorpay
Connections 17
- Learner → App router: opens
- App router → Auth context: provides auth
- App router → Client dashboard: routes
- App router → Project workspace: routes
- App router → Project history: routes
- App router → Rewards page: routes
- App router → Admin dashboard: routes
- Auth context → Supabase services: auth calls
- Client dashboard → Supabase services: loads data
- Learner → Brief generation: requests brief
- Credit purchase → Supabase services: invokes functions
- Credit purchase → Razorpay: opens checkout
- Plan payment → Supabase services: invokes functions
- Plan payment → Razorpay: opens checkout
- XP and badges → Supabase services: loads and awards
- Supabase services → XP award function: dispatches
- Admin dashboard → Admin management: renders