{"id":19000874,"url":"https://github.com/tbtiberiu/bookshelfbuddy","last_synced_at":"2026-04-18T13:31:51.231Z","repository":{"id":160834963,"uuid":"618487588","full_name":"tbtiberiu/BookshelfBuddy","owner":"tbtiberiu","description":"ASP.NET REST API for an online book inventory website.","archived":false,"fork":false,"pushed_at":"2023-06-24T12:54:27.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-25T20:47:56.588Z","etag":null,"topics":["asp-net","csharp","sql-server"],"latest_commit_sha":null,"homepage":"","language":"C#","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/tbtiberiu.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}},"created_at":"2023-03-24T15:18:25.000Z","updated_at":"2024-07-30T07:11:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"01fcda62-aa73-4ea2-a883-6ecf37c308d9","html_url":"https://github.com/tbtiberiu/BookshelfBuddy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tbtiberiu/BookshelfBuddy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2FBookshelfBuddy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2FBookshelfBuddy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2FBookshelfBuddy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2FBookshelfBuddy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbtiberiu","download_url":"https://codeload.github.com/tbtiberiu/BookshelfBuddy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2FBookshelfBuddy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["asp-net","csharp","sql-server"],"created_at":"2024-11-08T18:08:34.998Z","updated_at":"2026-04-18T13:31:49.186Z","avatar_url":"https://github.com/tbtiberiu.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BookshelfBuddy API\n\n## Description\n\nThis simple application allows users to search for books and save them to a database. Users can also view their saved books and delete them from the database.\n\nBooks are divided into shelves. Users can add books to a shelf, move and remove them from a shelf. Users can also create new shelves.\n\n## Table of Contents\n\n- [BookshelfBuddy API](#bookshelfbuddy-api)\n  - [Description](#description)\n  - [Table of Contents](#table-of-contents)\n  - [Setup](#setup)\n    - [Clone Repository](#clone-repository)\n    - [Database Creation](#database-creation)\n    - [Running the API](#running-the-api)\n    - [Register and Login](#register-and-login)\n  - [Endpoints](#endpoints)\n    - [Books](#books)\n    - [Shelves](#shelves)\n  - [Database Diagram](#database-diagram)\n\n## Setup\n\n### Clone Repository\n\nClone the repository to your local machine using the following command:\n\n```bash\ngit clone https://github.com/tbtiberiu/BookshelfBuddy.git\n```\n\n### Database Creation\n\n1. Open Solution in Visual Studio\n2. Open Package Manager Console\n3. Run `Update-Database` in the Package Manager Console\n   ```\n   PM\u003e Update-Database\n   ```\n\n### Running the API\n\nRun the API from Visual Studio (`F5`).\n\nA console window will open and display the port the API is running on.\n\nOpen a browser and navigate to `localhost:7027/api/swagger/index.html` to view the Swagger UI for the API.\n\n### Register and Login\n\nBefore using the API, you need to register a user and log in. Users can have roles of either `ShelfOwner` (0) or `Admin` (1).\n\nTo register a user, navigate to the `POST /api/Users/register` endpoint and click the `Try it out` button.\n\nEnter the following JSON in the `Request body` section:\n\n```json\n{\n  \"firstName\": \"John\",\n  \"lastName\": \"Doe\",\n  \"email\": \"test@example.com\",\n  \"password\": \"test\",\n  \"role\": 0\n}\n```\n\nClick the `Execute` button to register the user.\n\nTo log in, navigate to the `POST /api/Users/login` endpoint and click the `Try it out` button.\n\nEnter the following JSON in the `Request body` section:\n\n```json\n{\n  \"email\": \"test@example.com\",\n  \"password\": \"test\"\n}\n```\n\nClick the `Execute` button to log in.\n\nThe response will contain a `token` that you can use to authenticate requests for the shelf owner created.\n\nTo authenticate requests, click the `Authorize` button at the top of the Swagger UI.\n\nEnter `bearer \u003ctoken\u003e` in the `Value` field and click the `Authorize` button.\n\nThe `token` will be automatically added to the `Authorization` header for all requests.\n\nNow you can use the API to search for books, create shelves, add books to shelves, move books between shelves and delete books from shelves.\n\n## Endpoints\n\n### Books\n\n- `GET /api/Books` will return all books in the database.\n\n- `GET /api/Books/{id}` will return the book with the specified id.\n\n- `POST /api/Books` will add a book to a shelf.\n\n- `PUT /api/Books` will update the book specified.\n\n- `DELETE /api/Books/{id}` will delete the book with the specified id.\n\n### Shelves\n\n- `GET /api/Shelves` will return all shelves in the database.\n\n- `GET /api/Shelves/{id}` will return the shelf with the specified id.\n\n- `POST /api/Shelves/admin` will add a shelf to the database for the admin user.\n\n- `POST /api/Shelves/shelfOwner` will add a shelf to the database for the authenticated user.\n\n- `PUT /api/Shelves` will update the shelf specified.\n\n- `DELETE /api/Shelves/{id}` will delete the shelf with the specified id.\n\n## Database Diagram\n\n![Database Diagram](./BookshelfBuddyDBDiagram.png)\n\n[Back to Top](#bookshelfbuddy-api)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbtiberiu%2Fbookshelfbuddy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbtiberiu%2Fbookshelfbuddy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbtiberiu%2Fbookshelfbuddy/lists"}