RepFlow is a React workout planner that lets users enter available gym equipment and generate a custom 3-day training plan using Claude (Anthropic API).
- Collects equipment input from the user (for example: dumbbells, cable, kettlebells).
- Sends that equipment list to a local API route.
- Uses Claude to generate a structured workout plan.
- Displays the generated plan in a clean card layout by training day.
- React + Vite
- TailwindCSS (via Vite plugin) + custom CSS
- Claude API (
/v1/messages) through a Vite dev-server middleware route (/api/workout-plan)
- Node.js 18+ (recommended)
- npm
- Anthropic API key
- Install dependencies:
npm install- Create/update
.envin the project root:
CLAUDE_API_KEY=your_anthropic_api_key_here
CLAUDE_MODEL=claude-sonnet-4-20250514Notes:
CLAUDE_API_KEYis required.CLAUDE_MODELis optional. If a model is unavailable, the app includes fallback logic to retry with an available model from your account.
Start the dev server:
npm run devOpen the local URL shown in your terminal (usually http://localhost:5173).
- Lint:
npm run lint- Build for production:
npm run build- Preview production build:
npm run previewThe Claude key is read on the server side (Vite middleware) and is not sent directly from browser code. Do not commit .env with real secrets.
Missing CLAUDE_API_KEY in .env- Add your key to
.envand restartnpm run dev.
- Add your key to
not_found_errorfor a model- Use a valid model in
.envor let fallback logic choose one automatically.
- Use a valid model in
- Port already in use
- Vite will choose the next available port and print it in terminal.