https://github.com/matheusmisumoto/workout-logger-api
API from an application project to log and manage workout data to keep traking of your fitness journey.
https://github.com/matheusmisumoto/workout-logger-api
fitness fitness-tracker gradle java jwt jwt-authentication learn mariadb mysql spring-boot spring-data spring-data-jpa spring-security spring-security-jwt workout workout-tracker
Last synced: 5 months ago
JSON representation
API from an application project to log and manage workout data to keep traking of your fitness journey.
- Host: GitHub
- URL: https://github.com/matheusmisumoto/workout-logger-api
- Owner: matheusmisumoto
- License: gpl-3.0
- Created: 2023-10-29T23:18:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T18:26:32.000Z (about 2 years ago)
- Last Synced: 2024-05-17T19:37:32.529Z (about 2 years ago)
- Topics: fitness, fitness-tracker, gradle, java, jwt, jwt-authentication, learn, mariadb, mysql, spring-boot, spring-data, spring-data-jpa, spring-security, spring-security-jwt, workout, workout-tracker
- Language: Java
- Homepage: https://matheusmisumoto.dev/portfolio/fitlogr-workout-tracking-web-app.html
- Size: 415 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FitLogr API

This API is part of FitLogr, an application project to track and manage workout data. Users can register and login using their GitHub account, or create a profile using username and password.
It uses Java 17 with Spring framework, and a relational database (MySQL or MariaDB).
Learn more (in Portuguese): https://matheusmisumoto.dev/portfolio/fitlogr-workout-tracking-web-app.html
## Dependencies
- Spring Boot 3
- Spring Security
- Spring Reactive Web
- Spring Data
- Spring HateOAS
- Validation
## Installing
1. Clone the repository
2. Using your IDE, install the dependencies
3. Modify `application-prod.properties` to use your settings to connect to your database. You can also create a new profile and set `spring.profiles.active` on `application.properties` to use it.
## Avaliable Routes and Endpoints
### Authentication
- `POST /auth/oauth`: Login with GitHub
- `POST /auth/login`: Login with username and passwords
### Exercise database
- `GET /v1/exercises`: List all exercises
- `GET /v1/exercises/{id}`: Get details from an exercise
- `POST /v1/exercises`: Add a new exercise (admin only)
- `PUT /v1/exercises/{id}`: Edit exercise information (admin only)
- `DELETE /v1/exercises/{id}`: Remove an exercise (admin only)
### Workout
- `GET /v1/workouts/user/{userid}/all`: List all workouts from a user
- `GET /v1/workouts/user/{userid}/latest`: List the 10 latest workouts from a user
- `GET /v1/workouts/user/{userid}/{id}`: Retrieve all details from an workout
- `GET /v1/workouts/user/{userid}/exercise/{exerciseid}`: Get latest user stats from an exercise
- `POST /v1/workouts`: Add workout log
- `PUT /v1/workouts/{id}`: Edit workout log, including metadata and list of exercises and sets (admin and self profile only)
- `DELETE /v1/workouts/{id}`: Remove workout log (admin and self profile only)
### Users
- `GET /v1/users/register`: Add a new user
- `GET /v1/users`: List all users (admin only)
- `GET /v1/users/{id}`: Retrieve user information
- `PUT /v1/users/{id}`: Edit user profile (admin and self profile only)
- `DELETE /V1/users/{id}`: Delete user (admin and self profile only)
---
Developed with ☕ by [Matheus Misumoto](https://matheusmisumoto.dev) in Santos, Brazil