This project is a modernized Library Management System built using PHP, MySQL, HTML/CSS, Bootstrap, and jQuery. The original CRUD-only system was significantly upgraded to include professional-grade features such as:
- Soft delete with restore
- Hard delete with full auditing
- Version control for book updates
- Activity logging for all admin actions
- UI improvements and icons
- Search, filters, and user tracking
- Student table refinements
- Borrow/Return enhancements
- Exportable activity logs
This makes the application secure, reliable, and ready for real institutional use.
- Deleted books are not removed — they move to a Deleted tab.
- Admin can restore with one click.
- Prevents accidental data loss.
- Completely removes the record from the database.
- Logged as a HARD_DELETE action.
- Uses a trash icon for UI clarity.
A complete tracking system using a new table: book_versions
Each time a book is updated:
- The old state is saved as a version.
- Differences (before → after) are stored.
- Who changed it and when is recorded.
- UI highlights changed fields visually.
A new table activity_logs records every important action:
- Login / Logout
- Adding books
- Updating books
- Soft deleting
- Hard deleting
- Restoring
Displays:
- Admin ID
- Username
- Action
- Target entity
- Timestamp
- Cleaned-up details (e.g., changed fields)
- Exports all logs to CSV.
- Clears database logs afterward.
- Useful for audits and backups.
| Table | Purpose |
|---|---|
| book_versions | Stores version history for each book (snapshot before update). |
| activity_logs | Stores admin actions (create, update, delete, login, logout). |
| Table | Change |
|---|---|
| books | Added deleted_at for soft delete. |
| student | Renamed columns course → department, section → batch. |
LibraryManagementSystem/
├── dbconnect.php
├── index.php
├── logout.php
├── app/
│ ├── book/
│ │ ├── book.php
│ │ ├── manage-book.php
│ │ ├── add-book.php
│ │ ├── update-book.php
│ │ ├── restore-book.php
│ │ ├── delete-book.php (soft delete)
│ │ ├── hard-delete-book.php
│ │ ├── view-history.php
│ │ ├── export-history.php
│ │ └── ...
│ ├── util/
│ │ └── log_helper.php
│ ├── admin/
│ │ ├── view-activity.php
│ │ └── export-activity.php
│ ├── student/
│ ├── transaction/
│ └── ...
├── format/
│ ├── header.php
│ ├── sidebar.php
│ └── footer.php
| Component | Technology |
|---|---|
| Frontend | HTML, CSS, Bootstrap, jQuery |
| Backend | PHP |
| Database | MySQL |
| UI Icons | Unicons |
Start Apache and MySQL.
Copy it into:
C:\xampp\htdocs\LibraryManagementSystem
Import the provided .sql file (includes new tables & fields).
Edit dbconnect.php to match your MySQL settings.
http://localhost/LibraryManagementSystem/
(Default credentials depend on your initial database data.)
- All actions logged for future auditing
- Soft delete prevents accidental data loss
- Hard-delete fully tracked
- Session-based login/out tracking
- User-specific logs
- Input validation for student ID duplicates
This upgraded Library Management System transforms a basic CRUD application into a fully-featured, audit-ready, version-controlled platform.
It demonstrates skills in:
- Backend engineering
- Database design
- Data integrity
- UI/UX refinement
- System auditing
- PHP + MySQL development
- Enterprise-style logging and tracking