Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š Library Management System

๐Ÿ“– Project Description

This project is a web-based Library Management System developed using Python and Flask. The application is designed to help manage books, library members, and loan records using a relational database.

The system supports CRUD operations, relationship handling between tables, transaction logic for loans, server-side validation, and a dashboard displaying summary statistics.


โœจ Key Features

๐Ÿ“š Library Book Management

  • Add, update, and delete books
  • Store book metadata such as ISBN, author, genre, and publication date

๐Ÿ‘ฅ Member Management

  • Manage member records and contact details
  • Maintain unique member entries

๐Ÿ”– Loan Tracking

  • Create and manage book loans
  • Prevent unavailable books from being borrowed again
  • Track return status and overdue records

๐Ÿ“Š Dashboard Analytics

  • Display aggregate statistics using SQL functions
  • Show total books, members, loans, and late return averages

โœ… Validation and Integrity

  • Server-side validation for required fields
  • SQL constraints for data integrity
  • Relational schema normalized to 3NF

๐Ÿ› ๏ธ Technologies Used

  • Python 3
  • Flask
  • SQLite
  • SQLAlchemy
  • HTML5
  • CSS3
  • Bootstrap
  • Jinja2 Templates
  • Git & GitHub

๐Ÿ“‚ Project Structure

Library-Management-System/
โ”‚
โ”œโ”€โ”€ app.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ final_schema.sql
โ”œโ”€โ”€ AI_LOG.md
โ”œโ”€โ”€ NORMALIZATION.md
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ run_project.bat
โ”‚
โ”œโ”€โ”€ templates/
โ”‚   โ”œโ”€โ”€ base.html
โ”‚   โ”œโ”€โ”€ dashboard.html
โ”‚   โ”œโ”€โ”€ books.html
โ”‚   โ”œโ”€โ”€ members.html
โ”‚   โ”œโ”€โ”€ loans.html
โ”‚   โ””โ”€โ”€ forms/
โ”‚
โ”œโ”€โ”€ static/
โ”‚   โ””โ”€โ”€ css/
โ”‚       โ””โ”€โ”€ style.css
โ”‚
โ””โ”€โ”€ screenshots/

โš™๏ธ Installation Instructions

๐Ÿš€ Quick Start (Windows)

Windows users can run the application directly using:

run_project.bat

This automatically:

  • creates the virtual environment
  • installs dependencies
  • creates the database if needed
  • starts the Flask server
  • opens the application in the browser

๐Ÿ Python Requirement

Python 3 must be installed before running the project.

Download Python from:

https://www.python.org/downloads/

During installation, make sure to enable:

Add Python to PATH

โš™๏ธ Manual Installation

1. Clone the Repository

git clone https://github.com/Gungn1r-G/Library-Management-System.git
cd Library-Management-System

2. Create Virtual Environment

Windows:

python -m venv venv

Mac/Linux:

python3 -m venv venv

3. Activate Virtual Environment

Windows PowerShell:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\venv\Scripts\Activate.ps1

Windows Command Prompt:

venv\Scripts\activate.bat

Mac/Linux:

source venv/bin/activate

4. Install Dependencies

pip install -r requirements.txt

๐Ÿ’พ Database Setup

The SQL schema file included in the project is:

final_schema.sql

If the library.db file already exists, the project can usually be started immediately after installing dependencies.

To create the database manually from the schema file:

Start Python:

python

Then run:

import sqlite3

conn = sqlite3.connect("library.db")

with open("final_schema.sql") as f:
    conn.executescript(f.read())

conn.commit()
conn.close()

exit()

โ–ถ๏ธ Running the Application

Start the Flask server:

python app.py

Open the application in a browser:

http://127.0.0.1:5000

๐Ÿงญ Application Navigation

๐Ÿ“Š Dashboard

View summary statistics for books, members, and active loans.

๐Ÿ“š Books

Add, edit, update, and delete books.

๐Ÿ‘ฅ Members

Manage library member records.

๐Ÿ”– Loans

Create and view book loan records.


๐Ÿ”’ Validation and Transactions

  • Empty fields are restricted through server-side validation.
  • Loan transactions update book availability when a loan is created.
  • Unavailable books cannot be loaned again until returned.
  • SQL constraints help maintain relational data integrity.

๐Ÿ“ Additional Files

  • NORMALIZATION.md โ†’ 3NF normalization report
  • AI_LOG.md โ†’ AI usage disclosure
  • final_schema.sql โ†’ final relational database schema

๐Ÿ–ผ๏ธ Screenshots

๐Ÿ“Š Dashboard

Dashboard


๐Ÿ“š Books Page

Books


๐Ÿ‘ฅ Members Page

Members


๐Ÿ”– Loans Page

Loans


๐Ÿ”ฎ Future Improvements

Possible future enhancements include:

  • Search and filtering functionality
  • Authentication and login system
  • Exporting reports to CSV or PDF
  • REST API support
  • Role-based access control
  • Advanced analytics and reporting

๐Ÿ“ Notes

The .gitignore file excludes unnecessary folders such as:

venv/
__pycache__/
.env
library.db

Developed as part of the CS665 Database Application Project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages