This is a full-stack Library Management System web application built using:
- Frontend: Angular
- Backend: .NET Core Web API
- Database: SQL Server
The application allows users to add, borrow, and search books. A token-based lending system is implemented to manage borrowing rights.
- 🔒 Login and Logout functionality
- ➕ Add books (Logged-in users only)
- 📄 View available books for borrowing
- 📤 Borrow a book (if tokens available)
- 🔄 Token transfer between users on lending/borrowing
- 👁️ View detailed book info in modal popup
- 🎫 Display tokens of logged-in user in header
- 🔍 Search books by name, author, or genre
- 📚 View books borrowed/lent by the user
| Layer | Technology |
|---|---|
| Frontend | Angular 14+ |
| Backend | .NET Core 6+ Web API |
| Database | SQL Server |
| UI Styling | Angular Material |
| Authentication | Jwt |
| Name | Username | Password | Tokens |
|---|---|---|---|
| User 1 | user1 | password1 | 3 |
| User 2 | user2 | password2 | 2 |
| User 3 | user3 | password3 | 4 |
| User 4 | user4 | password4 | 1 |
- Open
dotnet backend/in Visual Studio - Restore NuGet packages
- Restore
borrow.bakusing SQL Server Management Studio - Update
appsettings.jsonwith your DB connection string - Run the API
run: `https://localhost:5001
cd angular frontend
npm install
ng serve
Runs on: http://localhost:4200
👤 User Journey
User logs in using default credentials.
Dashboard shows:
Available books
“Borrow” button
“Add New Book” button
Token count in header
Clicking on a book shows full details in a modal.
Borrowing a book:
Requires at least 1 token
Deducts 1 token from borrower
Adds 1 token to lender
Users can search books by name, genre, or author.
Bonus: Users can see books they have added or borrowed.
📦 Assumptions
Each book is unique by name.
No real authentication — default users are hardcoded.
All validations are done client-side (with server-side backups).
Books cannot be borrowed twice.
🧑💻 Developer Guidelines
✅ Follows N-Layer architecture
✅ Proper form validation
✅ API uses DTOs and separates concerns
✅ Angular routing has basic authorization guards
✅ Includes exception handling at API level
🗃️ Deliverables
✔️ Angular Frontend (angular frontend/)
✔️ .NET Web API Backend (dotnet backend/)
✔️ SQL Server Backup File (borrow.bak)
✔️ This README.md file