How valentingues/coach-dashboard works
CoachPro is a coach/client fitness dashboard. Users register or log in, then coaches manage clients, schedules, training and communication, while clients track sessions, nutrition and progress. The frontend routes authenticated users to role-aware dashboards and calls a backend API; the backend handles domain requests against a database. The README is only a Vite template and documents no product capabilities. Several feature components and server code are indexed but not fully excerpted, so only explicit routing, imports, and visible API calls are connected here.
Main entry points: Dashboard.tsx Role dashboard · App.tsx Routes and session · AuthPage.tsx Sign-in and registration · app.js API routes
Components 20
App entry and access
- Frontend bootstrap
src/main.tsx - Routes and session
src/App.tsx - Sign-in and registration
src/pages/AuthPage.tsx - Login form
src/components/Auth/LoginForm.tsx - Registration form
src/components/Auth/RegisterForm.tsx
Coach management
- Role dashboard
src/pages/Dashboard.tsx - Client roster
src/components/Dashboard/ClientsList.tsx - Client overview
src/components/Dashboard/ClientDashboardView.tsx - Calendar
src/components/Dashboard/CalendarView.tsx - Coach-client chat
src/components/Dashboard/ChatView.tsx - Account settings
src/components/Dashboard/AccountSettingsView.tsx - Admin area
src/pages/AdminPage.tsx - Exercise catalog admin
src/pages/AdminExercisesPage.tsx - Food catalog admin
src/pages/AdminFoodsPage.tsx
Client tracking
- Active training session
src/components/Dashboard/ActiveSessionView.tsx - Nutrition tracker
src/components/Dashboard/NutritionTrackerView.tsx
API and persistence
- API routes
api_backend/app.js - Application database
api_backend/database.js - Production server
prod_server.js
Other components
- User
Connections 23
- User → Frontend bootstrap: opens app
src/main.tsx - Frontend bootstrap → Routes and session: renders
src/main.tsx - Routes and session → Sign-in and registration: routes to
src/App.tsx - Routes and session → Role dashboard: routes to
src/App.tsx - Sign-in and registration → Login form: renders
src/pages/AuthPage.tsx - Sign-in and registration → Registration form: renders
src/pages/AuthPage.tsx - Registration form → Routes and session: passes login
- Login form → Routes and session: passes login
- Role dashboard → Client roster: renders
src/pages/Dashboard.tsx - Role dashboard → Calendar: renders
src/pages/Dashboard.tsx - Role dashboard → Coach-client chat: renders
src/pages/Dashboard.tsx - Role dashboard → Client overview: renders
src/pages/Dashboard.tsx - Role dashboard → Active training session: renders
src/pages/Dashboard.tsx - Role dashboard → Nutrition tracker: renders
src/pages/Dashboard.tsx - Role dashboard → Account settings: renders
src/pages/Dashboard.tsx - Client overview → Nutrition tracker: renders
src/components/Dashboard/ClientDashboardView.tsx - Client roster → API routes: requests client link
src/components/Dashboard/ClientsList.tsx - User → API routes: uses API
- API routes → Application database: queries
api_backend/app.js - Production server → Application database: references
prod_server.js - Routes and session → Admin area: routes to
src/App.tsx - Routes and session → Exercise catalog admin: routes to
src/App.tsx - Routes and session → Food catalog admin: routes to
src/App.tsx