Public
Like
workout-5m
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
An AI-powered workout generator that creates a single random standing workout focused on hip, neck, and spine mobility and strength. All exercises can be performed without lying down and use only bodyweight.
- Single AI-generated workout per session
- Workout Variety System: Tracks the last 2 workouts and ensures new ones are completely different
- Horizontal layout with three components displayed side-by-side
- Each workout includes:
- π§ββοΈ Stretch component (hip, neck, spine flexibility)
- πͺ Strength component (bodyweight exercises)
- π€ΈββοΈ Mobility component (movement patterns)
- All exercises are standing or seated (no lying down required)
- Designed to fit on one screen without scrolling
- AI-generated content for variety and personalization
- Persistent storage using Val Town's blob storage
backend/index.ts
- Main Hono server with workout generation API and history trackingfrontend/index.html
- Main HTML templatefrontend/index.tsx
- React frontend applicationfrontend/style.css
- Custom styling for horizontal layout
GET /api/workout
- Generate a new unique workoutGET /api/history
- View workout history (for debugging)
The application generates a single workout using OpenAI while avoiding the last 2 generated workouts to ensure variety. The three workout components are displayed horizontally for easy viewing on one screen.