From cbfcc7651b824aa68ae4823f3e8cd316121cfdc2 Mon Sep 17 00:00:00 2001 From: Azka Date: Sat, 29 Aug 2026 20:31:25 +0500 Subject: [PATCH] Update README.md --- README.md | 142 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 110 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 21ebcbb..2ce9aac 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,122 @@ -# Library Management Syste +# ๐Ÿ“š Library Management System -A desktop application to help librarians manage book inventory using Python and MySQL. +A robust, desktop-based library administration system developed in Python that digitizes daily operations including inventory management, member tracking, loan lifecycles, and automated fine calculation. ---- +## ๐ŸŽฏ Overview -## ๐Ÿš€ Current Features +This system enables librarians to efficiently manage their library's resources using a streamlined desktop interface backed by a local MySQL database. It replaces manual record-keeping with a unified, transactional platform ensuring data integrity and accurate tracking of all library assets and members. +## โœจ Key Features -### ๐Ÿ‘ฅ Module 3: Member Management & Lending -- Member registration system -- Book lending with due dates -- Active loans tracking -- Instant member search functionality -- Automatic availability updates +- **Secure Authentication**: Dedicated librarian login and session management +- **Member Management**: Comprehensive registration and tracking of library members +- **Book Inventory**: Add, update, and monitor physical book copies and availability +- **Automated Loans**: Issue books with automatically calculated due dates (14-day standard period) +- **Fine Processing**: Automatically calculate overdue fines ($5/day) upon book return +- **Reporting**: Generate inventory reports and track currently available books +- **Data Integrity**: Multi-step operations (like issuing loans) are protected by SQL transactions -### ๐Ÿ‘ฅ Module 4: Book Returns & Fine Management -- loned book display -- Return processing -- Active loans tracking -- Automatic fine calculation for overdue books -- Fine payment tracking ---- -## Technology Stack +## ๐Ÿ—๏ธ Architecture -- **Frontend**: Tkinter (Python GUI) -- **Backend**: Python 3.9+ -- **Database**: MySQL -- **Architecture**: MVC Pattern +### Frontend +- **Framework**: Tkinter (Python standard GUI library) +- **Styling**: `ttk` themed widgets (`clam` theme) with custom color palettes +- **Pattern**: Object-oriented View classes inheriting from `tk.Tk` and `tk.Toplevel` -## Installation +### Backend +- **Language**: Python 3.9+ +- **Database**: MySQL (hosted locally via XAMPP or similar) +- **Driver**: `mysql-connector-python` +- **Architecture**: MVC / Service-Oriented Architecture separating Views, Services, and Models -1. **Prerequisites**: - - Python 3.9 or later - - MySQL Server - - XAMPP (recommended for easy MySQL setup) +## ๐Ÿš€ Getting Started -2. **Setup Database**: - - Create a MySQL database named `library_management` - - Run the SQL script from `database/setup_db.sql` +### Prerequisites +- Python 3.9 or higher +- MySQL Server (e.g., via XAMPP) +- git -3. **Install Python Dependencies**: +### Installation + +1. **Clone the repository** + ```bash + git clone + cd LibraryManagementSystem + ``` + +2. **Install dependencies** ```bash - pip install -r requirements.txt \ No newline at end of file + pip install -r requirement.txt + ``` + +3. **Database Setup** + - Ensure your MySQL server is running. + - Create a database named `library_management`. + - Run the setup scripts in `app/database/setup_db.py` to initialize the tables (`users`, `books`, `members`, `loans`). + +### Development & Execution + +**Start the application:** +```bash +python -m app.main +``` + +## ๐Ÿงช Sample Credentials + +Use the following credentials to log in: + +| Role | Username | Password | +|------------|---------------|------------| +| Admin | `AzkaShaukat` | `Azka@123` | +| Admin | `admin` | `admin123` | +| Librarian | `librarian1` | `libpass` | + + +## ๐Ÿ“ Project Structure + +```text +LibraryManagementSystem/ +โ”œโ”€โ”€ app/ # Main application logic +โ”‚ โ”œโ”€โ”€ database/ # Database connection and setup scripts +โ”‚ โ”œโ”€โ”€ models/ # Data Transfer Objects (Book, User, Member, Loan) +โ”‚ โ”œโ”€โ”€ services/ # Business logic and SQL execution +โ”‚ โ”œโ”€โ”€ utils/ # Helper functions, UI styles, validators +โ”‚ โ”œโ”€โ”€ views/ # Tkinter GUI screens and components +โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ””โ”€โ”€ main.py # Application entry point +โ”œโ”€โ”€ tests/ # Unit tests suite +โ”‚ โ”œโ”€โ”€ test_models/ # Tests for domain models +โ”‚ โ””โ”€โ”€ test_services/ # Tests for business logic services +โ”œโ”€โ”€ requirement.txt # Python dependencies +โ””โ”€โ”€ README.md # Project documentation +``` + +## ๐Ÿ” Security & Integrity Features + +- **Parameterized Queries**: Prevention against standard SQL injection via `mysql-connector-python` parameters. +- **Transactional Integrity**: Database transactions (`START TRANSACTION`, `COMMIT`, `ROLLBACK`) protect critical operations to ensure inventory counts always match loan records. +- **Architectural Isolation**: Database queries are strictly contained within the Service layer, preventing UI components from interacting directly with the database. + +## ๐Ÿ› ๏ธ Technology Stack + +### Core Technologies +- Python 3.9+ +- Tkinter & `ttk` +- MySQL + +### Dependencies +- `mysql-connector-python` (8.0.33) +- `bcrypt` (4.1.2) +- `Pillow` (9.5.0) +- `matplotlib` (3.7.1) +- `pytest` (7.4.0) + +## ๐Ÿค Contributing + +1. Fork the repository +2. Create a feature branch (`git checkout -b feature/amazing-feature`) +3. Commit your changes (`git commit -m 'Add amazing feature'`) +4. Push to the branch (`git push origin feature/amazing-feature`) +5. Open a Pull Request + +