- 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
- Java 21, Spring Boot 3.3.4
- H2 Database: In memory database
- Lombok: To reduce the boilerplate code
- OpenAPI: API documentation
- Install HTTPie CLI client to perform REST operations
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
- 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"