Books & Co is a comprehensive library management system designed to facilitate the management of books, users, and various library operations. This project is developed as a Project Based Learning initiative.
As of January 2025, Google has officially deprecated the use of App Passwords for third-party applications, including those used to send emails through Gmail’s SMTP service. This move is part of Google's continued effort to enhance user security and enforce modern authentication standards.
The email module within this project previously relied on App Password-based SMTP authentication for sending automated emails such as:
- Account registration confirmations
- Password reset links
- System alerts and notifications
Due to the policy change, these email features are currently non-functional. Attempts to send emails via the current configuration will result in authentication errors, and affected features may not work as expected.
We are actively working to migrate the email module to use Google’s OAuth 2.0 authentication protocol, which is now the recommended method for securely accessing Gmail services. This migration involves:
- Registering the application with the Google Cloud Console
- Handling user consent via secure OAuth scopes
- Implementing access and refresh tokens for reliable, long-term operation
Once this integration is complete, the email functionality will be restored with full compliance to Google’s updated policies.
We sincerely apologise for the temporary disruption this may cause. Please rest assured that restoring and securing email support is a top priority. We appreciate your patience and continued support while we implement the necessary updates.
Progress updates will be shared here in the repository as development advances.
- Features
- Installation
- Additional Dependencies
- Usage
- Project Structure
- Main Files and Their Functionality
- Tables
- Updating Passwords
- Contributing
- License
- Contact
- Admin Module: Manage books, users, and library operations.
- User Dashboard: User-friendly interface for library members.
- AI Chatbot: Provides assistance and answers queries.
- PDF Generation: Generate PDF documents for various reports.
- Email System: Send emails for notifications and updates.
- Responsive Design: Optimized for both desktop and mobile devices.
- PHP 7.4 or higher
- Composer
- MySQL
- Web server (e.g., Apache, Nginx)
-
Clone the repository:
git clone https://github.com/ishansurdi/Books-and-Co.git cd Books-and-Co -
Install dependencies:
composer install
-
Set up the database:
- Import the SQL file
Books_and_Co.sqlinto your MySQL database. - Update the database configuration in
database-connection/db_connection.php.
- Import the SQL file
-
Configure the web server to point to the project directory.
Note: These steps outline the ideal setup process and may vary depending on your operating system and environment. It is strongly recommended to refer to the official documentation and download guidelines for compatibility and best practices.
- FPDF (fpdf186): FPDF is used for generating PDFs. If the library is not present in the project, follow these steps:
-
Download the FPDF library:
- Visit the official website: http://www.fpdf.org.
- Download the latest version of the FPDF library.
-
Extract the downloaded archive.
-
Copy the extracted folder into the project directory, usually under
fpdf186/.
- PHPMailer: PHPMailer is used for sending emails. If the library is not working, follow these steps:
-
Install PHPMailer using Composer:
composer require phpmailer/phpmailer
- Ensure the
vendor/directory is present in the project and includes PHPMailer.
- Ensure the
- Start your web server.
- Open your browser and navigate to the project URL (e.g.,
http://localhost/Books-and-Co).
- Access the admin module at
http://localhost/Books-and-Co/adminmodule/adminlogin. - Use the admin credentials to log in and manage the library.
- Users can log in and access their dashboard at
http://localhost/Books-and-Co/userdashboardmodule.
- The AI chatbot can be accessed on the homepage to assist users with their queries.
PBL_SourceCode/
├── adminmodule/
│ ├── adminlogin/
│ │ ├── index.php # Admin login page
│ ├── adminmodule.php # Main admin portal file
│ ├── adminportal.css # CSS for admin portal styling
│ ├── css/
│ │ ├── admin_styles.css # Additional CSS for admin module
│ ├── issue_book/
│ │ ├── issue_book_process.php # Handles book issuing process
│ ├── pages/
│ │ ├── manage_books.php # Page for managing books
│ │ ├── manage_users.php # Page for managing users
│ ├── return_book/
│ │ ├── return_book_update.php # Handles book return process
├── ai/
│ ├── aicss.css # CSS for AI chatbot styling
│ ├── chatbot.js # JavaScript file for AI chatbot functionality
│ ├── index.html # AI chatbot interface
├── css/
│ ├── ai_css.css # CSS for AI-related pages
│ ├── credits.css # CSS for credits page
│ ├── dashboard.css # CSS for user dashboard
│ ├── loginpage.css # CSS for login page
│ ├── membership.css # CSS for membership form
│ ├── slider.css # CSS for image slider
│ ├── styles.css # General styles for the project
│ ├── styles2.css # Additional styles for the project
│ ├── typing.css # CSS for typing effect
├── database-connection/
│ ├── db_connection.php # Database connection configuration
├── farewell_email/
│ ├── createpdf.php # Generates PDF for farewell emails
│ ├── send_email.php # Sends farewell emails
├── fpdf186/ # Library for generating PDFs
├── images/ # Directory for storing images
├── index.html # Main entry point for the application
├── js/
│ ├── slider.js # JavaScript for image slider
│ ├── typing.js # JavaScript for typing effect
│ ├── userdashboardtyping.js # JavaScript for user dashboard typing effect
├── mailsystem/
│ ├── index.php # Main email system file
│ ├── test_email.php # Test email functionality
├── pages/
│ ├── credits.html # Credits page
│ ├── login/
│ │ ├── login.php # User login page
│ ├── membershipform/
│ │ ├── membershipform.html # Membership form page
├── PBL_SourceCode/ # Source code for the project
├── testcodes/ # Directory for test codes
├── userdashboardmodule/
│ ├── userdashboard.php # User dashboard interface
│ ├── ai/
│ │ ├── aicss.css # CSS for user AI chatbot
│ │ ├── chatbot.js # JavaScript for user AI chatbot
│ │ ├── userai_index.html # User AI chatbot interface
│ ├── Zodiak/
│ │ ├── Fonts/
│ │ │ ├── WEB/
│ │ │ │ ├── README.md # Readme for Zodiak fonts
├── vendor/ # Composer dependencies
├── Books_and_Co-2.sql # SQL file for setting up the database
├── Books_and_Co.sql # SQL file for setting up the database
├── composer.json # Composer configuration file
├── composer.lock # Composer lock file
├── LICENSE.md # License file
├── readme.md # Project readme file
Note: Quiz functionality is not implemented. All code files related to the quiz can be deleted or updated as per your preference.
adminmodule/adminmodule.php: Main admin portal file.adminmodule/adminlogin/index.php: Admin login page.adminmodule/issue_book/issue_book_process.php: Handles book issuing process.adminmodule/return_book/return_book_update.php: Handles book return process.
ai/chatbot.js: JavaScript file for AI chatbot functionality.ai/index.html: AI chatbot interface.
database-connection/db_connection.php: Database connection configuration.
mailsystem/index.php: Main email system file.mailsystem/test_email.php: Test email functionality.
userdashboardmodule/userdashboard.php: User dashboard interface.
index.html: Main entry point for the application, through which all other sections can be navigated.
| Column Name | Type | Key |
|---|---|---|
| admin_name | varchar(100) | |
| mobile_number | varchar(15) | |
| varchar(100) | UNI | |
| aid | varchar(20) | PRI |
| admin_password | varchar(255) |
No foreign key relations.
| Column Name | Type | Key |
|---|---|---|
| id | int | PRI |
| announcement_type | varchar(50) | |
| subject | varchar(255) | |
| body | text | |
| sequence_number | int | |
| send_to | enum('all','individual') | |
| timestamp | timestamp | |
| status | enum('Sent','Not Sent') |
No foreign key relations.
| Column Name | Type | Key |
|---|---|---|
| ISBN | varchar(20) | PRI |
| Library_id | varchar(20) | UNI |
| Name_of_Book | varchar(255) | |
| Author | varchar(255) | |
| Publisher | varchar(255) | |
| Journal_Magazine_Other | varchar(255) | |
| Genre | varchar(100) | |
| Suitable_for | varchar(100) | |
| Brief_Details | text | |
| Who_Should_Read | text | |
| For_What_You_Should_Read | text | |
| Publication_Year | int | |
| Edition | varchar(50) | |
| Language | varchar(50) | |
| Pages | int | |
| Cover_Image_URL | varchar(255) | |
| Added_Date | timestamp |
No foreign key relations.
| Column Name | Type | Key |
|---|---|---|
| ISBN | varchar(20) | PRI |
| library_id | varchar(50) | PRI |
| name_of_book | varchar(255) | |
| quantities | int | |
| borrowed | int | |
| returned | int | |
| status | enum('Available','Unavailable','Reserved') |
Foreign Key Relation:
ISBN→books.ISBNlibrary_id→books.Library_id
| Column Name | Type | Key |
|---|---|---|
| Inventory_ID | int | PRI |
| ISBN | varchar(20) | MUL |
| Library_ID | varchar(20) | MUL |
| Quantity | int | |
| Location | varchar(100) | |
| Date_Added | date | |
| Status | enum('Available','Checked Out','Reserved') | |
| Book_Condition | enum('New','Good','Fair','Poor') | |
| Last_Updated | timestamp |
Foreign Key Relation:
ISBN→books.ISBNLibrary_ID→books.Library_id
| Column Name | Type | Key |
|---|---|---|
| MID | varchar(50) | MUL |
| AID | varchar(50) | MUL |
| reference_number | varchar(50) | PRI |
| ISBN | varchar(20) | |
| name_of_book | varchar(255) | |
| date_of_book_issue | datetime | |
| time_of_book_issue | time | |
| expected_date_of_return | date | |
| actual_date_of_return | date | |
| fine_imposed | enum('Yes','No') | |
| fine_amount | decimal(10,2) | |
| fine_paid | varchar(3) | |
| date_of_fine_paid | date | |
| FTID | int |
Foreign Key Relation:
MID→member_details.MIDAID→admins.aidISBN→books.ISBN
| Column Name | Type | Key |
|---|---|---|
| id | int | PRI |
| aid | varchar(50) | MUL |
| login_time | datetime | |
| logout_time | datetime | |
| session_status | enum('active','ended') |
Foreign Key Relation:
aid→admins.aid
| Column Name | Type | Key |
|---|---|---|
| MID | varchar(50) | |
| first_name | varchar(50) | |
| last_name | varchar(50) | |
| varchar(50) | ||
| account_status | varchar(50) | |
| Date_of_update | date | |
| Time_of_update | time | |
| last_date_of_appeal | date | |
| appealed | varchar(50) | |
| appealed_on | varchar(50) |
No foreign key relations.
| Column Name | Type | Key |
|---|---|---|
| first_name | varchar(50) | |
| middle_name | varchar(50) | |
| last_name | varchar(50) | |
| gender | enum('Male','Female','Other') | |
| mobile_number | varchar(15) | |
| varchar(100) | ||
| dob | date | |
| age | int | |
| occupation | enum('Student','Professional','Business','Retired','Other') | |
| residential_address | text | |
| membership_plan | enum('Monthly','Half-Yearly','Yearly') | |
| membership_plan_id | varchar(10) | |
| membership_amount | decimal(10,2) | |
| membership_id | varchar(12) | PRI |
| submission_date | date | |
| submission_day | varchar(10) | |
| submission_time | time | |
| ip_address | varchar(45) | |
| created_at | timestamp | |
| updated_at | timestamp | |
| mail_sent | enum('no','yes') | |
| mail_sent_date | datetime | |
| mail_sent_status | enum('sent','error') | |
| temp_password | varchar(255) |
No foreign key relations.
| Column Name | Type | Key |
|---|---|---|
| MID | varchar(50) | MUL |
| TID | bigint | PRI |
| Amount | decimal(10,2) | |
| Plan | varchar(50) | |
| Method | varchar(50) | |
| Status | varchar(20) | |
| Date_of_Transaction | date | |
| Time_of_Transaction | time | |
| Next_Date_of_Transaction | date | |
| Account_Status | enum('Active','Inactive','Suspended') | |
| Penalty_for_Late_Payment | decimal(10,2) | |
| Penalty_Paid | enum('YES','NO') | |
| Date_of_Penalty_Payment | date | |
| Time_of_Penalty_Payment | time | |
| PTID | int |
Foreign Key Relation:
MID→member_details.MID
| Column Name | Type | Key |
|---|---|---|
| username | varchar(50) | |
| varchar(50) | ||
| userpassword | varchar(50) |
No foreign key relations.
| Column Name | Type | Key |
|---|---|---|
| MID | varchar(255) | PRI |
| Books_Borrowed | int | |
| Pending_Requests | int | |
| Penalties | decimal(10,2) |
No foreign key relations.
Note: Certain columns in some tables may not be utilized. Some tables might have been missed; kindly review the code for completeness.
Update the database password in the following file:
// database-connection/db_connection.php
$servername = "localhost";
$username = "root";
$password = "your_database_password"; // Update this line
$dbname = "library";Update the email password in the following files:
mailsystem/index.php:
$password = 'your_email_password'; // Update this linefarewell_email/createpdf.php:
$password = 'your_email_password'; // Update this lineWe welcome contributions from the community. To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes.
- Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature-branch
- Open a pull request.
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE.md file for details.
For any inquiries or issues, please contact:
- Project Lead: Ishan Surdi
- Email: ishansurdi2105@gmail.com
Thank you for exploring this project. We look forward to you feedback and contributions!