calisthenics-course-booking-client

Public
OVERVIEW.md

A coaching idea became a clickable path from choosing a plan to imagining progress.

I built this React client as a UX experiment around a friend's coaching idea. It also gave me a low-stakes place to try coding agents as part of my own development workflow and see how quickly I could shape a coherent interface. The first screen could advertise training, but a useful concept needed the next decisions too: which plan fits, how might payment and booking look, and how would someone see their skill progress? I connected those questions into one clickable journey.

Connecting the trainee's steps

A visitor can compare plans, choose a quantity, and review an order. After sign-in, the prototype shows a dashboard, a payment agreement and sample QR flow, a trainer calendar, booking recap, and a skill tree. The companion server implements account registration and role-based sign-in, so the user, trainer, and admin portals have an API boundary. The visible plan prices, transactions, slot availability, booking confirmation, balances, and progress still come from client-side examples.

Calisthenics booking prototype with sample time slots and trainer selection
Client-side booking demonstration with sample availability. Confirming a time does not reserve a server-side slot.View source

The booking screen is useful because it puts several design questions in one place: trainer choice, occupied times, a plan balance, and the summary of a proposed session. It is also the clearest boundary of this MVP. Pressing save produces a local confirmation; it does not reserve a real slot. The payment screen likewise demonstrates a flow without processing money.

This repository owns the trainee-facing interface and its sample journeys. The server owns accounts and access checks. Together they make a service idea concrete enough to discuss and let me experiment with frontend design and agent-assisted development. Actual schedules, payment verification, package accounting, and coach operations remain future work.

README.md

Calisthenics course booking MVP — client

A visual walkthrough of discovering a training plan, paying for it, and reserving a session.

React · TypeScript · Vite · Responsive UI · Separate Express API

This client is a prototype for an online and onsite calisthenics coaching service. Visitors can compare plans and inspect an order summary. A real API supports account registration, role-based sign-in, trainer account creation, and service status. Booking, payment, dashboard balances, and skill progress are interactive demo flows with client-side sample data; they are not connected to a booking or payment backend.

Landing page with the calisthenics hero and training options

Get started

  1. Install Node.js and npm. This snapshot was built with Node.js 24.

  2. Start the server with a MongoDB connection and its environment variables.

  3. In client/, install dependencies and set the API base URL:

    npm ci
    

    Create client/.env.local:

    VITE_API_URL=http://localhost:5000/api
    
  4. Start the client and open the URL printed by Vite (normally http://localhost:5173):

    npm run dev
    

The landing page, plan comparison, and public skill tree render without the server. Registration, sign-in, admin trainer creation, and the status page require the API. VITE_API_URL is compiled into the client; rebuild after changing it for deployment. Do not place secrets in a VITE_ variable.

Use cases

The screenshots below come from the current built client, captured with Playwright at a 1440 × 900 viewport and 2× pixel density. Signed-in screenshots use a browser-only demo session with /auth/me mocked; no production account, booking, or payment was changed. The data shown in those pages is already hard-coded in the client.

Compare online and onsite training

Open Plans from the landing page. Compare online and onsite offerings, their sample prices, durations, advantages, and considerations. Each Select Plan button opens an order summary. The prices and plan descriptions currently live in src/pages/Plans.tsx.

Online and onsite training plan cards

Review an order

Choose a plan, adjust the number of packages with − and +, and optionally enter an injury or allergy note. The total changes in the modal. Proceed to Payment sends a guest to user sign-in, then opens the visual payment flow. The selected package and note are not saved by an API.

Order summary with package quantity, health note, and total

Create an account or sign in

Open Login and choose Create account to register a user. Email and password sign-in uses separate user, trainer, and admin portals. Trainer accounts are created by an admin; an admin account can be bootstrapped from server environment variables. On successful sign-in, the client stores the token and user in browser local storage and checks /auth/me when the page reloads.

User sign-in portal

The visible Forgot password? and Continue with Google controls have no working backend flow in this MVP.

Explore the trainee dashboard

The dashboard presents example upcoming training sessions, a schedule change, a coach contact dialog, and plan balances. These entries are fixed sample data and do not update when someone makes a booking or completes the payment demo.

Trainee dashboard with sample sessions, coach contact, and balances

Walk through a payment

The payment page lists sample transactions. Open one to inspect its details, view the draft agreement, confirm its terms, then see a mock PromptPay QR and choose an image file as a slip. Completing the flow changes the transaction status only in current page state. It does not charge money, upload the file, verify a transfer, or persist a transaction.

Payment page with sample transactions and statuses

Payment dialog showing the mock PromptPay QR and slip picker

Try the booking calendar

From a signed-in user or trainer session, open Booking. Select a trainer, click an available time, choose a sample plan, move the proposed slot if needed, and review the booking summary. The calendar shows seeded occupied slots for today and tomorrow, lunch blocking, and sample package balances. Save Booking shows a brief saved state only; refreshing resets the selection. No server-side reservation or conflict lock exists.

Booking calendar with sample occupied times and trainer selection

Booking summary with date, trainer, plan, and remaining sample balance

Browse the skill tree

The public /skilltree and /skilltree/evaluate routes show movement progress and evaluation views. Switch branches and open a skill to inspect details. Skill status, level, and XP are fixed in src/components/skill-tree/data/skills.ts; there is no account progress persistence.

Skill tree branch and progress display

What is connected to the server?

FlowCurrent source of truth
Register, sign in, session checkExpress API and MongoDB
Admin creates trainer accountExpress API and MongoDB
Server/database/environment statusExpress API
Plans and displayed pricesClient constants
Dashboard, payments, booking slots and balancesClient demo data
Skill tree and XPClient demo data

See the server README for API routes and setup. The frontend sends the JWT as Authorization: Bearer <token>. The browser keeps it under the Zustand auth-storage key in local storage.

Develop and hand off

npm run dev      # Vite development server
npm run build    # TypeScript check and production build into dist/
npm run preview  # Preview the production build
npm run lint     # ESLint
LocationPurpose
src/App.tsxRoutes and role gates
src/pages/Landing, plans, auth, dashboard, booking, payment, and status screens
src/components/Navigation, order modal, skill tree, shared UI
src/stores/auth.store.tsAuth API calls and persisted session
src/stores/status.store.tsStatus API state
src/lib/axios.tsAPI base URL and bearer token interceptor
docs/README screenshots and their capture script

Repository hierarchy

client/
├── docs/                     # README screenshots and Playwright capture script
├── public/                   # Public SVG assets
├── src/
│   ├── assets/               # Imported images
│   ├── components/           # Navigation, modals, route guards, shared UI
│   │   └── skill-tree/       # Skill views, sample data, and visual components
│   ├── lib/                  # Axios client and utilities
│   ├── pages/                # Route-level screens
│   ├── stores/               # Auth and status state
│   ├── App.tsx               # Router and access rules
│   ├── index.css             # Global styles
│   └── main.tsx              # React entry point
├── AGENTS.md                 # Guidance for future coding agents
├── README.md                 # Setup, use cases, and MVP boundaries
├── package.json              # Scripts and dependencies
├── vite.config.ts            # Vite configuration
└── vercel.json               # SPA rewrite configuration

For a full booking product, the next team needs to define persistent plans, availability and time zones, reservation locking, package balance accounting, payment provider or slip review, coach workflows, notification policy, and privacy handling for health notes. The current UI supplies a concrete starting point for that work, not those production guarantees.

To recapture the screenshots after changing the UI, build the client, serve dist/ at port 4173, then run docs/capture_screenshots.py with Python Playwright and Pillow installed. The script mocks a signed-in browser session for demo-only screens and writes the WebP files in docs/.

License

Original code and documentation authored by Jakkarin Promsee are licensed under the MIT License. Third-party code, assets, datasets, and other materials are not covered by this license; their original terms apply.