A comprehensive workout plan manager built with .NET 10, Blazor WebAssembly, and SQLite that enables users to create, manage, and execute workout sessions with real-time tracking.
WorkoutTracker/
βββ src/
β βββ WorkoutTracker.Domain/ # Core domain entities and interfaces
β β βββ Entities/ # Domain entities (Exercise, WorkoutPlan, etc.)
β β βββ Enums/ # Domain enums (ExerciseType, DurationType)
β β βββ Interfaces/ # Repository interfaces
β β
β βββ WorkoutTracker.Contracts/ # Shared DTOs and request types
β β βββ Common/ # Shared enums and types
β β βββ Exercises/ # Exercise DTOs and requests
β β βββ WorkoutPlans/ # WorkoutPlan DTOs and requests
β β βββ WorkoutSessions/ # WorkoutSession DTOs and requests
β β βββ PlanExercises/ # PlanExercise DTOs and requests
β β βββ SetRecords/ # SetRecord DTOs and requests
β β
β βββ WorkoutTracker.Application/ # Application services layer
β β βββ Common/Mappings/ # Entity to DTO mapping extensions
β β βββ Exercises/ # Exercise service and validators
β β βββ WorkoutPlans/ # WorkoutPlan service and validators
β β βββ WorkoutSessions/ # WorkoutSession service and validators
β β βββ SetRecords/ # SetRecord service and validators
β β
β βββ WorkoutTracker.Infrastructure/ # Infrastructure layer
β β βββ Data/ # DbContext, configurations, seeder
β β βββ Repositories/ # Repository implementations
β β βββ Migrations/ # EF Core migrations
β β
β βββ WorkoutTracker.API/ # Backend REST API (.NET 10)
β β βββ Controllers/ # API endpoints
β β βββ Extensions/ # ErrorOr result extensions
β β
β βββ WorkoutTracker.Client/ # Frontend (Blazor WebAssembly)
β βββ Pages/ # Blazor pages/components
β βββ Services/ # API communication services
β
βββ tests/
β βββ WorkoutTracker.Tests/ # xUnit test project
β
βββ WorkoutTracker.sln # Solution file
The application follows Clean Architecture principles with clear separation of concerns:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PRESENTATION LAYER β
β WorkoutTracker.API WorkoutTracker.Client β
β (Controllers) (Blazor WASM) β
βββββββββββββββββββ¬ββββββββββββββββββββββββββ¬ββββββββββββββββββββββ
β β
βββββββββββββββββββ΄ββββββββββββββββββββββββββ΄ββββββββββββββββββββββ
β INFRASTRUCTURE LAYER β
β WorkoutTracker.Infrastructure β
β (EF Core DbContext, Repositories) β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ
β APPLICATION LAYER β
β WorkoutTracker.Application β
β (Services, Validators, Mappings) β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββ
β CORE LAYER β
β WorkoutTracker.Domain WorkoutTracker.Contracts β
β (Entities, Interfaces) (DTOs, API Contracts) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Domain-Driven Design (DDD): Rich domain entities with private setters and factory methods
- Repository Pattern: Abstracted data access through repository interfaces
- Unit of Work: Coordinated database transactions
- Result Pattern: ErrorOr for explicit error handling without exceptions
- FluentValidation: Request validation in the application layer
- Workout Plan Management: Create and view workout plans with multiple exercises
- Exercise Types: Support for time-based, repetition-based, and duration-based exercises
- Real-Time Set Tracking: Track weight, reps, execution time, and recovery time for each set
- Recovery Timer: Visual countdown timer with color-coded feedback (green β yellow β red)
- Data Persistence: SQLite database with Entity Framework Core
- Seeded Test Data: "Full Body Workout A" plan pre-loaded for testing
- .NET 10 backend API with RESTful endpoints
- Blazor WebAssembly for responsive web UI
- SQLite database for cross-platform local storage
- Entity Framework Core 10 ORM with migrations
- xUnit test framework with 136 passing tests
- Git version control with proper .gitignore
- .NET 10 SDK
- Git
cd src/WorkoutTracker.API
dotnet runThe API will start on:
- HTTPS:
https://localhost:7001 - HTTP:
http://localhost:5000
The database will be automatically created and seeded with test data on first run.
In a new terminal:
cd src/WorkoutTracker.Client
dotnet runThe client will start on:
- HTTPS:
https://localhost:7002 - HTTP:
http://localhost:5001
GET /api/WorkoutPlans- Get all workout plansGET /api/WorkoutPlans/{id}- Get specific workout planPOST /api/WorkoutPlans- Create new workout planPUT /api/WorkoutPlans/{id}- Update workout planDELETE /api/WorkoutPlans/{id}- Delete workout plan
GET /api/Exercises- Get all exercisesGET /api/Exercises/{id}- Get specific exercisePOST /api/Exercises- Create new exercisePUT /api/Exercises/{id}- Update exerciseDELETE /api/Exercises/{id}- Delete exercise
GET /api/WorkoutSessions- Get all sessionsGET /api/WorkoutSessions/{id}- Get specific sessionPOST /api/WorkoutSessions- Start new sessionPUT /api/WorkoutSessions/{id}/complete- Complete sessionDELETE /api/WorkoutSessions/{id}- Delete session
GET /api/SetRecords- Get all set recordsGET /api/SetRecords/{id}- Get specific set recordGET /api/SetRecords/session/{sessionId}- Get sets for a sessionPOST /api/SetRecords- Record a completed setDELETE /api/SetRecords/{id}- Delete a set record
- Stores workout plan metadata (name, description, creation date)
- Defines exercises with muscle groups, images, videos, and type
- Junction table linking plans to exercises with target sets/reps/duration
- Tracks individual workout sessions
- Records each completed set with actual performance data
The application includes a pre-configured "Full Body Workout A" plan with 10 exercises:
- Treadmill (10 min warm-up)
- Lunges (4 sets x 10 reps)
- Leg Extension (4 sets x 10 reps)
- Horizontal Press (3 sets x 8 reps)
- One-Arm Dumbbell Row (3 sets x 15 reps)
- Dumbbell Shoulder Press (3 sets x 12 reps)
- Lat Machine (4 sets x 10 reps)
- Chest Press (4 sets x 10 reps)
- Plank (4 sets x 30 sec)
- Treadmill Uphill (10 min cool-down)
- Displays all available workout plans as cards
- Shows exercise count and creation date
- "Start Workout" button to begin a session
- Current exercise details with muscle groups
- Set tracking form (weight, reps/duration, execution time)
- Recovery Timer with visual feedback:
- Green: Within suggested recovery time
- Yellow: 1-1.5x suggested time
- Red: Over 1.5x suggested time
- Progress indicator showing remaining exercises
- "End Workout" button to complete session
The client is configured to connect to the API at https://localhost:7001. To change this, edit:
File: src/WorkoutTracker.Client/wwwroot/appsettings.json
{
"ApiBaseUrl": "https://localhost:7001"
}The API uses SQLite with a local database file. To change the connection string, edit:
File: src/WorkoutTracker.API/appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=workouttracker.db"
}
}The project includes comprehensive tests with 136 passing tests covering:
- Controller integration tests
- Client service tests
- Database seeding tests
- Domain entity tests
# Run all tests
dotnet test
# Run with verbose output
dotnet test --verbosity normal# Build entire solution
dotnet build WorkoutTracker.sln
# Build API only
dotnet build src/WorkoutTracker.API/WorkoutTracker.API.csproj
# Build Client only
dotnet build src/WorkoutTracker.Client/WorkoutTracker.Client.csproj
# Run tests
dotnet test
# Create new migration
cd src/WorkoutTracker.API
dotnet ef migrations add MigrationName
# Update database
dotnet ef database updateThe database schema and architecture support these planned features:
- Workout history and calendar view
- Progress tracking with charts
- Personal record (PR) tracking
- Custom exercise creation
- Workout plan templates
- Body measurements tracking
- Mobile deployment (MAUI conversion)
- Clean Architecture: Strict dependency rules between layers
- CORS: Configured to allow Blazor client origins
- Database Seeding: Automatic on application start
- Future Mobile Support: Architecture designed for MAUI conversion
- RESTful API: Clean separation between frontend and backend
- ErrorOr Result Pattern: Explicit error handling without exceptions
This project was created as a demonstration application.
- Created with .NET 10.0.101
- Blazor WebAssembly for web-first development
- SQLite for simple, portable data storage
- Architecture supports future Android deployment via MAUI