A Library Management System with a dedicated UI, where the backend framework primarily redirected queries to code logic implemented entirely in .sql files, leveraging Azure SQL Edge with complex triggers, stored procedures, user-defined functions, and views.
- Overview
- Features
- Tech Stack
- Repository Structure
- Getting Started
- API Endpoints
- Contributing
- License
- Contact
This project is a Library Management System that allows librarians to:
- Maintain an inventory of books
- Register and manage library members
- Record book borrow/return transactions
- Search and filter books by title, author, ISBN, or genre
It is structured as a separate backend (REST API) and frontend (static web UI) for clear separation of concerns.
-
Book Management
- Add new books
- Edit book details
- Delete books
- View all books
-
User Management
- Register new members
- Edit member profiles
- Deactivate/reactivate members
-
Transactions
- Borrow books (creates a loan record)
- Return books (updates loan record, tracks due dates & fines)
- View borrowing history
-
Search & Filtering
- Full‑text search on titles and authors
- Filter by genre, availability, publication year
- Backend: Python (Flask)
- Frontend: HTML5, CSS3, JavaScript (Vanilla ES6)
- Database: SQLite (via SQLAlchemy ORM)
- Dependencies: See
requirements.txt
Library_Management_System/
├── backend/ # Flask REST API
│ ├── app.py # Main application entrypoint
│ ├── models.py # SQLAlchemy ORM models
│ ├── routes.py # API endpoint definitions
│ ├── config.py # Configuration (DB URI, etc.)
│ └── … # Additional modules
├── frontend/ # Static web UI
│ ├── index.html # Main dashboard
│ ├── styles.css # Global styles
│ ├── scripts.js # Client‑side logic & API calls
│ └── assets/ # Images, icons, etc.
├── P5/ # Reports & deliverables (presentations, PDFs)
├── .gitignore # Patterns to ignore in git
├── requirements.txt # Python dependencies
└── README.md # This file
- Python 3.7 or higher
- pip (comes with Python)
- (Optional) virtualenv or venv for isolated environments
-
Clone the repository
git clone https://github.com/SachinVishaul007/Library_Management_System.git cd Library_Management_System -
Set up a Python virtual environment
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install backend dependencies
pip install -r requirements.txt
-
Start the backend server
cd backend export FLASK_APP=app.py flask run
By default, the API will be available at
http://127.0.0.1:5000/. -
Open the frontend
Simply openfrontend/index.htmlin your browser (no build step required).
The UI will interact with the Flask API for data.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/books |
List all books |
| GET | /api/books/<id> |
Get details for a single book |
| POST | /api/books |
Add a new book |
| PUT | /api/books/<id> |
Update an existing book |
| DELETE | /api/books/<id> |
Remove a book from inventory |
| GET | /api/members |
List all library members |
| POST | /api/members |
Register a new member |
| POST | /api/borrow |
Record a book borrow transaction |
| POST | /api/return |
Record a book return transaction |
(Adjust paths and payloads as implemented in routes.py.)
- Fork the repo
- Create a feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m "Add some feature") - Push to your branch (
git push origin feature/YourFeature) - Open a Pull Request
Please adhere to the existing code style and include tests for any new functionality.