Skip to content

[#35] Add workout templates#43

Merged
brianwalborn merged 1 commit intomainfrom
35/workout-templates
Feb 27, 2026
Merged

[#35] Add workout templates#43
brianwalborn merged 1 commit intomainfrom
35/workout-templates

Conversation

@brianwalborn
Copy link
Copy Markdown
Owner

This pull request adds a comprehensive "Template" feature to the application, allowing users to create, manage, and interact with workout templates. The changes span the backend (database, models, API, CRUD, and schemas) and the frontend (API integration, composable, and routing), providing full CRUD support for templates and their related exercises and sets.

Backend: Template Data Model and API

  • Database migrations:
    • Introduced new tables: templates, template_exercises, and template_sets to support template storage, including relationships and cascading deletes for data integrity. [1] [2]
  • Models and Schemas:
    • Added SQLAlchemy models (Template, TemplateExercise, TemplateSet) and corresponding Pydantic schemas for creating, updating, and retrieving templates with nested exercises and sets. [1] [2]
  • CRUD and API endpoints:
    • Implemented CRUD operations for templates, including support for nested creation and updates of exercises and sets, and summary/listing endpoints. [1] [2]
    • Registered the new templates router in the FastAPI app. [1] [2]
    • Updated model imports to include templates.

Frontend: Template Management Integration

  • API Service and State Management:
    • Added template-related API calls for all CRUD operations.
    • Created a useTemplates composable for reactive state and actions related to templates.
  • Routing:
    • Registered a new route for viewing/editing templates in the library. [1] [2]

These changes provide end-to-end support for users to manage reusable workout templates, including database persistence, API endpoints, and frontend state and routing.

References: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

@brianwalborn brianwalborn merged commit 03cccd9 into main Feb 27, 2026
@brianwalborn brianwalborn deleted the 35/workout-templates branch February 27, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant