Skip to content

ADR-projects/Library-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Library Management System


πŸ“– Project Description

The Library Management System is a web-based application built using Django that efficiently manages users, books, and borrowing records.

It simulates real-world library operations with features like dynamic fine calculation, book availability tracking, and a structured CRUD system with a clean UI and scalable backend architecture.


πŸ“‘ Table of Contents


πŸš€ Features

πŸ“Œ Core Features

  • User Management (Add, Edit, Delete, View Details)
  • Book Management (CRUD operations)
  • Borrow & Return System
  • Open Records (Active borrowings)
  • Closed Records (Returned books)

πŸ’° Fine System (Dynamic)

  • β‚Ή2 per day after 7 days

  • Calculated dynamically (not stored in DB)

  • Logic:

    • Uses current date for open records
    • Uses return_date for closed records
  • Always up-to-date and accurate


πŸ“š Book Management Enhancements

  • Book Availability Tracking Available = Stock - Borrowed (Open Records)
  • Prevent borrowing when stock is unavailable

🧠 Smart Validations

  • Prevent borrowing when book is out of stock
  • Backend-controlled fields (status, issue_date, return_date)
  • Form validation using Django ModelForms

🎨 UI Features

  • Clean table-based layout
  • Separate pages for Add / Edit / Detail views
  • Reusable layout using base.html
  • Simple and intuitive navigation

βš™οΈ Advanced Settings

  • Status handled internally (not exposed in forms)
  • Automatic issue_date generation
  • return_date updated only during return action
  • Fine calculated using model method (calculate_fine())
  • Optimized queries using Django ORM

🎨 User Experience

  • Minimal and clean UI
  • Consistent layout using base.html
  • Easy navigation across modules
  • Structured data display in tables
  • Beginner-friendly and intuitive design

πŸ” Security & Stability

  • CSRF protection enabled in all forms
  • Django ORM prevents SQL injection
  • Backend-controlled business logic
  • Safe date/time handling using Django utilities
  • Validated form inputs

⚑ SEO & Optimization

  • Lightweight templates
  • Reusable base layout
  • Efficient database queries
  • Scalable project structure

🧰 Tech Stack

Frontend

  • HTML
  • CSS

Backend

  • Python
  • Django

Database

  • MySQL
  • MariaDB

πŸ— System Architecture

User β†’ Template (HTML)
        ↓
      Views
        ↓
      Forms
        ↓
      Models
        ↓
     Database

πŸ“‚ Project Structure

librarymanagement/

β”œβ”€β”€ manage.py

β”œβ”€β”€ myproject/
β”‚   β”œβ”€β”€ settings.py
β”‚   β”œβ”€β”€ urls.py

β”œβ”€β”€ myapps/
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ views.py
β”‚   β”œβ”€β”€ forms.py
β”‚   β”œβ”€β”€ urls.py

β”‚   β”œβ”€β”€ templates/myapps/
β”‚   β”‚   β”œβ”€β”€ base.html
β”‚   β”‚   β”œβ”€β”€ dashboard.html
β”‚   β”‚   β”œβ”€β”€ users.html
β”‚   β”‚   β”œβ”€β”€ add_user.html
β”‚   β”‚   β”œβ”€β”€ edit_user.html
β”‚   β”‚   β”œβ”€β”€ user_detail.html
β”‚   β”‚   β”œβ”€β”€ books.html
β”‚   β”‚   β”œβ”€β”€ add_book.html
β”‚   β”‚   β”œβ”€β”€ edit_book.html
β”‚   β”‚   β”œβ”€β”€ book_detail.html
β”‚   β”‚   β”œβ”€β”€ borrow_book.html
β”‚   β”‚   β”œβ”€β”€ open_records.html
β”‚   β”‚   β”œβ”€β”€ closed_records.html
β”‚   β”‚   β”œβ”€β”€ record_detail.html

β”‚   β”œβ”€β”€ static/myapps/
β”‚       β”œβ”€β”€ css/
β”‚       β”œβ”€β”€ images/


πŸš€ Getting Started

Prerequisites

  • Python 3.x
  • Django installed

Installation

git clone <your-repo-link>
cd librarymanagement
pip install django

Run Project

python manage.py makemigrations
python manage.py migrate
python manage.py runserver

Environment Variables (Optional)

DEBUG=True
SECRET_KEY=your_secret_key

πŸ”„ Application Flow

User visits website
↓
Navigates through dashboard
↓
Performs actions (Add User / Add Book / Borrow Book)
↓
Forms validate input
↓
Views process logic
↓
Data stored in database
↓
Results displayed in templates

πŸš€ Future Enhancements

  • πŸ“Š Admin Dashboard (analytics & reports)
  • πŸ”” Due date + overdue notifications
  • πŸ’³ Payment integration for fines
  • πŸ” Search & filter system
  • πŸ“± Responsive UI (mobile-friendly)
  • πŸ‘€ Authentication & role-based access

🀝 Sponsor

This project is developed for learning, academic, and portfolio purposes. Open for contributions and improvements.


❀️ Made With Love

Made with ❀️ using Python & Django By Abhimanyu And Adrija (Team: Ctrl + Alt + BCT)

About

A Library Management system built during a Training Program with Django.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors