{"id":21571478,"url":"https://github.com/villaleo/library-api","last_synced_at":"2026-04-20T05:34:54.300Z","repository":{"id":67709723,"uuid":"575549095","full_name":"villaleo/library-api","owner":"villaleo","description":"A small API for patrons to checkout and return books.","archived":false,"fork":false,"pushed_at":"2023-01-19T00:20:03.000Z","size":228,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T06:16:09.694Z","etag":null,"topics":["maven","rest-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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/villaleo.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}},"created_at":"2022-12-07T19:03:22.000Z","updated_at":"2024-02-08T00:42:24.000Z","dependencies_parsed_at":"2023-02-21T22:15:50.101Z","dependency_job_id":null,"html_url":"https://github.com/villaleo/library-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/villaleo/library-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villaleo%2Flibrary-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villaleo%2Flibrary-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villaleo%2Flibrary-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villaleo%2Flibrary-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/villaleo","download_url":"https://codeload.github.com/villaleo/library-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/villaleo%2Flibrary-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32034776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["maven","rest-api","spring-boot"],"created_at":"2024-11-24T11:16:25.719Z","updated_at":"2026-04-20T05:34:54.278Z","avatar_url":"https://github.com/villaleo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library API\nAn API for checking out and returning books built with Java using the SpringBoot framework. This is a project for\nCST 438 (Software Engineering) at CSU Monterey Bay.\n\nThis assignment did not require unit tests to be coded. Instead, a document (LibraryAPI Unit Test Report.pdf) covering\nthe different use cases and paths can be found in the root project directory.\n\n## Usage\n### Setup the environment\n1. Download and open the repository.\n2. Check `pom.xml` for the project dependencies and download them.\n3. Create the config file `application.properties` in the path `src/main/resources`. This is where database\nconfigurations will go. There's an example of how I have mine configured.\n\n```properties\n# database properties\nspring.datasource.url = jdbc:mysql://localhost:3306/library_api\nspring.datasource.username = \u003cYOUR USERNAME\u003e\nspring.datasource.password = \u003cYOUR PASSWORD\u003e\nspring.jpa.show-sql = true\n\nserver.servlet.session.persistent = false\nspring.jpa.hibernate.ddl-auto = update\nspring.datasource.hikari.maximum-pool-size = 5\n```\n\n### Creating the database tables\nThere are two tables used in this project: a `Book` and `Patron` table.\nThe code to generate these tables are in the file `src/main/resources/data.sql`. This file will create a new schema\n`library_api` with the respective tables.\n\nIf you run the file, the tables and schema will be created. If no action is\ndone at this stage, I believe the database tables will automatically be created when the program is executed. This is \nnot recommended, however since the tables will be placed in the current default schema set in MySQL.\n\n### Building and Running\nIn this project, the main method is found in\n`src/main/java/com/libraryapi/LibraryApiApplication.java`. Since the project is built using the SpringBoot framework,\nthe main method must be annotated with `@SpringBootApplication`.\n\nExecute the main method to run the application. \n\n## Endpoints\nI recommend using a tool like Postman to execute the requests.\n* `book/{book_id}/checkout/{patron_id}`: Check out a book\n* `book/{book_id}/return`: Return a book\n* `patron/{patron_id}/checkouts`: List a patron's checkouts\n* `patron/{patron_id}`: View a patron's information\n\n**Additional endpoint information can be found by reading the code for the controller found at \n`src/main/java/com/libraryapi/controller/LibraryController.java`.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvillaleo%2Flibrary-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvillaleo%2Flibrary-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvillaleo%2Flibrary-api/lists"}