Commit Graph

21 Commits

Author SHA1 Message Date
215ce90404 fix: resolve template errors, orphaned sessions, and auth redirects
- Fix exercise_id undefined error in log_form.html by using scalar
  exercise_id instead of exercise.id object reference
- Clean up orphaned WorkoutSession records when all logs are deleted
- Filter empty sessions from dashboard stats (sessions, volume, streak)
- Replace broken HTTPException auth redirect with custom exception
  handler that properly returns 302 to /login

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:00:34 -06:00
134542b66f feat: add Phase 5 Progression & Analytics — smart suggestions, dashboard, schedule
Add auto-progression engine (ProgressionService) with rep increase, weight
increase, deload, and felt-easy acceleration rules. Add AnalyticsService for
user stats, exercise progress charts, and volume-by-day data. New dashboard
and schedule routes with Chart.js visualizations. Progression badges shown
inline on workout day view. Navigation updated with Dashboard and Schedule links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:26:23 -06:00
e35b78ae87 feat: add Phase 4 Logging & Tracking — inline set logging, history views
Add workout logging so users can track sets, reps, weight, and a
"felt easy?" toggle inline from the workout day view via HTMX.
Sessions auto-create on first log. History page shows past sessions
with detailed per-exercise breakdowns.

New services: WorkoutSessionService, LogService
New routes: POST /log, /log/{id}/edit, /log/{id}/delete, GET /history, /history/{id}
New templates: log_form, log_entry, session_card, log_history, session_detail
Modified: exercise_card (inline logging), nav (History link), workouts route (session context)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:12:23 -06:00
23754ea239 feat: add Phase 3 Workout UI — auth, profiles, workout viewer, exercise browser
Build the core user-facing experience with admin login (bcrypt + signed
session cookies), profile switcher, workout day viewer with warmups and
exercise cards, and HTMX-powered exercise browser with search/filter.

- AuthService with bcrypt password verification and itsdangerous session tokens
- Auth dependency redirects to /login (303) for unauthenticated requests
- NavContextMiddleware injects admin/profiles/active_profile into all templates
- Profile management (list, switch, edit) with cookie-based active profile
- Workout day viewer shows warmups + exercises + per-user programming targets
- Exercise browser with HTMX filter dropdowns (no page reloads)
- Flash message partial for success/error feedback
- 12 new tests (66 total passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:14:52 -06:00
1f47103480 Merge branch 'feat/phase2-data-layer' 2026-02-24 10:15:10 -06:00
7c07bcee25 feat: wire database init and seeding into app startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:14:32 -06:00
6f9e923846 feat: add SeedService for YAML-based database seeding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:09:05 -06:00
42f6667b23 feat: add ExerciseService with filtering and warmup support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:07:33 -06:00
afb2cdf308 feat: add UserService with CRUD operations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:04:55 -06:00
e6ee17d1ff feat: add Alembic migrations with initial 8-table schema
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:52:31 -06:00
3bf1e13adc feat: define all 8 SQLModel tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:35:13 -06:00
45b93a2988 feat: add database engine and session management
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:32:26 -06:00
f9ff42c665 Merge branch 'feat/phase1-scaffold' 2026-02-24 09:16:03 -06:00
835ab197eb feat: add Dockerfile and docker-compose for containerized deployment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:15:01 -06:00
df7e86f2ed feat: add base template with Pico CSS dark theme and home page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:13:28 -06:00
b3b34222c8 feat: add FastAPI app factory and health check endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:12:31 -06:00
fb4b948681 feat: add structlog logging configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:05:14 -06:00
a211f9b6bd feat: add typed configuration loader with env support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:04:41 -06:00
2a9891ce69 feat: create project directory structure and env template
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:55:04 -06:00
4afc7c35a6 feat: add project metadata and pinned dependencies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:54:46 -06:00
3f7ce965e1 feat: initial project setup with roadmap, exercise data, and docs
Establish SneakySwole project foundation:
- CLAUDE.md with project overview, stack, and development guidelines
- 5-phase roadmap (scaffold, data layer, workout UI, logging, progression)
- Exercise library YAML with 6 warmups and 20 exercises (form cues, tempo, sets)
- User programs YAML with week 1/4 targets for Phillip and Daughter
- Design doc capturing roadmap, data, and auth model decisions
- Code guidelines, security standards, and .gitignore
- Source workout spreadsheet (workout_plan_v2.xlsx)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:55:31 -06:00