Bookstore Web Applicationbfmnbvmv
Bookstore Web Applicationbfmnbvmv
1. Plan
1.1.Features, functionality, and requirements of application
Features
Public Pages:
Display available books for sale and rent separately.
Provide filters for searching by category, author, year of publication and title.
Show book details, including title, author, description, year of publication, and cover
image.
Allow customers to view book details without signing in.
Employee Accounts:
Employees sign in with unique credentials.
Differentiate between employees and admin roles.
Employees have access to admin functionality.
Admin Accounts:
Admins have full control over application management.
Admins can manage employees, including CRUD operations.
Admins can view and manage sales and rentals.
Admins can view and manage customers.
Customer Management:
Employees can add, edit, and delete customer.
Book Management:
Employees can add new books to the system.
Employees can edit book details and information.
Employees can delete books from the database.
Books have attributes: title, author, description, cover image, category, price, quantity
available for sale, quantity available for rent.
Category Management:
Employees can add, edit, and delete book categories.
Books are categorized based on genres or themes.
Customer Management:
Employees can view customer profiles.
Employees can add new customers to the system.
Employees can edit customer details.
Employees can delete customer accounts.
Rental Management:
Employees can manage book rentals for customers.
Employees can create new rentals, specifying the book and customer.
Employees can update rental statuses (rented, returned, overdue).
Rentals have due dates and return dates.
Overdue rentals are flagged for attention.
Sales Management:
Employees can record book sales for customers.
Employees can specify the book, customer, and sale date.
Sales records include book title, customer name, and sale amount.
Reporting:
Generate sales reports with revenue breakdown by time period. - Generate rental reports showing
rented books, due dates, and returns. - Provide inventory reports with quantities available for sale and
rent. - Generate employee performance reports, showing sales and rental contributions.
User Experience:
User-friendly interface with responsive design. - Visual cues for available and rented books. - Intuitive
navigation and search functionality. - Clear call-to-action buttons for rentals and purchases.
Future Considerations:
Implement payment gateway integration for online sales (if desired). - Enhance reporting with graphical
data visualization. - Integrate a review and rating system for books. - Offer recommendations based on
user preferences and past behavior.
Functionality
Public Page:
Show all available books for sale and for rent separately.
Allow users to view book details, including available quantities and prices for sale and rent.
Implement filters, search, and categories to help users find books.
Admin Page:
Manage renting process:
Create new rentals (borrowing books).
View rentals (borrowed books) and their status.
Update rental statuses (returning books, marking as overdue, etc.).
Manage sales:
Record book sales and associated employees.
CRUD operations for books (add, edit, delete).
CRUD operations for categories (add, edit, delete).
CRUD operations for customers (add, edit, delete).
CRUD operations for employees (add, edit, delete).
CRUD operations for users (admin and employee management).
Sales Report:
Generate a report that shows the total sales revenue, broken down by time periods (e.g., daily,
weekly, monthly).
Include details about each sale, such as the book sold, the customer, the employee, and the sale
date.
Rentals Report:
Create a report that displays rental activity, including rented books, due dates, returned books,
and overdue rentals.
Group rentals by time periods for better insights.
Inventory Report:
Generate a report that provides an overview of your inventory, showing the available quantities
of each book for sale and rent.
Include details about categories, book titles, and authors.
Implementation:
Generate and Display Reports:
Create dedicated pages in the admin section for generating and viewing different types of
reports.
Use Laravel's routing system to define routes for each report page.
Data Retrieval:
• Use database queries and Eloquent ORM to retrieve the necessary data for
generating reports.
• Apply filters, date ranges, and grouping as needed to customize reports.
Presentation:
• Use data visualization libraries (such as Charts.js or Laravel Charts) to create graphs,
charts, and tables for a visual representation of data.
• Display reports in a user-friendly format that is easy to understand and interpret.
Export Options:
• Provide options to export reports in different formats (PDF, Excel, CSV) for further
analysis or sharing.
• Utilize libraries like Laravel Excel for exporting data to Excel.
Scheduled Reports:
• Implement a feature to schedule automated reports, allowing you to receive regular
updates on key metrics via email or download.
Employee/Admin Dashboard:
Header with logo, navigation menu, and user profile picture.
Sidebar with links to dashboard sections: Books, Categories, Customers, Rentals, Sales, Reports.
Main content area displaying a summary of recent activity.
Quick access buttons to perform common actions (e.g., add book, create rental).
Tables or lists showing data for books, categories, customers, etc.
Edit and delete buttons for managing data.
Footer with links and social media icons.
Books:
id (Primary Key)
title
author
year_of_publication
description
cover_image
category_id (Foreign Key referencing Categories)
quantity_available_for_sale
price_for_sale
quantity_available_for_rent
price_for_rent
created_at
updated_at
Categories:
id (Primary Key)
name
created_at
updated_at
Customers:
id (Primary Key)
name
phone
address
created_at
updated_at
Rentals:
id (Primary Key)
book_id (Foreign Key referencing Books)
customer_id (Foreign Key referencing Customers)
employee_id (Foreign Key referencing Employees)
rental_date
due_date
return_date
status (rented, returned, overdue, etc.)
created_at
updated_at
Users:
id (Primary Key)
name
email
phone
password
role
created_at
updated_at
Sales:
id (Primary Key)
book_id (Foreign Key referencing Books)
customer_id (Foreign Key referencing Customers)
employee_id (Foreign Key referencing Employees)
sale_date
created_at
updated_at
Relationship:
Books Table:
Belongs to one Category.
Has many Rentals (book_id in Rentals table).
Has many Sales (book_id in Sales table).
Categories Table:
Has many Books (category_id in Books table).
Customers Table:
Has many Rentals (customer_id in Rentals table).
Has many Sales (customer_id in Sales table).
Rentals Table:
Belongs to one Book.
Belongs to one Customer.
Belongs to one Employee.
Employees Table:
Has many Rentals (employee_id in Rentals table).
Has many Sales (employee_id in Sales table).
Sales Table:
Belongs to one Book.
Belongs to one Customer.
Belongs to one Employee.