Project Title: Smart Library Web System for Multi-User Management
A comprehensive, role-based web application designed to manage library operations efficiently. This system facilitates borrowing, returning, reserving, and managing books with specific rules and responsibilities for Students, Teachers, Librarians, and Staff.
The objective of this project is to streamline library transactions and inventory management through a user-friendly web interface. It enforces role-specific rules, such as borrowing limits for students and clearance requirements for all users.
- Secure Authentication: Role-based login system protecting access to specific dashboards.
- Dynamic Inventory: Real-time tracking of book stock, availability, and active reservations.
- Circulation Management: Complete module for borrowing and returning books.
- Reservation System: Online booking system for Students and Teachers.
- Penalty Automation: Automatic calculation of fines for overdue or damaged items.
The system supports four distinct user roles, each with unique permissions:
- Borrowing Limit: Can borrow up to 3 books per semester.
- Reservations: Ability to reserve books online.
- Clearance: Must return all books to be cleared; otherwise, liable for the book price.
- Borrowing Limit: Unlimited book borrowing privileges.
- Reservations: Ability to reserve books online.
- Clearance: Mandatory return of all items at the end of the semester.
- Inventory Control: Add new books, update details, and archive old records.
- Metadata Management: Manage book categories, authors, and cover images.
- Operations: Facilitates the actual borrowing and returning process at the desk.
- Oversight: View borrower status, check for overdue items, and manage penalties.
- Backend: Vanilla PHP (MVC Structure)
- Database: MySQL (Relational Database)
- Frontend: HTML5, CSS3 (Poppins Typography), JavaScript (ES6)
- APIs: Open Library API (for fetching book covers)
librarysystem/
├── app/
│ ├── controllers/ # Business logic (Book, Staff, Librarian controllers)
│ ├── models/ # Database connection & helpers
│ └── views/ # User Interface files (Dashboards, Login, etc.)
├── public/
│ ├── css/ # Custom stylesheets
│ ├── js/ # Client-side scripts & modal logic
│ └── src/ # Images and assets
├── config.php # Database configuration settings
├── database_schema # SQL file for database setup
├── fetch_book_covers.php # Script to auto-fetch book covers
├── hash_generator.php # Utility for password hashing
└── index.php # Application entry point
git clone https://github.com/moriiar/librarysystem.git
cd librarysystem
- Create a MySQL database named library_system.
- Import the provided SQL schema file located at database_schema into your database.
- Open config.php and verify your database credentials:
define('DB_HOST', 'localhost');
define('DB_NAME', 'library_system');
define('DB_USER', 'root'); // Default XAMPP user
define('DB_PASS', ''); // Default XAMPP password
- Host the project folder on a local server (e.g., Apache/XAMPP).
- Access the system via your browser: http://localhost/librarysystem/views/login.php
For testing purposes, the system is pre-loaded with the following accounts (password hashes generated via hash_generator.php):
| Role | Username | Password |
|---|---|---|
| Student | alicecoop | alicecoop123 |
| Teacher | anneroe | anneroe123 |
| Librarian | alisonmillward | alisonmillward123 |
| Staff | bobsmith | bobsmith123 |
Note: Usernames can be found in the Users table after importing the database schema.
