A comprehensive workout tracking system to monitor your gym progress, including sets, reps, and weight for each exercise.
- Track workouts with dates and notes
- Organize exercises by muscle groups and subgroups
- Record sets, repetitions, and weight for each exercise
- Monitor your progress over time
- Visualize strength gains and improvements
- Backend: NestJS with TypeScript
- Database: PostgreSQL with Prisma ORM
- Validation: Zod for schema validation
- Infrastructure: Docker for database containerization
- API Documentation: Postman Collection included
apps/
βββ api/ # NestJS backend application
β βββ prisma/ # Prisma schema and migrations
β βββ src/
β β βββ exercises/ # Exercise management
β β βββ muscle-groups/# Muscle group management
β β βββ muscle-subgroups/ # Muscle subgroup management
β β βββ workouts/ # Workout, workout exercises, sets
β β βββ prisma/ # Prisma service
β β βββ app.module.ts # Main application module
βββ web/ # Frontend application (to be implemented)
- Node.js (v18+)
- Docker and Docker Compose
- pnpm or npm
- Clone the repository:
git clone https://github.com/your-username/workout-tracker.git
cd workout-tracker- Install dependencies:
pnpm install- Start the PostgreSQL database using Docker:
docker-compose up -dThis will create a container named workout-tracker-db with PostgreSQL running on port 5432.
- Set up environment variables:
cp .env.example .env- Run database migrations:
cd apps/api
npx prisma migrate dev- Seed the database with initial data:
npm run prisma:seed- Start the development server:
npm run devThe API will be available at http://localhost:3000.
GET /muscle-groups- List all muscle groupsGET /muscle-groups/:id- Get a specific muscle groupPOST /muscle-groups- Create a new muscle groupPUT /muscle-groups/:id- Update a muscle groupDELETE /muscle-groups/:id- Delete a muscle group
GET /muscle-subgroups- List all muscle subgroupsGET /muscle-subgroups?muscleGroupId=:id- List subgroups for a specific muscle groupPOST /muscle-subgroups- Create a new muscle subgroupPUT /muscle-subgroups/:id- Update a muscle subgroupDELETE /muscle-subgroups/:id- Delete a muscle subgroup
GET /exercises- List all exercisesGET /exercises/:id- Get a specific exercisePOST /exercises- Create a new exercisePUT /exercises/:id- Update an exerciseDELETE /exercises/:id- Delete an exercise
GET /workouts- List all workoutsGET /workouts/:id- Get a specific workoutPOST /workouts- Create a new workoutPUT /workouts/:id- Update a workoutDELETE /workouts/:id- Delete a workout
GET /workouts/:workoutId/exercises/:id- Get a specific exercise in a workoutPOST /workouts/:workoutId/exercises- Add an exercise to a workoutPUT /workouts/:workoutId/exercises/:id- Update an exercise in a workoutDELETE /workouts/:workoutId/exercises/:id- Remove an exercise from a workout
GET /workout-exercises/:workoutExerciseId/sets- List all sets for an exerciseGET /workout-exercises/:workoutExerciseId/sets/:id- Get a specific setPOST /workout-exercises/:workoutExerciseId/sets- Add a set to an exercisePOST /workout-exercises/:workoutExerciseId/sets/batch- Add multiple sets at oncePUT /workout-exercises/:workoutExerciseId/sets/:id- Update a setDELETE /workout-exercises/:workoutExerciseId/sets/:id- Delete a set
npm run test- Access Prisma Studio (database GUI):
cd apps/api
npx prisma studioImport the included Postman collection to test all API endpoints.
This project is licensed under the MIT License - see the LICENSE file for details.