How gaitan19/borrowingsystemapi works
Project Overview
• This is a RESTful API (“BorrowingSystemAPI”) built on .NET 7 / C# for managing item‐borrowing workflows.
• Core capabilities include user authentication (JWT), item management, loan/renewal/return flows, role‐based access control (Admin vs. regular User), and reporting.
• Communicate, at a high level, the interactions between external actors (end users, admins, external systems) and the API’s primary functions.
• System scope: what the Borrowing System offers and who uses each feature.
Actors
• “Guest” (unauthenticated user – can register, log in)
• “User” (authenticated borrower – can view items, create borrowing requests, view their history)
• “Admin” (role with extra privileges – can manage items, manage users, approve/reject requests, view reports)
Use Cases (ellipses inside the system boundary)
a. Authentication & User Management
• Register
• Log In (obtain JWT)
• Log Out (invalidate token or client‐side discard)
• Manage Profile (update user info)
b. Item & Catalog Management
• View Available Items
• (Admin) Create / Update / Delete Item
c. Borrowing Workflow
• Create Borrowing Request
• View Own Requests (status: pending, approved, rejected)
• (Admin) Approve / Reject Request
• View Loaned Items
• Renew Loan
• Return Item
d. Reporting & Auditing
• View Overdue Items Report
• View User Borrowing History
• (Admin) Generate System Reports
e. Movement & MovementType (audit trails)
• Log Movement (automatic on any state change)
System Boundary
• Use-case ellipses inside this rectangle; actors outside.
Relationships & Notes
• Associate lines between each actor and the use cases they invoke.
• Guest → Register, Log In
• User → View Available Items, Create Borrowing Request, View Own Requests, Renew Loan, Return Item
• Admin → All user use cases + Create/Update/Delete Item, Approve/Reject Request, Generate Reports, Manage Users
• Use «include» or «extend» relationships for cross‐cutting concerns:
• Every secured use case «include» Authenticate User (JWT)
• Approve/Reject Request «extend» Create Borrowing Request (optional notation)