2025-04-23 17:14:16 -04:00
2025-04-23 18:09:47 -04:00
2025-04-23 17:14:16 -04:00
2025-04-23 17:14:16 -04:00
2025-04-23 17:14:16 -04:00
2025-04-23 18:09:47 -04:00
2025-04-23 18:09:47 -04:00
2025-04-23 18:09:47 -04:00

Gym Backend (Spring Boot)

A Spring Boot backend application for a gym management system. This application provides RESTful APIs for managing users, gym classes and bookings.

Requirements

  • Java 17 or higher
  • Maven 3.8+
  • PostgreSQL

Getting Started

Running Locally

  1. Clone the repository
  2. Configure PostgreSQL database (default credentials in application.properties)
  3. Run the application:
mvn spring-boot:run

The application will start at http://localhost:8080

Using Docker

  1. Build the Docker image:
docker build -t gym-backend .
  1. Run the container:
docker run -p 8080:8080 gym-backend

API Endpoints

Users

  • GET /api/users: Get all users
  • GET /api/users/{id}: Get user by ID
  • POST /api/users: Create new user
  • PUT /api/users/{id}: Update user

Gym Classes

  • GET /api/classes: Get all classes
  • GET /api/classes/{id}: Get class by ID
  • POST /api/classes: Create new class
  • PUT /api/classes/{id}: Update class
  • DELETE /api/classes/{id}: Delete class

Bookings

  • GET /api/bookings: Get all bookings
  • GET /api/bookings/user/{userId}: Get bookings by user ID
  • POST /api/bookings: Create new booking
  • PUT /api/bookings/{id}/cancel: Cancel booking

File Upload

  • POST /api/upload: Upload files (for profile pictures and class images)
Description
No description provided
Readme 223 KiB
Languages
Java 98.5%
Dockerfile 1.5%