The Spring Boot Library Management System is a robust platform for managing library operations such as adding, borrowing, and managing books and users. The project is fully responsive, user-friendly, and designed to handle complex relationships between entities seamlessly.
- As a First Time Visitor, I want to:
- Understand the main purpose of the system and its functionality.
- Learn how to interact with the APIs and test them using tools like Postman.
- Explore sample test cases and understand the project structure.
- As a Returning Visitor, I want to:
- Quickly test existing and new API endpoints.
- Fetch book borrowing statistics and user details.
- Report issues or suggest improvements.
- As a Frequent User, I want to:
- Manage books, users, and borrowing operations efficiently.
- Test newly added APIs using Postman collections.
- Contribute to the project by following the guidelines.
- The system uses a professional combination of white backgrounds with subtle blue and green accents for the user interface when extended to frontend development.
- The default typography is clean and minimal, aimed at ensuring readability.
- Example database tables and API request/response examples are included to help understand the flow.
-
📚 Book Management:
- Add, update, delete, and fetch books.
- Borrow and return books.
-
👤 User Management:
- Create, update, delete, and fetch users.
- Associate users with borrowed books.
-
🛠️ API Integration:
- Easily test APIs with tools like Postman.
- Includes ready-to-use Postman collection.
-
🧪 Testing:
- Validated and tested with Spring Boot built-in testing tools.
- Postman : API testings
-
🔒 Security:
- Secure endpoints for safe data handling.
- Java: Backend logic.
- Spring Boot: Application framework.
- Hibernate: ORM for database interaction.
- PostgreSQL/MySQL: Database (supports multiple DBs).
- Lombok: Simplified model creation.
- ModelMapper: Mapping DTOs to entities.
- Postman: API testing.
- Maven: Dependency management.
- Git: Version control.
- IntelliJ IDEA: IDE for development.
The following API testing flow was conducted using Postman:
-
Add a Book:
POST /book
- Example Body:
{ "title": "The Great Gatsby", "author": "F. Scott Fitzgerald", "borrowed": false }
-
Fetch a Book by ID:
GET /book/{id}
-
Update a Book:
PUT /book
- Example Body:
{ "id": 1, "title": "1984", "author": "George Orwell" }
-
Borrow a Book:
PUT /book/borrow/{bookId}/{userId}
-
Delete a Book:
DELETE /book/{id}
Below is a sample response for the GET /book/{id}
request:
{
"statusCode": 200,
"message": "Book Found",
"data": {
"bookId": 1,
"title": "The Great Gatsby",
"author": "F. Scott Fitzgerald",
"borrowed": false
}
}
- Clone the repository:
git clone https://github.com/YOUR-USERNAME/library-management-system.git
- Import the project into your IDE (e.g., IntelliJ IDEA).
- Set up the database in
application.properties
. - Run the application using:
mvn spring-boot:run
- Import the Postman collection provided in the project folder.
- Use the base URL
http://localhost:8080
for all API requests.
This project is licensed under the MIT License. For details, refer to the LICENSE file.
We welcome contributions! Please follow the steps below:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch-name
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch-name
). - Open a Pull Request.
For guidelines, refer to the LICENSE file.
- Spring Boot Documentation: For detailed framework guidelines.
- Stack Overflow: For solving complex issues during development.
- Postman: For seamless API testing.
If you have any questions, feedback, or suggestions, feel free to connect with me:
- LinkedIn: Param Purohit
- GitHub: Purohit1999
I'm always open to collaborations and discussions. Don't hesitate to reach out! ✨
If you found this project helpful, please ⭐ star the repository and share it with others!