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