edeb1eb148
v1.0.0:1 shipped a per-request nonce-based CSP via Next.js middleware. In production it produced a blank first paint: Next 14.2.x's bootstrap inline scripts weren't picking up the nonce reliably from the x-nonce request header, so the browser blocked them. This release reverts to the pre-experiment posture: - middleware.ts back to auth gating only (no nonce, no CSP). - next.config.js restores the static CSP with `'unsafe-inline'` allowed for script-src and style-src. Same headers (HSTS, Referrer-Policy, Permissions-Policy, frame-ancestors 'none', etc.) all stay. - New startos/versions/v1.0.0.2.ts with empty up/down migrations and a release note explaining the bug + revert. Promoted to `current` in the version graph; v1.0.0:1 moves to `other` so existing installs upgrade in place. No schema changes, no data migration. Existing v1.0.0:1 installs keep their /data. Re-attempt path documented in middleware.ts and next.config.js comments: future PR can revisit nonce CSP using Next's documented pattern verbatim (notably setting CSP on BOTH request headers and response headers — we only set it on response).
Workout Planner
A self-hosted workout planner and logger. Plan training cycles, log daily workouts, search your history, and get AI-powered suggestions over time.
Quick Start
# Install dependencies
npm install
# Set up the database
npx prisma db push
# Seed with exercises and default user
npm run db:seed
# Start development server
npm run dev
Open http://localhost:3000 in your browser.
Default login: admin@local / workout123
Access from Other Devices
To access from your phone or iPad on the same network:
npm run dev -- --hostname 0.0.0.0
Then open http://<your-computer-ip>:3000 on your device. You can install it as a PWA (Add to Home Screen) for an app-like experience.
Docker Deployment
docker compose up -d
Tech Stack
- Next.js 14 (App Router) — full-stack TypeScript
- SQLite + Prisma ORM — local database, no separate server
- Tailwind CSS — mobile-first responsive design
- PWA — installable on any device
Project Structure
app/
auth/login/ — Login page
main/
dashboard/ — Quick stats and recent workouts
workouts/ — Workout history, logger, detail views
exercises/ — Exercise library
settings/ — Preferences and AI config
api/ — REST API routes
components/ — Reusable UI components
lib/ — Database queries, auth, utilities
prisma/ — Schema and seed data