Question: using go gin framework Objective of this Task is build Rest APIs for Library Management System . Description Being an online library system, Platform will

using go gin framework Objective of this Task is build Rest APIs for Library Management System . Description Being an online library system, Platform will give the capability for anyone to create their own library. For each Library, we would have 2 type of user profiles (LibraryAdmin, Readers). Where Owner or Creator of the Library can directly onboard LibraryAdmin and he/she can share a sign-up portal to Readers (Fancy enough). For now, System would target only one LibraryAdmin. There is a huge number of different books published by a publication which is written by several authors, and some of which are newer versions of same book. Which is why standard ISBN number is given to each book which globally identifies a unique book. And so would do our Online Library system. Profiles and Roles Admin: o Add or Remove Books o Update the details of Books, like number of copies o List Issue Requests o Approve or disapprove issue request from a user o Issue Info for a Reader Reader: o Raise an issue request for a book. o Search book by Title, Author, Publisher Database Info Database Tables would be as given below. Library: (ID, Name) Users: (ID, Name, Email, ContactNumber, Role, LibID) BookInventory : (ISBN, LibID, Title, Authors, Publisher, Version, TotalCopies, AvailableCopies) RequestEvents: (ReqID, BookID, ReaderID, RequestDate, ApprovalDate, ApproverID, RequestType) IssueRegistery: (IssueID, ISBN, ReaderID, IssueApproverID, IssueStatus, IssueDate, ExpectedReturnDate, ReturnDate, ReturnApproverID) Flows: In the flows, user authentication and authorisation are most important, so for all the flows a base need would be for every user to pass their email address. System would use basic authentication (if user exists in table, then its a valid user) and authorisation (user will have the access based on the role ) Library Owner Flows: Library Creation: This would include registering a new Library and adding a user with Role Owner. Library cannot be registered, if the same name library already exists. If the same name library already exists, we need to ask user to define a new name. Reader: Search Book: Reader would need capability to search for book by title, author, publisher and also need to know the status if book is available or not. If a book is not available, user would need to know the latest when the book will be available. Raise an issue request: With book ID and email address, the reader can raise issue request. Books availability is defined as the copies of same book which are not issued yet, are the available books. If a request is being raised for the book which is not available, the request should get rejected immediately. Library Admins Flows: Adding Books: While adding the books in inventory, book details will be passed, along with LibAdmins email address. If the book is already registered, expectation is that system would automatically increment the number of copies. Removing Book: To remove a book, well keep decrementing the number of copies till 0. The issued copies of the books cannot be removed. Update Book: To update the details of book, user is expected to pass the ISBN and the information to be updated. List Issue Request: For Approving or Rejecting any issue request, Admin would first list the issue requests in his Library Approve or Reject Issue Request: From the listing, Admin would pick the request ID and approve the issue request, setting the request with approver ID and approval date, and setting the issue registry accordingly.
Tasks: Task 1: Design and Create Database as per above information. Here, well need to design and create Database as per above information, with proper field types and relations. Here well need to make sure that all the SQL Queries used should be available in SQL Files and the ER Diagram should be available.
Task 2: Design and Implement Backend APIs The APIs should cover the validation of role and the anonymity as mentioned in the flows. As there could be multiple Readers and multiple Admins requesting in parallel, the ACID properties should be made sure. Best Practice and Modularisation should be there in APIs. Unit Testcases of the APIs should be there with maximum code-coverage checked and exported as report

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!