{"id":18151414,"url":"https://github.com/blandoncj/library-management-api","last_synced_at":"2026-04-28T12:38:36.299Z","repository":{"id":318486030,"uuid":"1071489354","full_name":"blandoncj/library-management-api","owner":"blandoncj","description":"Library Management System API built with Spring Boot, featuring JWT authentication, role-based authorization, and complete CRUD operations","archived":false,"fork":false,"pushed_at":"2025-10-07T12:28:23.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T14:29:47.299Z","etag":null,"topics":["api","backend","java","jpa","jwt","mysql","rest-api","restful-api","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blandoncj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-10-07T12:22:07.000Z","updated_at":"2025-10-07T12:30:54.000Z","dependencies_parsed_at":"2025-10-07T14:29:49.286Z","dependency_job_id":"96aa6315-56e3-4f18-b92d-a67d5004e1f4","html_url":"https://github.com/blandoncj/library-management-api","commit_stats":null,"previous_names":["blandoncj/library-management-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/blandoncj/library-management-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blandoncj%2Flibrary-management-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blandoncj%2Flibrary-management-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blandoncj%2Flibrary-management-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blandoncj%2Flibrary-management-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blandoncj","download_url":"https://codeload.github.com/blandoncj/library-management-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blandoncj%2Flibrary-management-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32381691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","backend","java","jpa","jwt","mysql","rest-api","restful-api","spring-boot"],"created_at":"2024-11-02T01:07:35.523Z","updated_at":"2026-04-28T12:38:36.286Z","avatar_url":"https://github.com/blandoncj.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library Management System API\r\n\r\n![Library Management](https://img.shields.io/badge/Java-Spring%20Boot-brightgreen)\r\n![MySQL](https://img.shields.io/badge/Database-MySQL-blue)\r\n![REST API](https://img.shields.io/badge/REST-API-orange)\r\n![JWT](https://img.shields.io/badge/JWT-Authentication-blueviolet)\r\n![License](https://img.shields.io/badge/license-MIT-green)\r\n\r\n![Project Overview](docs/images/image.png) \r\n\r\nA **Library Management System API** built using **Java Spring Boot** and **MySQL**. This system allows both **administrators** and **customers** to manage a library's catalog, users, and book loans efficiently.\r\n\r\n## Features ✨\r\n\r\n### Administrator Features (1️⃣)\r\n- **Manage Books**: List, search, register, edit, and deactivate books.\r\n- **Manage Genres**: List, search, register, edit, and deactivate genres.\r\n- **Manage Loans**: List and search loans, control book availability based on stock.\r\n\r\n### Customer Features (2️⃣)\r\n- **User Registration**: Customers can create their accounts.\r\n- **Search Books**: Customers can browse and search for books available in the library.\r\n- **Request Loans**: Customers can request loans for available books.\r\n- **Update Account**: Edit account information.\r\n- **Delete Account**: Permanently remove their account.\r\n\r\n---\r\n\r\n### Security Features 🔐\r\n- **Role and Permission Management**: The system uses `Role` and `Permission` entities to handle user roles (e.g., **admin**, **customer**) and permissions for controlling the resources.\r\n- **JWT Authentication**: Implemented **JSON Web Token (JWT)** authentication for secure login, ensuring that only authenticated users with with the appropriate roles can access certain endpoints.\r\n- **Spring Security**: The system integrates **Spring Security** to protect the API, managing role-based access control to different resources and operations.\r\n\r\n---\r\n\r\n## Technologies Used 🚀\r\n\r\n- **Java** with **Spring Boot** for backend API development.\r\n- **MySQL** for database management.\r\n- **Maven** for dependency management.\r\n- **JPA (Java Persistence API)** for database interaction.\r\n- **JWT** for secure authentication.\r\n- **Spring Security** for role-based authorization.\r\n- **RESTful Services** for communication between frontend and backend.\r\n\r\n--- \r\n\r\n## Getting Started 🛠️\r\n\r\n### Prerequisites\r\n\r\nMake sure you have the following installed:\r\n\r\n- [JDK 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)\r\n- [Maven](https://maven.apache.org/install.html)\r\n- [MySQL](https://www.mysql.com/downloads/)\r\n\r\n### Installation\r\n\r\n1. Clone the repository:\r\n\r\n   ```bash\r\n   git clone https://github.com/blandoncj/library-management-api.git\r\n   ```\r\n\r\n2. Navigate to the project directory:\r\n\r\n   ```bash\r\n   cd library-management-api\r\n   ```\r\n\r\n3. Set up the MySQL database:\r\n\r\n   - Create a MySQL database named `library_db` or as specified in `application.properties`.\r\n   - Update the MySQL connection credentials in `src/main/resources/application.properties`:\r\n  \r\n     ```properties\r\n     spring.datasource.url=jdbc:mysql://localhost:3306/library_db\r\n     spring.datasource.username=your-username\r\n     spring.datasource.password=your-password\r\n     spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\r\n     spring.jpa.hibernate.ddl-auto=create\r\n     spring.jpa.properties.hibernate.format_sql=true\r\n     spring.jpa.show-sql=true\r\n     security.jwt.key.private=your-secret-key\r\n     security.jwt.user.generator=your-user-generator\r\n     ```\r\n\r\n4. Install dependencies and build the project using Maven:\r\n\r\n   ```bash\r\n   mvn clean install\r\n   ```\r\n\r\n5. Run the application:\r\n\r\n   ```bash\r\n   mvn spring-boot:run\r\n   ```\r\n\r\n--- \r\n\r\n## Database Schema 🗂️\r\n\r\nThe system uses a **relational database (MySQL)** with the following main entities:\r\n\r\n- **Book**: Represents a book in the library.\r\n- **Genre**: Represents the genre of a book.\r\n- **User**: Represents a user of the library.\r\n- **Loan**: Represents a book loan requested by a customer.\r\n- **Role**: Represents the role of a user (e.g., Admin, Customer).\r\n- **Permission**: Represents specific permissions that can be assigned to roles.\r\n---\r\n\r\n## Future Improvements 🚧\r\n\r\nHere are some future enhancements planned for the system: \r\n\r\n- Implement **unit tests** and **integration tests** for the API.\r\n- Improve the **pagination** in listing endpoints.\r\n- Deploy the API on a cloud service (e.g., Heroku or AWS).\r\n\r\n---\r\n\r\n## Contribution Guidelines 🤝\r\n\r\nContributions are welcome! If you'd like to help improve this project, please follow these steps:\r\n\r\n1. Fork the repository.\r\n2. Create a new branch (`git chekout -b feature/new-feature`).\r\n3. Commit your changes (`git commit -m 'Add a new feature'`).\r\n4. Push to the branch (`git push origin feature/new-feature`).\r\n5. Open a pull request.\r\n\r\n---\r\n\r\n## License 📝\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\r\n\r\n---\r\n\r\n## Contact 📧\r\n\r\nFor any questions or feedback, feel free to reach out at:\r\n\r\n- **Email**: jacoboblandon94@gmail.com\r\n- **GitHub**: [blandoncj](https://github.com/blandoncj)\r\n\r\n---\r\n\r\n**Enjoy managing your library! 📚**\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblandoncj%2Flibrary-management-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblandoncj%2Flibrary-management-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblandoncj%2Flibrary-management-api/lists"}