{"id":31287731,"url":"https://github.com/junaid-ashraf-56/library_management_system-spring-","last_synced_at":"2026-04-11T10:37:24.748Z","repository":{"id":315723118,"uuid":"1057502379","full_name":"Junaid-Ashraf-56/Library_Management_System-Spring-","owner":"Junaid-Ashraf-56","description":"A modular Library Management System built using Java, Spring MVC, Spring JDBC, Spring AOP, JUnit5, Mockito, PostgreSQL, and Maven—featuring clean architecture, robust testing, and interactive console routing for admin and user operations.","archived":false,"fork":false,"pushed_at":"2025-09-20T08:53:50.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T10:22:08.615Z","etag":null,"topics":["java","junit5","maven","mockito","postgresql","spring","spring-aop","spring-jdbc","spring-mvc"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Junaid-Ashraf-56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-15T20:18:43.000Z","updated_at":"2025-09-20T08:53:52.000Z","dependencies_parsed_at":"2025-09-20T10:22:10.167Z","dependency_job_id":"6da3358a-385a-46fa-95f7-8fd65c4d6f0b","html_url":"https://github.com/Junaid-Ashraf-56/Library_Management_System-Spring-","commit_stats":null,"previous_names":["junaid-ashraf-56/library_management_system-spring-"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Junaid-Ashraf-56/Library_Management_System-Spring-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Junaid-Ashraf-56%2FLibrary_Management_System-Spring-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Junaid-Ashraf-56%2FLibrary_Management_System-Spring-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Junaid-Ashraf-56%2FLibrary_Management_System-Spring-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Junaid-Ashraf-56%2FLibrary_Management_System-Spring-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Junaid-Ashraf-56","download_url":"https://codeload.github.com/Junaid-Ashraf-56/Library_Management_System-Spring-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Junaid-Ashraf-56%2FLibrary_Management_System-Spring-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276737524,"owners_count":25695700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-24T02:00:09.776Z","response_time":97,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","junit5","maven","mockito","postgresql","spring","spring-aop","spring-jdbc","spring-mvc"],"created_at":"2025-09-24T11:05:14.865Z","updated_at":"2025-09-24T11:05:20.496Z","avatar_url":"https://github.com/Junaid-Ashraf-56.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"##  Tech Stack\n\n![Java](https://img.shields.io/badge/Java-11%2B-blue?logo=openjdk)\n![Spring](https://img.shields.io/badge/Spring-MVC%20%7C%20JDBC%20%7C%20AOP-brightgreen?logo=spring)\n![PostgreSQL](https://img.shields.io/badge/Database-PostgreSQL-blue?logo=postgresql)\n![Maven](https://img.shields.io/badge/Build-Maven-orange?logo=apachemaven)\n![JUnit5](https://img.shields.io/badge/Tested%20With-JUnit5%20%26%20Mockito-yellow?logo=java)\n\n\nA **modular Library Management System** built using **Java, Spring MVC, Spring JDBC, Spring AOP, JUnit5, Mockito, PostgreSQL, and Maven**—featuring **clean architecture, robust testing, and interactive console routing** for both admin and user operations.  \n\n---\n\n##  Quick Start  \n\nGet the project running in just a few steps:  \n\n```bash\n# Clone the repo\ngit clone git@github.com:Junaid-Ashraf-56/Library_Management_System-Spring-.git\ncd Library_Management_System-Spring-\n\n# Build the project\nmvn clean install\n\n# Run the application\njava -jar target/library-management-system-0.0.1-SNAPSHOT.jar\n````\n---\n\u003ch2\u003e Blog Posts\u003c/h2\u003e\n\n\u003cp\u003eFor a deeper understanding of the concepts used in this project, check out my Hashnode blogs:\u003c/p\u003e\n\n\u003cul\u003e\n  \u003cli\u003e \u003ca href=\"https://how-pom-xml-works-practical-guide.hashnode.dev\" target=\"_blank\"\u003e\n    Maven POM: How It Simplifies Java Projects\n  \u003c/a\u003e\u003c/li\u003e\n  \n  \u003cli\u003e \u003ca href=\"https://java-vs-spring-jdbc-transactions.hashnode.dev/\" target=\"_blank\"\u003e\n    Spring JDBC \u0026 Transactions: Handling Data the Smart Way\n  \u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n---\n\n##  Table of Contents\n\n* [Features](#features)\n* [Tech Stack](#tech-stack)\n* [Architecture Overview](#architecture-overview)\n* [Screenshots](#screenshots)\n* [Installation](#installation)\n* [Usage](#usage)\n* [Testing](#testing)\n* [Console Navigation](#console-navigation)\n* [Project Structure](#project-structure)\n* [Contributing](#contributing)\n* [Acknowledgments](#acknowledgments)\n\n---\n\n##  Features\n\n* **Book Management**: Add, update, delete, and list books.\n* **User Management**: Manage library members and librarians.\n* **Search**: Find books by title, author, ISBN, or category.\n* **Borrow/Return Workflow**: Track checkouts and returns with due dates.\n* **Role-Based Access**: Admins manage inventory/users; patrons borrow books.\n* **Audit Logging (AOP)**: Automatic logging of key operations.\n* **Data Validation**: Ensures integrity (e.g., unique ISBNs, valid logins).\n\n---\n\n##  Clean Architecture\nThis project is structured following **Clean Architecture** principles, ensuring modularity, maintainability, and clear separation of concerns:\n- **Model Layer**  \n  Defines core domain entities such as `Book`, `Person`, and `Borrow`.\n- **Service Layer**  \n  Encapsulates business logic, including borrowing workflows and user registration.\n- **Repository Layer**  \n  Handles persistence with **Spring JDBC**, ensuring reliable communication with the PostgreSQL database.\n- **Controller / UI Layer**  \n  Provides console-driven interfaces for both Admin and User operations.\n\n\nSpring AOP handles **cross-cutting concerns** like logging, ensuring clean and maintainable code.\n\n---\n\n## Screenshots\n### Welcome to the Library Management System ###\n### Main Menu  \n![Main Menu](src/images/main.png)  \n\n### Admin Dashboard  \n![Admin Dashboard](src/images/admin.png)  \n\n### User Dashboard  \n![User Dashboard](src/images/user.png)  \n\n---\n\n## Installation\n\n1. **Install prerequisites**: Java (11+), Maven, PostgreSQL.\n2. **Database setup**:\n\n   * Create a PostgreSQL database (e.g., `librarydb`).\n3. **Build the project**:\n\n   ```bash\n   mvn clean install\n   ```\n---\n\n## Usage\n\nRun the application:\n\nOr run the packaged JAR:\n\n```bash\njava -jar target/library-management-system-0.0.1-SNAPSHOT.jar\n```\n\n---\n\n## Testing\n\nRun all tests:\n\n```bash\nmvn test\n```\n\nRun a single test:\n\n```bash\nmvn test -Dtest=BookServiceTest\n```\n\n---\n\n## Console Navigation\n\n**Admin Menu**\n\n```\n1. Add Person  \n2. Add Book \n3. Manage Books \n4. List Persons\n5. List Books\n6. Delete Person\n7. Delete Book\n8. Logout\n```\n\n**User Menu**\n\n```\n1. Borrow a Book\n2. Return Book\n3. View Borrowed Books\n4. Search Books\n5. Logout\n```\n\n---\n\n## 📂 Project Structure\n\n```\nLibraryManagementSystem/\n├─ src/\n│  ├─ main/java/\n│  │   ├─ aspect/\n│  │   ├─ config/\n│  │   ├─ controller/\n│  │   ├─ dao/\n│  │   ├─ model/\n│  │   ├─ service/\n│  │   ├─ terminal_ui/\n│  │   └─ Main.java\n│  ├─ main/resources/\n│  └─ test/java/\n│      ├─ controller/\n│      ├─ dao/\n│      ├─ service/\n├─ pom.xml\n└─ README.md\n```\n\n---\n\n## Contributing\n\nContributions are welcome!\n\n* Fork the repo \u0026 create a branch\n* Add tests for new features\n* Follow coding standards\n* Submit a PR with a clear description\n\n---\n\n## Acknowledgments\n\n* **Spring Framework** – for modular development\n* **JUnit \u0026 Mockito** – for testing support\n* **Clean Architecture (Robert C. Martin)** – design inspiration\n* **Baeldung** – helpful Spring/JUnit\n\n---\n✨ **Thank you for using and contributing to this Library Management System!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaid-ashraf-56%2Flibrary_management_system-spring-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunaid-ashraf-56%2Flibrary_management_system-spring-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaid-ashraf-56%2Flibrary_management_system-spring-/lists"}