WorkoutTracker is a web application designed to help users track their fitness progress through workouts, exercises, body and muscle measurements, and more. It offers a seamless experience through an Angular frontend and a .NET Core backend, providing robust tracking and reporting features.
- Features
- Technologies Used
- Project Structure
- Prerequisites
- Installation
- Environment Configuration
- Running
- API Documentation
- Internal Pages
WorkoutTracker provides the following features:
-
User Authentication and Authorization
- Secure user registration and login with JWT-based authentication.
- Role-based access control (admin/user roles).
- Password management (change/reset).
-
Workout Tracking
- Log exercises with sets, reps, weight, and duration.
- View workout history and track progress over time.
- Add personal workout routines.
-
Muscles, Exercises and Equipments Management
- View muscles, exercises and equipments and filter them.
- Create your own exercises and equipments.
-
Body and Muscle Measurements Tracking
- Record weight and muscle measurements over time.
- Progress visualization via charts.
-
User Profile Management
- Update your username and email.
- Update profile details and preferences.
-
Admin Dashboard
- Manage users and roles.
- Impersonate users.
-
Responsive Design
- Mobile-friendly interface with Angular Material.
- ASP.NET Core 6 - Backend API framework.
- Entity Framework Core 6 - Database interaction and ORM.
- Microsoft SQL Server - Relational database storage.
- AutoMapper - Object-to-object mapping.
- xUnit - Unit testing framework.
- Newtonsoft.Json - JSON processing
- Swagger - API documentation
- Logging: Serilog
- Authentication: JWT (JSON Web Token)
<ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="6.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
</ItemGroup>
- Angular 16 - Component-based frontend framework.
- Angular Material - UI components and responsive design.
- RxJS - Reactive programming with observables.
- SCSS - CSS preprocessor for styling.
- Angular Router - Client-side navigation.
- Charts: Chart.js with ng2-charts
- Styling: Bootstrap 5
"dependencies": {
"@angular/material": "^16.2.14",
"chart.js": "^3.9.1",
"ng2-charts": "^4.1.1",
"bootstrap": "^5.3.3"
}
To run the project, make sure you have the following installed:
- Node.js (v18+) - JavaScript runtime for running Angular.
- Angular CLI (16+) - CLI tool to manage Angular apps.
- .NET 6 SDK - Required to run the backend.
- SQL Server - Database for data persistence.
- Git - Version control.
- npm - Node Package Manager.
- Back-End (API):
WorkoutTrackerAPI
(ASP.NET Core 6.x) - Front-End:
WorkoutTracker
(Angular 16.x) - Tests:
WorkoutTrackerAPI.Tests
(xUnit)
All parts of the project are included in a single solution folder.
git clone https://github.com/Kurulko/Workout-Tracker.git
cd WorkoutTracker
cd WorkoutTrackerAPI
dotnet restore
cd ../WorkoutTracker
npm install
Modify settings in WorkoutTrackerAPI/appsettings.json
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb; Database=Workout; MultipleActiveResultSets=True;"
},
"JwtSettings": {
"SecretKey": "your-secret-key",
"Issuer": "your-issuer",
"Audience": "your-audience",
"ExpirationDays": 7
},
"Admin": {
"Name": "YourName",
"Email": "youremail@email.com",
"Password": "your-password"
}
}
export const environment = {
production: true,
apiUrl: 'https://your-production-api-url/api'
};
const PROXY_CONFIG = [
{
context: [
"/api",
"/resources"
],
target: "https://your-production-api-url/api",
secure: false,
}
]
module.exports = PROXY_CONFIG;
cd WorkoutTrackerAPI
dotnet run
This will start your back-end server
cd ../WorkoutTracker
ng serve
The Angular application will be available at http://localhost:4200
.
The backend API documentation is available via Swagger:
Swagger URL: https://your-production-api-url/swagger
Swagger provides endpoints documentation and testing capabilities.
General information, exercises and calendar with records.
Shows your total progress in a table, chart and calendar.
Lists logged exercises.
General information, workouts, records and calendar with records.
Lists logged equipments with edit and create options.
Its muscles and exercises.
Its parent and child muscles, exercises and muscle sizes.
Shows your preferable measurements and links to other account related pages.
Change your name and/or email.
Lists logged muscle sizes with charts.
Lists logged body weights with charts.
Lists logged exercise records with charts.
Lists logged workout records with charts.
General information and records.
Lists logged users with impersonate option.