How clawnify/openpersonaltraining works
OpenPersonalTraining is a personal-training and coaching platform. Trainers use its dashboard to review activity, manage clients, assemble and share exercise-based workouts, schedule sessions, and track payments. The Preact client routes screens through shared app state and an API client to a Hono server backed by D1. The README also documents a public, no-login workout link, PDF saving, and JSON APIs for agent-driven administration. Some links are documented rather than visible in the sampled server excerpt; those are identified as such.
Main entry points: app.tsx App and routing · context.tsx Shared context · client-detail.tsx Client details · index.ts HTTP API
Components 25
Trainer interface
- App and routing
src/client/app.tsx - Dashboard
src/client/components/dashboard.tsx
Client state and API
- App state
src/client/hooks/use-app.ts - Shared context
src/client/context.tsx - API client
src/client/api.ts
Coaching workflows
- Client list
src/client/components/client-list.tsx - Client details
src/client/components/client-detail.tsx - Client editor
src/client/components/create-client.tsx - Exercise library
src/client/components/exercise-library.tsx - Workout list
src/client/components/workout-list.tsx - Workout builder
src/client/components/workout-builder.tsx - Schedule
src/client/components/schedule.tsx - Session editor
src/client/components/create-session.tsx - Payment ledger
src/client/components/payment-list.tsx - Payment editor
src/client/components/create-payment.tsx
API and persistence
- HTTP API
src/server/index.ts - Database access
src/server/db.ts - Cloudflare D1
- Exercise dataset seed
src/server/seed-exercises.ts - Demo data seed
src/server/seed-demo.ts
Sharing and integrations
- Public workout sharing
src/server/index.ts - jsDelivr images
Other components
- Trainer
- Client phone or PDF
- Clawnify agent
Connections 35
- Trainer → App and routing: uses
src/client/app.tsx - App and routing → Dashboard: renders
src/client/app.tsx - App and routing → Client list: renders
src/client/app.tsx - App and routing → Client details: renders
src/client/app.tsx - App and routing → Exercise library: renders
src/client/app.tsx - App and routing → Workout list: renders
src/client/app.tsx - App and routing → Workout builder: renders
src/client/app.tsx - App and routing → Schedule: renders
src/client/app.tsx - App and routing → Payment ledger: renders
src/client/app.tsx - App and routing → App state: loads state
src/client/app.tsx - App and routing → Shared context: provides state
src/client/app.tsx - Client list → Client editor: opens editor
src/client/components/client-list.tsx - Client details → Client editor: opens editor
src/client/components/client-detail.tsx - Client details → Session editor: opens editor
src/client/components/client-detail.tsx - Client details → Payment editor: opens editor
src/client/components/client-detail.tsx - Schedule → Session editor: opens editor
src/client/components/schedule.tsx - Payment ledger → Payment editor: opens editor
src/client/components/payment-list.tsx - Client list → Shared context: reads state
src/client/components/client-list.tsx - Client details → Shared context: reads state
src/client/components/client-detail.tsx - Exercise library → Shared context: reads state
src/client/components/exercise-library.tsx - Workout builder → Shared context: reads state
src/client/components/workout-builder.tsx - Schedule → Shared context: reads state
src/client/components/schedule.tsx - Payment ledger → Shared context: reads state
src/client/components/payment-list.tsx - Shared context → App state: exposes state
src/client/context.tsx - App state → API client: calls
src/client/hooks/use-app.ts - API client → HTTP API: requests JSON API
README.md - Clawnify agent → HTTP API: uses JSON API
README.md - HTTP API → Database access: calls database access
src/server/index.ts - Database access → Cloudflare D1: accesses
- HTTP API → Exercise dataset seed: loads seed data
src/server/index.ts - HTTP API → Demo data seed: loads seed data
src/server/index.ts - Workout builder → Public workout sharing: manages sharing
README.md - Public workout sharing → Client phone or PDF: serves public workout
README.md - Client phone or PDF → Client phone or PDF: saves PDF
README.md - Exercise library → jsDelivr images: shows images
README.md