The Web Application For digitalize ~(Sylhet Polytechnic Institute)
The Sylhet Polytechnic Library (
spi) Management System is a web-based solution primarily developed for Library Administrators to efficiently manage library operations such as book inventory, student membership, book issuing, and returns. It also facilitates controlled student access, ensuring accountability and streamlined management.
Developed Engineers: |
AN Mamun
- To simplify the responsibilities of the library administrator
- To digitize and automate manual library tasks
- To allow students to create accounts, request books, and track borrow history
- To provide a secure and verified onboarding process for students
- Full access to the system
- Verify new student accounts
- Add/update/delete books
- Track issued/returned books
- Manage fines and overdue alerts
- Can register an account (inactive by default)
- Must be approved by the admin before access
- Once approved, can:
- Browse available books
- Borrow books (based on borrowing rules)
- Return books
- View personal borrow history
Student Registration: - Student signs up and submits their personal and academic information.
Admin Verification: - Admin reviews the student data and activates the account upon approval.
Access Granted: - Once activated, students can log in and use the library system (borrow, return, search books, etc.)
- Student Registration Students register and wait for admin approval
- Admin Panel Admin dashboard to manage books and student accounts
- Book Management Add, edit, delete, and categorize books
- Borrow & Return Issue and return books, track deadlines
- Fine Calculation Automatic fine generation for late returns
- Borrowing History Students and admins can view borrowing logs
- Search & Filter Quickly search books by name, author, category, etc.
Djangoβ Powerful Python web frameworkDjango REST Framework (DRF)β Build RESTful APIs quicklyJWT Authenticationβ Secure token-based authenticationdrf-spectacularβ Automatic API schema/documentation generationPostgreSQLβ Production-ready relational database
React.jsβ Dynamic frontend developmentTailwind CSSβ Modern utility-first CSS stylingSupabaseβ Open source Firebase alternative (for storage or auth if used)
This project provides authentication and admin dashboard APIs using Django REST Framework.
| Method | Endpoint | Description | Example |
|---|---|---|---|
| POST | /user/register/ |
Register a new user (get-notification) | Example |
| POST | /user/login/ |
Login and receive token | Example |
| POST | /user/admin_login/ |
Login and receive token | Example |
| POST | /user/logout/ |
Logout and delete token | Example |
This API is designed for admin users to manage user profiles securely via Token authentication.
For all endpoints, admin authentication is required using the token via:
headers: {
'Content-Type': 'application/json',
'Authorization': 'Token ecb093d6304e1ce411b7cbfabeb4f44a846e08d8'
}| Method | Endpoint | Description | Example |
|---|---|---|---|
| GET | /user/profile/ |
Get all active profiles | Example |
| GET | /user/profile/unactive/ |
Get all inactive profiles(admin) | Example |
| POST | /user/profile/ |
Create a new profile (admin) | Example |
| PUT | /user/profile/<pk>/ |
Fully update a profile (admin) | Example |
| PATCH | /user/profile/<pk>/ |
Partially update a profile (admin) | Example |
| DELETE | /user/profile/<pk>/ |
Delete a profile (admin) | Example |
| POST | /user/profile/<pk>/activate/ |
Activate a deactivated profile (admin)(get-notification) | Example |
?role=student , ?phone=017XXXXXXXX, ?email=user@example.com, ?registration=123456, department=CSE, ?session=20-21, ?nationality_type=NID, ?nationality_number=1234567890,
| Method | Endpoint | Description |
|---|---|---|
| GET | /book/books/ |
Get all books |
| POST | /book/books/ |
Create a new book (admin) |
| PUT | /book/books/<pk>/ |
Fully update a book (admin) |
| PATCH | /book/books/<pk>/ |
Partially update a book (admin) |
| DELETE | /book/books/<pk>/ |
Delete a book (admin) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /category/ |
Get all categories |
| GET | /category/<pk>/ |
Get a specific category |
| POST | /category/ |
Create a new category (admin) |
| PUT | /category/<pk>/ |
Fully update a category (admin) |
| PATCH | /category/<pk>/ |
Partially update a category (admin) |
| DELETE | /category/<pk>/ |
Delete a category (admin) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /transaction/ |
Get all transactions (admin token), or only the user's transactions (user token) |
| GET | /transaction/<pk>/ |
Get a specific transaction (admin or the related user) |
| POST | /transaction/ |
Create a new transaction request (authenticated user only) |
| PATCH | /transaction/<pk>/ |
Admin-only: Update transaction to 'borrowed' status if book is available |
| DELETE | /transaction/<pk>/ |
Admin-only: Delete a transaction |
You can filter GET requests to endpoints , using the following query parameters:
View API schema and test endpoints via Spectacular UI:
π Swagger UI
π ReDoc UI (Update links based on deployment)
All protected endpoints require token-based authentication.
Use the following header format:
Authorization: Token <your_token_here>{
"username": "string", unique
"full_name": "string",
"password": "string",
"email": "string", unique
"phone": "string", unique
"roll": "string", unique
"registration": "string", unique
"session": "string",
"department": "string",
"address": "string",
"blood": "string",
"gender":"MALE/FEMALE",
"birthday":"Date",
"nationality_type": "NID/BIRTH",
"nationality_number": "string", unique
"role": "student/admin" // Default - student
} {
"email": "string",
"password": "string"
}{
"token_id": "string"
} {
"id": 1,
"user": "anmamun0",
"full_name": "Nur Mohummod Al Mamun",
"role": "admin",
"email": "almamun20044@gmail.com",
"phone": "01782059949",
"roll": "676229",
"registration": "1502221113",
"session": "2122",
"address": "Sylhet, Bangladesh - Bangladesh",
"blood": "O+",
"nationality_type": "birth",
"nationality_number": "12345678909876543"
}- POST Field example json data
{
"image": "https://example.com/book.jpg",
"title": "The Example Book",
"author": "John Doe",
"isbn": "9781234567897",
"language": "English",
"description": "This is a sample book description.",
"copies": 10,
"available": 8,
"category_ids": [1, 2]
}{
"id": 1,
"name": "Python Programming-hero",
"slug": "python-programming"
}{
"id": 1,
"category": [],
"image": "https://anmamun0.vercel.app/",
"title": "Updated -2",
"author": "hero",
"isbn": "01",
"language": "Bangla",
"description": "asdf",
"copies": 10,
"available": 3
} {
"id": 0,
"profile": "string",
"request_date": "2025-05-24T20:41:41.172Z",
"due_date": 3,
"borrow_date": "2025-05-24T20:41:41.172Z",
"return_date": "2025-05-24",
"status": "pending/borrowed/returned", // Default: pending
"book": 0
} body:{
"due_date": "int",
"book": "int"
}
headers {
"Authorization" : "Token 55a1266207cbd56c22a9e5fb508648dfda566e51"
}