Skip to content

achanta3215/demo-booking-management

Repository files navigation

Glofox Booking Management App

Setup

  • Install Maven on local system
./mvnw spring-boot:run -DskipTests
  • Verify Test Cases
 ./mvnw test
  • (OR) Docker environment
# Build the Docker image
docker build -t demo-booking-management .

# Run the Docker container
docker run -p 8080:8080 demo-booking-management

Tech Stack

  • Java 21, Spring Boot 3.3.4
  • H2 Database: In memory database
  • Lombok: To reduce the boilerplate code
  • OpenAPI: API documentation

Guid to Interact with API

Dependencies

  • Install HTTPie CLI client to perform REST operations

As a Studio owner create a new class

 http POST http://localhost:8080/classes className="Yoga Class" startDate="2024-10-01T00:00:00" endDate="2024-10-20T00:00:00" capacity:=30
  • To fetch all paginated list of classes created
http localhost:8080/classes

As a member of a studio to book a class

  • To create a member
http POST http://localhost:8080/user \
    firstName="John" \
    lastName="Doe" \
    email="[email protected]"
  • Member should be able to book a class
http POST http://localhost:8080/booking \
    classId=1 \
    userId=1 \
    bookingDate="2024-10-01T00:00:00"