Skip to content

A modern, advanced web-based Library Management System designed for colleges and libraries. This system allows administrators to manage books, issue/return books, track students, and handle book requests, while students can request, issue, and return books seamlessly. Built with PHP, MySQL, HTML, CSS, and JavaScript

License

Notifications You must be signed in to change notification settings

tabrez-rabbani/Library-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Library Management System

PHP MySQL Bootstrap License

🎯 Project Overview

Library Management System is a comprehensive web-based application designed to manage library operations efficiently. The system provides separate interfaces for administrators and students, enabling seamless book management, issue/return tracking, and user management with modern UI/UX design.

✨ Features: Complete library automation with admin panel, student portal, PDF reports, and responsive design.

πŸš€ Key Features

πŸ‘¨β€πŸ’Ό Admin Features

  • πŸ“Š Admin Dashboard: Comprehensive overview of library operations
  • πŸ“š Book Management: Add, view, update, and delete books
  • πŸ‘₯ Student Management: Add, view, edit, and delete student records
  • πŸ“– Issue/Return Books: Issue books to students and manage returns
  • πŸ“‹ Book Requests: Approve or reject student book requests
  • πŸ“„ PDF Reports: Generate and download issued books reports
  • πŸ” Advanced Search: Search books and students with pagination
  • πŸ“± Responsive Design: Works seamlessly on all devices

πŸŽ“ Student Features

  • 🏠 Student Dashboard: Personalized dashboard with quick access
  • πŸ“š Browse Books: View all available books in the library
  • πŸ“– Request Books: Request books for issue
  • πŸ“‹ Issued Books: Track currently issued books
  • πŸ”„ Return Books: Return books with automatic fine calculation
  • πŸ” Search Functionality: Search books by title, author, or category
  • πŸ“± Mobile Friendly: Optimized for mobile devices

🎨 UI/UX Features

  • πŸŒ™ Modern Dark Theme: Elegant dark theme with gradient effects
  • πŸ’« Interactive Animations: Smooth transitions and hover effects
  • πŸ“± Responsive Design: Bootstrap-based responsive layout
  • 🎯 User-Friendly: Intuitive interface for both admin and students
  • ⚑ Fast Loading: Optimized performance with minimal load times

πŸ› οΈ Technology Stack

Backend

  • PHP - Server-side scripting language
  • MySQL - Relational database management
  • mysqli - PHP MySQL database connection

Frontend

  • HTML5 - Modern markup language
  • CSS3 - Advanced styling with animations
  • Bootstrap 5.3.0 - Responsive CSS framework
  • JavaScript - Interactive functionality
  • Font Awesome 6.0 - Icon library

Libraries & Tools

  • FPDF - PDF generation library
  • PHPMailer 6.9 - Email functionality
  • SweetAlert2 - Beautiful alert dialogs
  • Google Fonts (Poppins) - Modern typography

πŸ—„οΈ Database Schema

Tables Structure

-- Admins Table
admins (username, password)

-- Students Table  
students (student_id, name, email, username, password)

-- Books Table
books (book_id, title, author, category, status)

-- Transactions Table
transactions (transaction_id, book_id, student_id, issue_date, return_date, status, fine_amount)

Key Relationships

  • Books ↔ Transactions: One-to-Many (One book can have multiple transactions)
  • Students ↔ Transactions: One-to-Many (One student can have multiple transactions)
  • Transactions: Junction table linking books and students

πŸ—οΈ Project Structure

library-management/
β”œβ”€β”€ πŸ“ student/                 # Student portal files
β”‚   β”œβ”€β”€ auth.php               # Student authentication
β”‚   β”œβ”€β”€ dashboard.php          # Student dashboard
β”‚   β”œβ”€β”€ books.php              # Browse available books
β”‚   β”œβ”€β”€ issued_books.php       # View issued books
β”‚   β”œβ”€β”€ request_book.php       # Request book functionality
β”‚   └── return_book.php        # Return book functionality
β”œβ”€β”€ πŸ“ src/                    # PHPMailer source files
β”œβ”€β”€ πŸ“ vendor/                 # Composer dependencies
β”œβ”€β”€ πŸ“ fpdf186/                # FPDF library files
β”œβ”€β”€ πŸ“ font/                   # Font files for PDF
β”œβ”€β”€ 🌐 index.html              # Landing page
β”œβ”€β”€ πŸ” login1.php              # Admin login
β”œβ”€β”€ πŸ“Š admin_dashboard.php     # Admin dashboard
β”œβ”€β”€ πŸ“š add_book1.php           # Add new books
β”œβ”€β”€ πŸ“– issue_book1.php         # Issue books to students
β”œβ”€β”€ πŸ‘₯ add_student1.php        # Add new students
β”œβ”€β”€ πŸ“‹ view_books.php          # View all books
β”œβ”€β”€ πŸ“Š view_issued_books.php   # View issued books
β”œβ”€β”€ πŸ‘₯ view_members.php        # View all students
β”œβ”€β”€ πŸ“‹ book_requests.php       # Manage book requests
β”œβ”€β”€ βœ… approve_request.php     # Approve book requests
β”œβ”€β”€ ❌ reject_request.php      # Reject book requests
β”œβ”€β”€ πŸ”„ return_book.php         # Return book functionality
β”œβ”€β”€ πŸ“„ generate_pdf.php        # PDF report generation
β”œβ”€β”€ πŸ—„οΈ db_connection.php       # Database connection
β”œβ”€β”€ πŸšͺ logout.php              # Logout functionality
β”œβ”€β”€ 🎨 style.css               # Custom styles
└── πŸ“ composer.json           # PHP dependencies

⚑ Quick Start

Prerequisites

  • XAMPP/WAMP/LAMP - Local server environment
  • PHP 7.4+ - Server-side scripting
  • MySQL 5.7+ - Database server
  • Web Browser - Chrome, Firefox, Safari, etc.

Installation Steps

  1. Clone the Repository

    git clone https://github.com/yourusername/library-management.git
    cd library-management
  2. Setup Local Server

    • Start XAMPP/WAMP control panel
    • Start Apache and MySQL services
    • Copy project folder to htdocs/ (XAMPP) or www/ (WAMP)
  3. Create Database

    -- Open phpMyAdmin (http://localhost/phpmyadmin)
    -- Create new database
    CREATE DATABASE library_management;
    
    -- Create tables
    USE library_management;
    
    -- Admins table
    CREATE TABLE admins (
        id INT AUTO_INCREMENT PRIMARY KEY,
        username VARCHAR(50) UNIQUE NOT NULL,
        password VARCHAR(255) NOT NULL
    );
    
    -- Students table
    CREATE TABLE students (
        student_id INT AUTO_INCREMENT PRIMARY KEY,
        name VARCHAR(100) NOT NULL,
        email VARCHAR(100) UNIQUE NOT NULL,
        username VARCHAR(50) UNIQUE NOT NULL,
        password VARCHAR(255) NOT NULL
    );
    
    -- Books table
    CREATE TABLE books (
        book_id INT AUTO_INCREMENT PRIMARY KEY,
        title VARCHAR(200) NOT NULL,
        author VARCHAR(100) NOT NULL,
        category VARCHAR(50) NOT NULL,
        status ENUM('Available', 'Issued') DEFAULT 'Available'
    );
    
    -- Transactions table
    CREATE TABLE transactions (
        transaction_id INT AUTO_INCREMENT PRIMARY KEY,
        book_id INT NOT NULL,
        student_id INT NOT NULL,
        issue_date DATE NOT NULL,
        return_date DATE NULL,
        status ENUM('Requested', 'Issued', 'Returned') DEFAULT 'Requested',
        fine_amount DECIMAL(10,2) DEFAULT 0.00,
        FOREIGN KEY (book_id) REFERENCES books(book_id),
        FOREIGN KEY (student_id) REFERENCES students(student_id)
    );
  4. Configure Database Connection

    // Edit db_connection.php
    $servername = "localhost";
    $username = "root";
    $password = "";        // Your MySQL password
    $dbname = "library_management";
  5. Install Dependencies

    composer install
  6. Create Admin Account

    -- Insert default admin
    INSERT INTO admins (username, password) VALUES ('admin', 'admin123');
  7. Launch Application

    Open browser and navigate to:
    http://localhost/library-management/
    

Default Login Credentials

  • Admin: username: admin, password: admin123
  • Student: Register new account from student portal

πŸ“– Usage Guide

For Administrators

  1. Login: Access admin panel via login1.php
  2. Add Books: Navigate to "Add New Book" from dashboard
  3. Manage Students: Add/view/edit student records
  4. Issue Books: Issue books to registered students
  5. Track Books: Monitor all issued books and returns
  6. Generate Reports: Download PDF reports of issued books

For Students

  1. Register: Create account from student portal
  2. Browse Books: View all available books
  3. Request Books: Send book request to admin
  4. Track Issues: Monitor your issued books
  5. Return Books: Return books with automatic fine calculation

🎨 Features Showcase

Modern UI Design

  • Dark Theme: Elegant dark color scheme with gradient effects
  • Responsive Layout: Works perfectly on desktop, tablet, and mobile
  • Interactive Elements: Smooth hover effects and transitions
  • Font Awesome Icons: Beautiful icons throughout the interface

Advanced Functionality

  • Search & Filter: Advanced search across books and students
  • Pagination: Efficient data loading with pagination
  • PDF Generation: Professional reports with FPDF
  • Session Management: Secure user authentication
  • Input Validation: Client and server-side validation

User Experience

  • Intuitive Navigation: Easy-to-use interface for all users
  • Quick Actions: One-click operations for common tasks
  • Status Indicators: Clear visual feedback for all operations
  • Error Handling: Graceful error messages and validation

πŸ”§ Customization

Styling

  • Edit style.css and styles.css for custom themes
  • Modify Bootstrap classes for layout changes
  • Update color variables in CSS for different color schemes

Functionality

  • Add new features by creating new PHP files
  • Extend database schema as needed
  • Integrate additional libraries via Composer

Configuration

  • Database settings in db_connection.php
  • Email settings for PHPMailer (if implemented)
  • PDF styling in generate_pdf.php

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the Repository
  2. Create Feature Branch (git checkout -b feature/NewFeature)
  3. Commit Changes (git commit -m 'Add New Feature')
  4. Push to Branch (git push origin feature/NewFeature)
  5. Open Pull Request

Contribution Guidelines

  • Follow PHP PSR coding standards
  • Add comments for complex functionality
  • Test thoroughly before submitting
  • Update documentation if needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

What this means:

  • βœ… Free to use for personal and commercial projects
  • βœ… Modify and distribute as needed
  • βœ… Private use allowed
  • ⚠️ Include copyright notice when redistributing
  • ⚠️ No warranty provided

πŸ™ Credits & Attribution

Developer: Tabrez Rabbani

Acknowledgments

  • Bootstrap - For responsive CSS framework
  • Font Awesome - For beautiful icons
  • FPDF - For PDF generation capabilities
  • PHPMailer - For email functionality
  • SweetAlert2 - For elegant alert dialogs

πŸ“ž Support

Having issues? Need help with customization?

🎯 Future Enhancements

  • Email Notifications - Automated email alerts for due dates
  • Barcode Integration - Barcode scanning for books
  • Advanced Analytics - Detailed reports and analytics
  • Mobile App - Native mobile application
  • API Integration - RESTful API for external integrations
  • Multi-branch Support - Support for multiple library branches

⭐ If you find this project helpful, please give it a star! It motivates me to create more open-source projects.

πŸ’‘ Found this useful? Consider buying me a coffee: PayPal

About

A modern, advanced web-based Library Management System designed for colleges and libraries. This system allows administrators to manage books, issue/return books, track students, and handle book requests, while students can request, issue, and return books seamlessly. Built with PHP, MySQL, HTML, CSS, and JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages