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.
- 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.sql
into 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.ISBN
library_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.ISBN
Library_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.MID
AID
βadmins.aid
ISBN
β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 line
farewell_email/createpdf.php
:
$password = 'your_email_password'; // Update this line
We 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!