Skip to content

Latest commit

Β 

History

History
105 lines (90 loc) Β· 3.09 KB

File metadata and controls

105 lines (90 loc) Β· 3.09 KB

Library Management System (Django Backend)

Library Management System is built using Django and provides essential functionalities for managing books, users, and transactions efficiently.

πŸš€ Overview

This project is designed to help users manage a library system with features such as book browsing, borrowing, returning, and reservations. Administrators can manage books, users, and fines seamlessly.

πŸ›  Tech Stack

  • Backend: Django, Django REST Framework (DRF)
  • Database: SQLite
  • Authentication: Django's built-in authentication system

πŸ“Œ Features

User Features:

  • User Registration & Authentication (Sign up, Login, Logout, Password Reset)
  • Browse, Search, and Filter Books
  • Borrow and Return Books
  • Manage Book Reservations
  • View Borrowing History and Fines

Admin Features:

  • Manage Books (Add, Edit, Delete)
  • Manage Users
  • Manage Fines and Borrowing Records

πŸ“‚ Project Structure

project_root/
│── library_management/  # Main Django app
β”‚   β”œβ”€β”€ models.py        # Database models
β”‚   β”œβ”€β”€ views.py         # API views
β”‚   β”œβ”€β”€ serializers.py   # API serializers
β”‚   β”œβ”€β”€ urls.py          # API endpoints
│── db.sqlite3           # SQLite database file
│── manage.py            # Django management script
│── requirements.txt     # Project dependencies

πŸ”§ Installation

Prerequisites:

  • Python 3.x
  • Django

Steps:

  1. Clone the repository:
    git clone https://github.com/your-username/library-management.git
    cd library-management
  2. Create a virtual environment and activate it:
    python -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Apply database migrations:
    python manage.py migrate
  5. Create a superuser:
    python manage.py createsuperuser
  6. Run the development server:
    python manage.py runserver
  7. Access the API at:
    http://127.0.0.1:8000/
    
  8. Admin panel:
    http://127.0.0.1:8000/admin/
    

πŸ“œ API Endpoints

Method Endpoint Description
POST /api/auth/signup/ Register a new user
POST /api/auth/login/ Login user
GET /api/books/ List all books
GET /api/books/<id>/ Retrieve a book
POST /api/books/borrow/ Borrow a book
POST /api/books/return/ Return a book
GET /api/history/ View borrowing history
POST /api/payment/ payment through paystack

πŸ— Future Improvements

  • Email notifications for due dates
  • Integrate payment system for fines
  • Advanced book recommendation system

🀝 Contributing

Want to contribute? Fork the repo, create a feature branch, and submit a PR!

πŸ“œ License

This project is licensed under the MIT License.