First and foremost, a massive thank you for your interest in contributing to the Smart Library Management System! This document explains how to get set up, what the coding standards are, and how to pick up issues and submit pull requests.
Before you can run the project locally you will need the following installed:
- Java 21 — You can download it here
- Maven — comes bundled with IntelliJ IDEA if that's your IDE or download here
- IntelliJ IDEA (recommended) or any Java IDE
- Git
- Fork this repository to your account on GitHub.
- Clone your fork to your local machine:
git clone https://github.com/YOUR_USERNAME/SmartLibraryManagementSystem.git- Open the project in IntelliJ IDEA
- Let Maven load all the dependencies automatically
- Run the tests to confirm everything is working:
mvn test- Start the application:
mvn spring-boot:run- Open your browser and go to
http://localhost:8080/swagger-ui/index.htmlto see the API
- Follow standard Java naming conventions — classes use PascalCase, methods and variables use camelCase
- Every new method should have a brief comment explaining what it does
- All new features must include unit tests in the
/src/test/java/za/ac/cput/directory - Tests must pass before submitting a pull request — the CI pipeline will check this automatically
- Keep methods small and focused — if a method is doing more than one thing, maybe consider splitting it
- Go to the Issues tab and look for issues labelled
good-first-issue - Comment on the issue to let others know that you are working on it
- Create a new branch from
mainwith a descriptive name:
git checkout -b feature/your-feature-name- Make your changes and write tests
- Commit your changes with a clear message:
git commit -m "Add feature: brief description"- Push your branch and open a pull request against
main - Fill in the PR description explaining what you changed and why
- Then wait for the CI pipeline to pass, if all 81 tests pass you are good to go and I will review your PR
src/main/java/za/ac/cput/
domain/ — Core domain classes (Book, Member, Loan etc.)
repositories/ — Repository interfaces
repositories/inmemory/ — In-memory implementations
services/ — Business logic layer
api/ — REST API controllers
config/ — Spring Boot configuration
src/test/java/za/ac/cput/
services/ — Service unit tests
repositories/ — Repository tests
# Run all tests
mvn test
# Run a specific test class
mvn test -Dtest=BookServiceTest
# Generate a coverage report
mvn test && open target/site/jacoco/index.htmlThank you once again for your contribution!