No description
Find a file
dependabot[bot] e4dcc972ef
Some checks failed
Docker Build / test (push) Failing after 12s
Docker Build / build (push) Has been skipped
Docker Build / deploy (push) Has been skipped
Bump the pip group across 1 directory with 3 updates
Bumps the pip group with 3 updates in the / directory: [sqlparse](https://github.com/andialbrecht/sqlparse), [djangorestframework](https://github.com/encode/django-rest-framework) and [black](https://github.com/psf/black).


Updates `sqlparse` from 0.5.3 to 0.5.4
- [Changelog](https://github.com/andialbrecht/sqlparse/blob/master/CHANGELOG)
- [Commits](https://github.com/andialbrecht/sqlparse/compare/0.5.3...0.5.4)

Updates `djangorestframework` from 3.15.0 to 3.15.2
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.15.0...3.15.2)

Updates `black` from 23.9.1 to 24.3.0
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.9.1...24.3.0)

---
updated-dependencies:
- dependency-name: sqlparse
  dependency-version: 0.5.4
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: djangorestframework
  dependency-version: 3.15.2
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: black
  dependency-version: 24.3.0
  dependency-type: direct:development
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-14 01:48:16 +01:00
.forgejo/workflows build also on dev branch 2025-11-23 00:13:39 +01:00
.vscode refactored settings 2025-11-21 15:09:33 +01:00
wmapi add day abstraction 2025-11-22 23:57:44 +01:00
wmapp add day abstraction 2025-11-22 23:57:44 +01:00
wmsite add application stub 2025-11-21 16:32:14 +01:00
.gitignore add entrypoint script 2025-11-21 11:36:22 +01:00
.pre-commit-config.yaml use compatible profile 2025-11-22 02:13:04 +01:00
build-n-serve.sh fix db mount 2025-11-21 16:32:30 +01:00
Dockerfile add application stub 2025-11-21 16:32:14 +01:00
entrypoint.sh load initial data 2025-11-22 02:15:48 +01:00
gunicorn_conf.py rename site 2025-11-21 00:21:00 +01:00
manage.py rename site 2025-11-21 00:21:00 +01:00
pytest.ini refactored settings 2025-11-21 15:09:33 +01:00
README.md add readme 2025-11-24 12:04:39 +01:00
requirements-dev.txt Bump the pip group across 1 directory with 3 updates 2026-02-14 01:48:16 +01:00
requirements.txt Bump the pip group across 1 directory with 3 updates 2026-02-14 01:48:16 +01:00

Workout Manager

A Django REST API application for managing workout programs and exercises.

Tech Stack

  • Framework: Django 5.2.8 with Django REST Framework 3.15.0
  • Server: Gunicorn 23.0.0
  • Database: SQLite (default Django setup)
  • Python: 3.12
  • Container: Alpine-based Docker image
  • Dev Tools: pytest, black, ruff, isort, pre-commit

Architecture

The project consists of three Django apps:

  1. wmsite - Main project configuration with split settings (base/dev/prod)
  2. wmapi - REST API backend with ViewSets for CRUD operations
  3. wmapp - Web frontend views with HTML templates

Data Models

Core Workout Models (wmapi)

  • Workout - Main entity with name, description, duration, start/end datetime
  • WorkoutDay - Days of week (0-6) linked to workout parts
  • WorkoutPart - Workout sections (warmup, strength, stretching, cardio)
  • ExerciseInstance - Specific exercise occurrences in workout parts
  • Set - Individual sets with reps, weight, rest time

Exercise Library Models

  • Exercise - Exercise library with instructions, videos, images
  • BodyPart - Lookup table for exercise body parts
  • Muscle - Lookup table for target and secondary muscles
  • Equipment - Lookup table for exercise equipment

API Endpoints

REST API available at /api/v1/ with the following endpoints:

  • /api/v1/workouts/ - Workout CRUD operations
  • /api/v1/workout-parts/ - Workout part management
  • /api/v1/workout-days/ - Workout day configuration
  • /api/v1/exercise-instances/ - Exercise instance tracking
  • /api/v1/exercises/ - Exercise library
  • /api/v1/body-parts/ - Body part lookup
  • /api/v1/muscles/ - Muscle lookup
  • /api/v1/equipments/ - Equipment lookup

All endpoints currently use AllowAny permissions.

Frontend Views

  • Index - Home page
  • Workout List - Browse all workouts
  • Workout Detail - View workout structure with days, parts, exercises, and sets
  • Exercise Detail - View exercise information with instructions and related data

Views use Django templates with prefetch optimizations for efficient database queries.

Development

Setup

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Run migrations
python manage.py migrate

# Run development server
python manage.py runserver

Testing

pytest

Code Quality

The project uses pre-commit hooks with:

  • black (code formatting)
  • ruff (linting)
  • isort (import sorting)
pre-commit install
pre-commit run --all-files

Docker

Build and run with Docker:

docker build -t workout-manager .
docker run -p 80:80 workout-manager

Or use the provided build script:

./build-n-serve.sh

Project Structure

workout-manager/
├── wmsite/          # Django project settings
│   ├── settings/    # Split settings (base/dev/prod)
│   └── urls.py      # Main URL configuration
├── wmapi/           # REST API app
│   ├── models.py    # Data models
│   ├── serializers.py
│   ├── api.py       # ViewSets
│   └── urls.py
├── wmapp/           # Web frontend app
│   ├── views.py     # Template views
│   ├── templates/   # HTML templates
│   └── urls.py
├── templates/       # Shared templates
├── static/          # Static files
├── db/              # Database directory
└── manage.py        # Django management script

License

[Add license information]