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.
- π 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 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
- π 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
- PHP - Server-side scripting language
- MySQL - Relational database management
- mysqli - PHP MySQL database connection
- 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
- FPDF - PDF generation library
- PHPMailer 6.9 - Email functionality
- SweetAlert2 - Beautiful alert dialogs
- Google Fonts (Poppins) - Modern typography
-- 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)- 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
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
- XAMPP/WAMP/LAMP - Local server environment
- PHP 7.4+ - Server-side scripting
- MySQL 5.7+ - Database server
- Web Browser - Chrome, Firefox, Safari, etc.
-
Clone the Repository
git clone https://github.com/yourusername/library-management.git cd library-management -
Setup Local Server
- Start XAMPP/WAMP control panel
- Start Apache and MySQL services
- Copy project folder to
htdocs/(XAMPP) orwww/(WAMP)
-
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) );
-
Configure Database Connection
// Edit db_connection.php $servername = "localhost"; $username = "root"; $password = ""; // Your MySQL password $dbname = "library_management";
-
Install Dependencies
composer install
-
Create Admin Account
-- Insert default admin INSERT INTO admins (username, password) VALUES ('admin', 'admin123');
-
Launch Application
Open browser and navigate to: http://localhost/library-management/
- Admin: username:
admin, password:admin123 - Student: Register new account from student portal
- Login: Access admin panel via login1.php
- Add Books: Navigate to "Add New Book" from dashboard
- Manage Students: Add/view/edit student records
- Issue Books: Issue books to registered students
- Track Books: Monitor all issued books and returns
- Generate Reports: Download PDF reports of issued books
- Register: Create account from student portal
- Browse Books: View all available books
- Request Books: Send book request to admin
- Track Issues: Monitor your issued books
- Return Books: Return books with automatic fine calculation
- 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
- 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
- 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
- Edit
style.cssandstyles.cssfor custom themes - Modify Bootstrap classes for layout changes
- Update color variables in CSS for different color schemes
- Add new features by creating new PHP files
- Extend database schema as needed
- Integrate additional libraries via Composer
- Database settings in
db_connection.php - Email settings for PHPMailer (if implemented)
- PDF styling in
generate_pdf.php
We welcome contributions! Here's how you can help:
- Fork the Repository
- Create Feature Branch (
git checkout -b feature/NewFeature) - Commit Changes (
git commit -m 'Add New Feature') - Push to Branch (
git push origin feature/NewFeature) - Open Pull Request
- Follow PHP PSR coding standards
- Add comments for complex functionality
- Test thoroughly before submitting
- Update documentation if needed
This project is licensed under the MIT License - see the LICENSE file for details.
- β Free to use for personal and commercial projects
- β Modify and distribute as needed
- β Private use allowed
β οΈ Include copyright notice when redistributingβ οΈ No warranty provided
Developer: Tabrez Rabbani
- π§ Email: tabrezrabbani750@gmail.com
- πΌ LinkedIn: https://www.linkedin.com/in/tabrezrabbani
- π± GitHub: https://github.com/tabrez-rabbani
- Bootstrap - For responsive CSS framework
- Font Awesome - For beautiful icons
- FPDF - For PDF generation capabilities
- PHPMailer - For email functionality
- SweetAlert2 - For elegant alert dialogs
Having issues? Need help with customization?
- π Bug Reports: Open an issue
- π‘ Feature Requests: Create a feature request
- π§ Direct Contact: tabrezrabbani750@gmail.com
- 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