Cafe Shop. Final D by Sharad
Cafe Shop. Final D by Sharad
Project Report
ON
Café shop
AT
Cognifyz
Submitted to
(MCA) Submitted by
Pune.
A.Y 2024-25
1
Your
Company
Certificate
College
2
Certificate on
letter head
3
ACKNOWLEDGEMENT
The report entitled “Café shop” with special references is the outcome of our hard work and
dedication at Dr. D.Y. Patil Centre for Management & Research. It was a formidable task.
Without the active guidance and help from all the team members it would have not been
diluted into a good project.
for his philanthropic and overriding effort for guiding and helping me through the
development of my project.
I would also like to place my sincere thanks to Dr. Sunil Dhanawade, Director DYPCMR
and all faculties of DYPCMR, for their constant encouragement and kind help during my
project. Finally, warm appreciation to my team members and friends for making me able to
complete this project successfully.
Sharad S. Tajane
4
Declaration by Student
I, Sharad Sanjay Tajane the undersigned solemnly declare that the project report
is based on my own work carried out during the course of “Master in Computer
Applications” study under the supervision of Prof. Shubhangi Shinde. I assert the
statements made and conclusions drawn are an outcome of my work. I further certify that
1. The work contained in the report is original and has been done by me under the
general supervision of my supervisor.
2. The work has not been submitted to any other Institution for any other
degree/diploma/certificate in this university or any other University of India or
abroad.
3. I have followed the guidelines provided by the SPPU University while writing the
report.
Sharad S. Tajane
5
Index
[Link] Title Page No.
Introduction
1
1.1. Company Profile / Institute Profile 8
2 Proposed System
2.1. Proposed System 15
[Link] Diagrams 36
[Link] Diagrams 37
[Link] Diagrams 38
6
[Link] Diagrams 39
[Link] Dictionary 39
3.12. Sample Input and output Screen (Screen must have valid data. 42
All reports must have at least 5 valid records.)
Coding
4
4.1. Sample Code 48
5 Testing 64
7
5.1 Test Strategy 65
7 Proposed Enhancements 69
8 Conclusion 69
9 Bibliography 70
8
1.1 COMPANY PROFILE
CompanyName:CognifyzTechnologies
Industry:InformationTechnology&Services
DomainFocus:DataAnalytics,
Overview:
Cognifyz is a dynamic and innovative IT solutions company that specializes in delivering
advanced data analytics services and intelligent software products. The company is
committed to leveraging the power of data and cutting-edge technologies to drive digital
transformation and support informed decision-making across various industries.
With a strong foundation in data science, machine learning, and business intelligence,
Cognifyz empowers organizations to harness data as a strategic asset. The company's
mission is to simplify complex business problems through scalable, data-driven solutions
that bring measurable value.
Vision:
To be a global leader in data analytics and technology innovation, transforming businesses
through intelligent insights and impactful digital solutions.
Key Strengths:
Expert team of data analysts, developers, and technology consultants
Focus on innovation, agility, and customer satisfaction
Proven experience in handling large datasets and delivering actionable insights
Continuous learning and adoption of the latest technologies
Role of Data Analyst at Cognifyz:
As a Data Analyst, your role includes collecting, processing, and analysing data to
identify trends, patterns, and actionable insights. Your work supports business decision-
making, performance tracking, and optimization of operations. You collaborate with
teams across the organization to build dashboards, reports, and predictive models that
influence strategic direction.
9
1.2 INTRODUCTION
Cafe Shop
is a modern, user-friendly web-based application designed to streamline the management and
operation of cafes. This project serves as an all-in-one solution for both cafe owners and
customers, offering seamless functionality to handle daily operations, customer orders, and
overall service efficiency.
The project focuses on providing an intuitive interface for managing menus, tracking orders,
and improving customer satisfaction through advanced features like online ordering, realtime
updates, and payment integration. By leveraging PHP for backend development and a
database like MySQL, the system ensures a robust and reliable infrastructure for data
management and dynamic user interaction. This application is aimed at enhancing the cafe
experience by enabling:
the system allows customers to view the menu, place orders, and make payments easily. It
aims to create a smooth and enjoyable experience for both cafe owners and customers.
This project is ideal for cafes looking to modernize their services and improve overall
efficiency.
10
1.3 EXISTING SYSTEM AND NEED FOR A SYSTEM
5. Inflexibility:
o Existing systems struggle to adapt to modern payment methods, such as
digital wallets or credit cards.
In many traditional cafes, the existing system of management is largely manual and paper-
based. Orders are typically taken by hand, billing is done using calculators or simple registers,
and inventory is tracked using notebooks or spreadsheets. This manual process is time-
consuming, error-prone, and lacks efficiency, especially during busy hours. There is often a
lack of proper
11
1.4 Scope of System
• 1.6 Module Descriptions
1. User Management:
• Admin: The admin module allows the cafe owner or manager to control and supervise
all operations within the system. They can: o Manage user roles and permissions
(admin, staff, customers).
o View reports and analytics. o Handle settings and configurations.
• Staff: This module allows staff to handle daily operations, such as:
o Taking orders. o Managing order status (e.g., processing, completed).
o Accessing relevant data like menu, prices, etc.
• Customer: Customers can use the system to interact with the cafe. The module includes:
o Account creation and profile management. o Viewing menu items, placing
orders, and making payments.
o
2. Menu Management:
• Admin can create, update, or delete menu items (e.g., food, drinks, combos).
• Organize the menu by categories (e.g., beverages, appetizers, desserts).
• Attach details to each item like:
o Name, description, price.
o Availability (whether the item is currently in stock).
• Admin can also set promotional offers or discounts for specific items.
3. Order Management:
• Order Placement: Customers can browse the menu, select items, and place
orders (online or in-store).
• Order Status Tracking: Admin and staff can track the status of each order (e.g.,
pending, in progress, completed).
• Order History: Both admin and customers can view past orders for easy reordering or
reference.
• Order Types: Support for various order types:
o Dine-in, Takeaway, and Delivery.
4. Contact:
• Purpose: Allows customers to send messages, inquiries, or feedback to the cafe
directly through a form.
• Fields:
o Name: Customer's full name. o Email: Customer's email address for replies. o
Phone Number: Optional, in case the cafe needs to follow up via phone. o
12
Message: A text box where customers can describe their inquiry, complaint,
suggestion, or request.
• Submit Button: Customers can submit the form, which then sends the data to the
admin or support team.
• Confirmation Message: After submission, a confirmation message appears to reassure
the customer that their inquiry has been received (e.g., "Thank you for reaching out.
We'll get back to you soon.").
5. Payment Integration:
• Payment Processing: Secure and seamless integration with payment gateways for:
o Online payments (e.g., credit/debit cards, digital wallets). o In-store payments
(e.g., cash, card, or QR codes).
• Order Summaries: Provide order details, total cost, taxes, and payment status.
•
6. Customer Interaction & Engagement:
• Loyalty Programs: Offer rewards, discounts, or points for repeat customers.
• Promotions & Discounts: Admin can set up time-based promotions or special offers.
• Customer Feedback: Allow customers to provide feedback on their experience, which
can help improve service.
• Personalized Recommendations: Use customer purchase history to offer personalized
menu recommendations.
7. Admin Dashboard:
• A user-friendly interface for the cafe owner to monitor all activities in real time.
• Includes key data such as:
o Total sales, pending orders, inventory status. o Customer insights and staff
performance.
• Allows easy navigation to different sections like orders, menu, inventory, and reports.
8. Contact Information
• Purpose: Display important contact details for the cafe.
• Features:
o Phone number: For immediate support or reservation calls. o Email address:
For customer support or inquiries.
o Cafe Address: The physical location of the cafe for directions.
o Operating Hours: When the cafe is open for business.
13
1.7. Brief Description of Technology Used
2. Used for:
o Creates the basic layout of the admin dashboard, forms, and tables.
3. JavaScript (Optional/Basic)
4. Font Awesome
Backend Technologies
14
2. MySQL
o Stores all data related to admin accounts, menu items, and orders.
Development Environment
1. XAMPP
2. Visual Studio Code o Code editor for writing PHP, HTML, CSS,
and JS files.
15
2. Proposed System
2.1 Proposed System
The proposed system is a web-based Cafe Shop Management System that aims to
automate and streamline the cafe's daily operations such as managing menu items,
admin users, and customer orders. It provides a centralized platform for admin users
to maintain records, improve workflow, and deliver better service.
16
2.2. Study of Similar System (If required research paper can
be included)
• Advantages:
o Cloud access from anywhere.
o Integration with card readers and printers.
• Limitations:
o Monthly subscription cost is high. o Many advanced features are
unnecessary for small/local cafes.
o Requires internet connectivity and modern hardware.
• Limitations:
Prone to human error and data loss.
No automation or real-time tracking.
17
• Description: Standalone desktop-based inventory or billing systems developed for
general retail.
• Advantages:
Basic inventory management and billing features.
• Limitations:
o Not designed specifically for cafe/restaurant menus. o No
user-level access (like admin or staff).
o Not web-based — can’t be accessed from mobile or remotely.
18
2.3. Feasibility Study
1. Technical Feasibility
• The system is built using widely accepted technologies: PHP (for backend), MySQL
(for database), HTML/CSS (for frontend), and Apache via XAMPP (for local server).
• All tools used are open-source and do not require costly licenses.
• The system runs efficiently on any machine with basic configuration, making it
technically feasible to implement.
2. Economic Feasibility
• The total development cost is minimal as all technologies used are free.
• It saves money over time by reducing the manual workload, errors, and need for
paperwork.
• Even small cafes with limited budget can afford to deploy the system.
19
3. Operational Feasibility
• The system is designed with user-friendliness in mind, using a clean and simple
dashboard.
• Admins can easily manage menu items, accounts, and data with minimal training.
Operational Feasibility refers to the degree to which a proposed system will function
effectively within an organization’s current environment and fulfill the intended objectives.
The Cafe Shop Management System has been evaluated for its operational feasibility to
ensure that it integrates smoothly into the daily operations of a cafe. The system is designed
with a user-friendly interface that allows customers, employees, and administrators to interact
with it easily. Customers can browse menus, place orders, and make payments online without
needing technical expertise. Employees can manage order statuses and monitor day-to-day
operations through a streamlined dashboard, while administrators can oversee the entire
process, manage the menu, and analyze sales reports.
This system also reduces the dependency on manual processes, which often lead to errors and
delays. By digitizing operations, it ensures faster service, better record-keeping, and
enhanced customer satisfaction. Since the system is accessible through any internet-enabled
device, it adds flexibility and convenience to both staff and customers.
Training requirements for employees are minimal due to the system’s intuitive design, which
makes it easier to adopt in a live environment. Additionally, features like secure login for
different user roles, automated reports, and real-time updates contribute to smoother
workflows and more efficient management.
In conclusion, the operational feasibility of the Cafe Shop Management System is high, as it
aligns well with the existing workflows of cafe operations, improves service quality, and is
easy to implement and use.
20
4. Time Feasibility
• The project can be developed and deployed within a short time frame (4–6 weeks for
basic version).
5. Social Feasibility
• Contributes to better customer service indirectly through improved order and menu
management.
Social Feasibility refers to the degree to which the proposed system will be accepted by
users and stakeholders, and its potential impact on the organization and the people involved.
For the Cafe Shop Management System, social feasibility has been positively evaluated. The
system is designed to simplify the interaction between customers, employees, and
administrators, leading to greater user satisfaction and improved service delivery.
From the customers’ perspective, the system offers a more convenient and modern way to
place orders, make payments, and receive services. It aligns with current digital trends and the
growing preference for contactless and online services. For cafe employees, the system helps
streamline tasks such as order processing and inventory tracking, reducing workload and
stress. As for administrators, they benefit from real-time insights and easier management of
operations, which leads to better decision-making.
Importantly, the system does not threaten any existing jobs; instead, it supports staff by
automating repetitive tasks and reducing errors. Its user-friendly design ensures that users of
all skill levels can adapt to the system with minimal training. Furthermore, as society
increasingly embraces digital solutions in daily life, this system contributes to a positive public
image for the cafe, showcasing innovation and efficiency.
In conclusion, the Cafe Shop Management System is socially feasible, as it is likely to be well-
received by users, enhance customer experience, and bring operational ease to staff and
management alike.
21
2.4. Objectives of Proposed System
1. To Develop a Web-Based System
7. To Ensure Secure
8. To Allow Future.
The primary objective of the proposed Cafe Shop Management System is to automate and
streamline the day-to-day operations of a cafe to improve efficiency, accuracy, and customer
satisfaction. The system aims to provide a centralized platform where customers can browse
the menu, place orders, and make payments easily through a user-friendly interface. It is
designed to reduce manual effort and eliminate human errors in order processing, billing, and
inventory tracking.
For cafe staff, the system simplifies task management by enabling them to receive and update
order statuses in real-time. It supports inventory management by automatically tracking item
availability and alerting for low stock levels. For administrators, the system provides
powerful tools to manage users, menu items, pricing, and generate insightful sales reports to
help make informed business decisions.
Another key objective is to ensure secure access through role-based login for users,
employees, and admins, thereby maintaining data privacy and system integrity. The system
also aims to be scalable and flexible, capable of adapting to future enhancements or changes
in business needs.
In essence, the proposed system is intended to digitize the overall functioning of the cafe,
resulting in faster service, better resource management, and a more professional customer
experience.
22
2.5 User Requirements
A. Functional Requirements
These describe what the system should do — the actual features and actions available to users.
3. Manage Admin
future feature).
B. Non-Functional Requirements
These define how well the system performs and general expectations beyond specific features.
1. Usability
23
3 Analysis and Design
1. Functional Requirements
These define the core functionalities the system must perform.
➢ User Management
24
Menu Management
• Customers can view the menu with item details and prices.
➢ Order Management
Order Management is one of the most critical and dynamic components of the Cafe
Shop Management System. It handles the complete life cycle of a customer’s order—from
placement to preparation, tracking, and fulfillment. This module ensures smooth coordination
between customers, employees, and the kitchen, resulting in efficient operations and high
customer satisfaction.
The order management process starts when a customer places an order through the system.
The user selects menu items, adds them to the cart, and proceeds to checkout. During
checkout, they can review the order, apply any available discounts or offers, and make a
payment using the preferred method (cash, card, UPI, or digital wallets). The system then
generates a unique order ID and stores the order details in the database.
Once the order is placed, it is forwarded to the kitchen or the respective employee
dashboard in real time. Employees or kitchen staff receive the order with all relevant details
such as item names, quantity, special instructions, and delivery preferences (e.g., dine-in or
takeaway). This allows them to begin preparation without delays and helps maintain the
workflow.
Throughout the order process, the system updates the order status (e.g., Pending, Preparing,
Ready, Completed, or Cancelled). These status updates can be viewed by both the customer
and the employee, allowing real-time tracking and transparency. The system can also send
notifications to alert the customer when the order is ready.
The module should also support order modification or cancellation before a certain stage
(like before the preparation begins). This gives customers flexibility and reduces errors in
order processing.
25
From the admin’s perspective, the Order Management module provides a comprehensive
overview of all ongoing and past orders. Admins can generate reports, analyze trends, and
track performance using this data. It helps identify popular items, peak hours, and staff
efficiency.
➢ Inventory Management
At the core of this module lies the real-time tracking of inventory items. Each time an order
is placed and processed, the system automatically updates the quantity of the ingredients
used. For example, when a customer orders a cappuccino, the system deducts the required
quantity of coffee beans, milk, and sugar from the inventory database. This dynamic
adjustment helps in keeping stock records accurate and up to date.
The system allows the admin or manager to categorize inventory items (e.g., dairy products,
bakery items, vegetables, beverages) and maintain records like current quantity, unit of
measurement, expiry date, and supplier details. It can also support barcode scanning, which
speeds up inventory updates during stock intake and makes auditing more efficient.
26
One of the most powerful features of this module is the low-stock alert system. When the
stock of any item falls below a predefined threshold, the system automatically generates a
notification or sends an alert to the manager. This ensures timely reordering and prevents
disruption in cafe services due to stockouts.
The system also facilitates purchase order management, where the admin can create and
send purchase orders directly to suppliers from within the system. When the new stock
arrives, the inventory is updated accordingly after verification. This streamlines the
procurement process and reduces manual workload.
In addition, the Inventory Management module can help in monitoring expiry dates and
spoilage, especially for perishable items like dairy, bread, and vegetables. The system can
flag items nearing expiry, allowing the staff to prioritize their use or remove them before they
become unusable. This helps maintain the quality and hygiene standards of the café.
From a financial perspective, this module provides detailed inventory reports, including
stock valuation, usage history, wastage analysis, and monthly consumption. These reports
help the management make data-driven decisions about pricing, supplier selection, and menu
planning. For instance, if a particular ingredient is rarely used or has a high wastage rate, it
may indicate the need to revise the menu or portion sizes.
The system can also link with the sales and billing modules, so that items sold are
automatically reflected in the inventory usage. This tight integration ensures consistency and
accuracy across the system.
➢ Table Reservation
• Customers can book tables online.
27
➢ Reports & Analytics
The Reports & Analytics module is a core component of the Cafe Shop Management
System, designed to provide comprehensive insights into various operational, financial, and
customer-related aspects of the business. It transforms raw data collected from different
modules—such as sales, inventory, billing, customer feedback, and reservations—into
meaningful and actionable information. This empowers the management team to make
informed decisions, improve efficiency, and plan strategically for growth.
At the heart of the module lies the capability to generate customizable reports. These reports
can be scheduled (daily, weekly, monthly) or generated on demand, depending on the
requirements of the café staff or management. Common types of reports include sales
reports, inventory usage, top-selling items, least popular dishes, employee performance,
revenue trends, and customer visit patterns. By automating these reporting processes, the
system minimizes human error and saves valuable time.
From a financial perspective, the sales and revenue analytics help in identifying high-
performing periods, evaluating pricing strategies, and determining profit margins. This
information is crucial during budgeting, forecasting, and financial planning. For instance, if
monthly reports indicate that a particular menu item generates high profits but suffers from
inconsistent inventory supply, the management can adjust their stock strategy or negotiate
better terms with suppliers.
The inventory reports track the usage and wastage of raw materials, helping to reduce costs
and avoid stockouts or overstocking. The system can highlight unusual trends, such as a
sudden spike in ingredient consumption, which may indicate issues like kitchen waste, theft,
or faulty entries.
Customer analytics offer a deeper understanding of customer behavior, including frequent
orders, peak visit hours, and customer segmentation based on demographics or preferences.
This data is invaluable for targeted marketing campaigns, personalized offers, and loyalty
programs. For example, the system may reveal that students visit more during afternoon
hours, prompting the café to launch a “Student Happy Hour” discount during that time.
Moreover, the system provides graphical dashboards that visualize trends and metrics
through charts, graphs, and tables. These visual representations make it easier for non-
technical users to grasp complex data and patterns. With real-time analytics, managers can
monitor daily sales performance, assess footfall, or check reservation status with a single
glance.
Employee performance analytics evaluate the productivity and efficiency of staff based on
factors such as customer reviews, order fulfillment speed, and shift durations. This data can
be used to recognize high-performing staff or identify areas where training may be required.
28
In addition, the Reports & Analytics module plays a crucial role in compliance and
auditing. It ensures that all business operations are properly documented and accessible,
which is essential for financial audits, tax calculations, and regulatory reporting.
One of the major advantages of this module is data-driven decision-making. Instead of
relying on intuition or guesswork, café owners and managers can make confident choices
based on solid evidence. Whether it’s launching a new menu item, planning a marketing
strategy, hiring additional staff, or optimizing supply chain management—reports and
analytics guide every critical move.
To ensure security, the module includes access control features, so that sensitive reports are
visible only to authorized personnel. It may also offer data export capabilities, allowing
reports to be saved in formats like PDF, Excel, or CSV for printing or sharing with
stakeholders. In conclusion, the Reports & Analytics module is not just a backend function
—it is a strategic intelligence tool that drives performance, accountability, and growth. By
consolidating and analyzing data from all other modules, it provides a 360-degree view of the
cafe's operations, helping the business stay competitive, customer-focused, and financially
healthy.
2. Non-Functional Requirements
These define the system's performance, security, and usability. ➢
Performance
Performance refers to how efficiently and effectively the Cafe Shop Management
System executes its functions under various operational conditions. It is a critical non-
functional requirement that impacts user satisfaction, system usability, and the overall
success of the application.
In a real-time environment like a cafe, where speed and responsiveness are essential, the
performance of the system ensures that tasks such as placing orders, generating bills,
updating inventory, or managing reservations happen swiftly and without delay.
29
Key Considerations in Performance:
o Response time refers to the time taken by the system to respond to a user’s
action.
o For example, when a waiter places a customer's order through the system, the
order should reflect in the kitchen interface within a few seconds (ideally
under 2 seconds).
2. Concurrent Users:
o The performance should remain stable during high-traffic hours such as lunch
or dinner time, weekends, and festivals when the cafe is crowded.
o This requires load testing during development to ensure that the system can
handle peak operations without degradation in speed.
o Operations such as bill generation, sales report generation, and daily inventory
checks should be processed quickly.
o Long processing times can frustrate users and cause operational delays.
6. Low Downtime:
30
o If the application is web-based or cloud-deployed, it should ensure reliable
uptime and quick recovery in case of failures.
7. Resource Efficiency:
o As the business grows, the system should maintain performance even with the
addition of new branches, more users, or extended features.
➢ Security
o The system should implement secure login mechanisms for different users:
admins, employees, and customers.
o Role-based access control must be in place so that users only have access to
the features and data relevant to their roles. For example, a cashier cannot
access admin reports, and a waiter cannot change inventory settings.
2. Password Protection:
o The system should enforce strong password policies (minimum length, use of
symbols, etc.) and support password reset mechanisms.
3. Data Encryption:
31
o Sensitive data, such as payment details and personal information, should be
transmitted over HTTPS using SSL/TLS encryption.
o All database queries must use prepared statements and parameterized queries
to prevent SQL injection attacks.
o Input validation and sanitization should be implemented for all user inputs.
5. Session Management:
o Regular monitoring and logging of network activity can help detect suspicious
behavior.
7. Regular Backups:
o The system should perform regular data backups to prevent data loss due to
accidental deletions, corruption, or cyber-attacks like ransomware.
o The system should maintain logs of all critical operations (e.g., login attempts,
data modifications, order processing).
o These logs can help trace activities and detect any unauthorized or malicious
behaviours.
32
10. Compliance with Data Privacy Laws:
The system should comply with data protection regulations like GDPR, especially if it
handles personal data of customers.
Customers should be informed about how their data is used and stored, and options for
data deletion or updates should be provided.
➢ Usability
➢ Scalability
• Should support an increasing number of customers and menu items.
➢ Maintainability
Compliance with data privacy laws is a vital aspect of developing and managing the Cafe
Shop Management System, especially when the system collects, stores, and processes
personal information such as customer names, contact details, payment data, and employee
records.
Data privacy laws are regulations established to protect the personal data of individuals and
to ensure that organizations handle such data responsibly, ethically, and legally. Ignoring
these laws can result in legal penalties, loss of customer trust, and severe reputational
damage.
1. PurposeLimitation
The system must collect user data only for specific, explicit, and legitimate purposes—
such as placing orders, processing payments, or managing reservations. It should not
be used for any unauthorized or unrelated activity.
33
2. DataMinimization
Only the necessary data required for system functionality should be collected. For
example, the system should not collect extra personal details unless required for the
service (e.g., asking for customer feedback does not require their full address).
3. InformedConsent
Users must be informed clearly about what data is being collected, why it’s being
collected, and how it will be used. This is often achieved through privacy policies and
consent checkboxes during registration or checkout.
4. UserRights
The system should allow users to:
5. DatSecurityMeasures
To comply with data privacy laws, the system must implement technical measures to
protect personal data—such as encryption, access control, and secure data storage.
This ensures data confidentiality and integrity.
6. Third-partySharingTransparency
If the system uses third-party services (e.g., payment gateways or email services),
users must be informed if their data is being shared and for what purpose. The third
parties should also comply with relevant data protection laws.
7. DataBreachProtocols
In the event of a data breach, the system administrators must have a process in place
to notify affected users and legal authorities within a specified timeframe, depending
on the legal requirements.
8. RegularAuditsandComplianceChecks
Regular monitoring, data audits, and compliance checks must be performed to ensure
that all components of the system adhere to the required legal standards.
34
3.2 Entity Relationship Diagram (ERD)
35
3.3 Use Case Diagrams
Admin
Customer
36
3.4 Class Diagrams
37
3.5 Activity Diagrams
38
3.6 Sequence Diagrams
39
3.7 Collaboration Diagrams
40
3.9. Table Specification
41
3.10 User Interface Design
The test procedure and implementation ensure that the users table in the Cafe Shop. website is
correctly designed, implemented, and functions as expected.
1. Test Procedure
The test procedure includes the following steps:
42
• Validate that specific user details can be fetched correctly.
3.12 Sample Input and output Screen (Screen must have valid data.
43
44
45
46
47
48
4. Coding
<head>
<meta charset="UTF-8">
</head>
<body>
<section class="accounts">
<div class="table_header">
<p>Admin Details</p>
<div>
<button class="add_new">search</button>
</div>
49
</div>
</div>
<div>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
?>
<tr>
</tr>
<?php
} else {
?>
</tbody>
</table>
50
</div>
</section>
<script src="../js/admin_script.js"></script>
</body>
</html>
<?php if (isset($message))
{ foreach ($message as $message)
{
echo '
<div class="message">
<span>' . $message . '</span>
<i class="fas fa-times" onclick="[Link]();"></i>
</div>
';
}
}
?>
<header class="header">
<section class="flex">
<nav class="navbar">
<a href="[Link]">home</a>
<a href="[Link]">products</a>
<a href="placed_orders.php">orders</a>
<a href="admin_accounts.php">admins</a>
<a href="users_accounts.php">users</a>
<a href="employee_accounts.php">employees</a>
<a href="[Link]">messages</a>
</nav>
51
<div class="icons">
<div id="menu-btn" class="fas fa-bars"></div>
<div id="user-btn" class="fas fa-user"></div>
</div>
<div class="profile">
<?php
$select_profile = $conn->prepare("SELECT * FROM `admin` WHERE id = ?");
$select_profile->execute([$admin_id]);
$fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC);
?>
<p><?= $fetch_profile['name']; ?></p>
<a href="update_profile.php" class="btn">update profile</a>
<a href="../components/admin_logout.php" onclick="return confirm('logout from this
website?');" class="delete-btn">logout</a>
</div>
</section>
</header>
<?php if (isset($message))
{ foreach ($message as $message)
{
echo '
<div class="message">
<span>' . $message . '</span>
<i class="fas fa-times" onclick="[Link]();"></i>
</div>
';
}
}
?>
<header class="header">
<section class="flex">
<nav class="navbar">
<a href="employee_dashboard.php">home</a>
<a href="[Link]">products</a>
<a href="placed_orders.php">orders</a>
</nav>
<div class="icons">
52
<div id="menu-btn" class="fas fa-bars"></div>
<div id="user-btn" class="fas fa-user"></div>
</div>
<div class="profile">
<?php
$select_profile = $conn->prepare("SELECT * FROM `employee` WHERE id = ?");
$select_profile->execute([$employee_id]);
$fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC);
?>
<p><?= $fetch_profile['name']; ?></p>
<div class="flex-btn">
</div>
<a href="../components/employee_logout.php" onclick="return confirm('logout from this
website?');" class="delete-btn">logout</a>
</div>
</section>
</header>
<?php if (isset($message))
{ foreach ($message as $message)
{
echo '
<div class="message">
<span>' . $message . '</span>
<i class="fas fa-times" onclick="[Link]();"></i>
</div>
';
}
}
?>
<header class="header">
<section class="flex">
<nav class="navbar">
<a href="[Link]">HOME</a>
<a href="[Link]">ABOUT</a>
<a href="[Link]">PRODUCT</a>
<a href="[Link]">MENU</a>
<a href="[Link]">ORDER</a>
53
<a href="[Link]">CONTACT</a>
</nav>
<div class="icons">
<?php
$count_cart_items = $conn->prepare("SELECT * FROM `cart` WHERE user_id = ?");
$count_cart_items->execute([$user_id]);
$total_cart_items = $count_cart_items->rowCount();
?>
<a href="[Link]"><i class="fas fa-search"></i></a>
<a href="[Link]"><i class="fas fa-shopping-cart"></i><span>(<?= $total_cart_items; ?>)</span></a>
<div id="user-btn" class="fas fa-user"></div>
<div id="menu-btn" class="fas fa-bars"></div>
</div>
<div class="profile">
<?php
$select_profile = $conn->prepare("SELECT * FROM `users` WHERE id = ?");
$select_profile->execute([$user_id]);
if ($select_profile->rowCount() > 0) {
$fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC);
?>
<p class="name"><?= $fetch_profile['name']; ?></p>
<div class="flex">
<a style="margin-left: 10px;" href="[Link]" class="btn">profile</a>
<a href="components/user_logout.php" onclick="return confirm('logout from this
website?');" class="delete-btn">logout</a>
</div>
<!-- <p class="account">
<a href="[Link]">login</a> or
<a href="[Link]">register</a>
</p> -->
<?php
} else {
?>
<p class="name">please login first!</p>
<a href="[Link]" class="btn">login</a>
<?php
}
?>
</div>
</section>
</header>
<?php
54
if(isset($_POST['add_to_cart'])){
if($user_id == ''){
header('location:[Link]');
}else{
$pid = $_POST['pid'];
$pid = filter_var($pid, FILTER_SANITIZE_STRING);
$name = $_POST['name'];
$name = filter_var($name, FILTER_SANITIZE_STRING);
$price = $_POST['price'];
$price = filter_var($price, FILTER_SANITIZE_STRING);
$image = $_POST['image'];
$image = filter_var($image, FILTER_SANITIZE_STRING);
$qty = $_POST['qty'];
$qty = filter_var($qty, FILTER_SANITIZE_STRING);
COMPONENT’S
<?php
if(isset($_POST['add_to_cart'])){
if($user_id == ''){
header('location:[Link]');
}else{
$pid = $_POST['pid'];
$pid = filter_var($pid, FILTER_SANITIZE_STRING);
$name = $_POST['name'];
55
$name = filter_var($name, FILTER_SANITIZE_STRING);
$price = $_POST['price'];
$price = filter_var($price, FILTER_SANITIZE_STRING);
$image = $_POST['image'];
$image = filter_var($image, FILTER_SANITIZE_STRING);
$qty = $_POST['qty'];
$qty = filter_var($qty, FILTER_SANITIZE_STRING);
<?php
if (isset($message)) {
foreach ($message as $message)
{ echo '
<div class="message">
<span>' . $message . '</span>
<i class="fas fa-times" onclick="[Link]();"></i>
</div>
';
}
}
?>
<header class="header">
<section class="flex">
56
<a href="[Link]" class="logo">Admin<span>Panel</span></a>
<nav class="navbar">
<a href="[Link]">home</a>
<a href="[Link]">products</a>
<a href="placed_orders.php">orders</a>
<a href="admin_accounts.php">admins</a>
<a href="users_accounts.php">users</a>
<a href="employee_accounts.php">employees</a>
<a href="[Link]">messages</a>
</nav>
<div class="icons">
<div id="menu-btn" class="fas fa-bars"></div>
<div id="user-btn" class="fas fa-user"></div>
</div>
<div class="profile">
<?php
$select_profile = $conn->prepare("SELECT * FROM `admin` WHERE id = ?");
$select_profile->execute([$admin_id]);
$fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC);
?>
<p><?= $fetch_profile['name']; ?></p>
<a href="update_profile.php" class="btn">update profile</a>
<a href="../components/admin_logout.php" onclick="return confirm('logout from this
website?');" class="delete-btn">logout</a>
</div>
</section>
</header>
<?php
include '[Link]';
session_start();
session_unset();
session_destroy();
57
header('location:../admin/admin_login.php');
?>
<?php
// local host
$db_name = 'mysql:host=localhost;dbname=food_db';
$user_name = 'root';
$user_password = '';
// connection variable
$conn = new PDO($db_name, $user_name, $user_password);
<?php
if (isset($message)) {
foreach ($message as $message)
{ echo '
<div class="message">
<span>' . $message . '</span>
<i class="fas fa-times" onclick="[Link]();"></i>
</div>
';
}
}
?>
<header class="header">
<section class="flex">
<nav class="navbar">
<a href="employee_dashboard.php">home</a>
<a href="[Link]">products</a>
<a href="placed_orders.php">orders</a>
58
</nav>
<div class="icons">
<div id="menu-btn" class="fas fa-bars"></div>
<div id="user-btn" class="fas fa-user"></div>
</div>
<div class="profile">
<?php
$select_profile = $conn->prepare("SELECT * FROM `employee` WHERE id = ?");
$select_profile->execute([$employee_id]);
$fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC);
?>
<p><?= $fetch_profile['name']; ?></p>
<div class="flex-btn">
</div>
<a href="../components/employee_logout.php" onclick="return confirm('logout from this
website?');" class="delete-btn">logout</a>
</div>
</section>
</header>
<?php
include '[Link]';
session_start();
session_unset();
session_destroy();
header('location:../admin/admin_login.php');
?>
<footer class="footer">
<section class="grid">
59
<div class="box">
<h3>quick links</h3>
<div class="box">
<h3> Cafe Shop <i class="fas fa-shopping-basket"></i> </h3>
<div class="share">
<a href="#" class="fab fa-facebook-f"></a>
<a href="#" class="fab fa-twitter"></a>
<a href="#" class="fab fa-instagram"></a>
<a href="#" class="fab fa-linkedin"></a>
</div>
</div>
<div class="box">
<h3>Opening Hours</h3>
<div class="dateinfo">
<p>MONDAY </p> <samp>CLOSED</samp>
</div>
<div class="dateinfo">
<p>TUESDAY </p> <samp>9.00 - 22.00</samp>
</div>
<div class="dateinfo">
<p>WEDNESDAY </p><samp>9.00 - 22.00</samp>
</div>
<div class="dateinfo">
<p>THURSDAY </p><samp>9.00 - 22.00</samp>
</div>
<div class="dateinfo">
<p>FRIDAY </p> <samp>9.00 - 22.00</samp>
</div>
<div class="dateinfo">
<p>SATURDAY </p> <samp>9.00 - 22.00</samp>
</div>
60
<div class="dateinfo">
<p>SUNDAY </p><samp>*10.00 - 20.00</samp>
</div>
</div>
<div class="box">
<h3>contact info</h3>
<div class="phone">
<p> <i class="fas fa-phone"></i> +88015 0000 0000 </p>
<p> <i class="fas fa-phone"></i> +88017 0000 0000 </a>
<p> <i class="fas fa-envelope"></i> [Link]@[Link] </p>
</div>
<div class="phone1">
<h3>Branch Location</h3>
<p> <i class="fas fa-map-marker-alt"></i> Jahurul Islam City Gate, A/2 Jahurul Islam
Ave, Dhaka 1212 </p>
<p> <i class="fas fa-envelope"></i> [Link]@[Link] </p>
</div>
</div>
</section>
</footer>
<footer class="footer">
<div class="grid">
<div class="box1">
<h3> groco <i class="fas fa-shopping-basket"></i> </h3>
61
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Aliquam, saepe.</p>
<div class="share">
<a href="#" class="fab fa-facebook-f"></a>
<a href="#" class="fab fa-twitter"></a>
<a href="#" class="fab fa-instagram"></a>
<a href="#" class="fab fa-linkedin"></a>
</div>
</div>
</footer>
<?php
if (isset($message)) {
foreach ($message as $message)
{ echo '
<div class="message">
<span>' . $message . '</span>
<i class="fas fa-times" onclick="[Link]();"></i>
</div>
';
}
}
?>
<header class="header">
<section class="flex">
<nav class="navbar">
62
<a href="[Link]">HOME</a>
<a href="[Link]">ABOUT</a>
<a href="[Link]">PRODUCT</a>
<a href="[Link]">MENU</a>
<a href="[Link]">ORDER</a>
<a href="[Link]">CONTACT</a>
</nav>
<div class="icons">
<?php
$count_cart_items = $conn->prepare("SELECT * FROM `cart` WHERE user_id = ?");
$count_cart_items->execute([$user_id]);
$total_cart_items = $count_cart_items->rowCount();
?>
<a href="[Link]"><i class="fas fa-search"></i></a>
<a href="[Link]"><i class="fas fa-shopping-cart"></i><span>(<?= $total_cart_items;
?>)</span></a>
<div id="user-btn" class="fas fa-user"></div>
<div id="menu-btn" class="fas fa-bars"></div>
</div>
<div class="profile">
<?php
$select_profile = $conn->prepare("SELECT * FROM `users` WHERE id = ?");
$select_profile->execute([$user_id]);
if ($select_profile->rowCount() > 0)
{
$fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC);
?>
<p class="name"><?= $fetch_profile['name']; ?></p>
<div class="flex">
<a style="margin-left: 10px;" href="[Link]" class="btn">profile</a>
<a href="components/user_logout.php" onclick="return confirm('logout from this
website?');" class="delete-btn">logout</a>
</div>
<!-- <p class="account">
<a href="[Link]">login</a> or
<a href="[Link]">register</a>
</p> -->
<?php
} else {
?>
<p class="name">please login first!</p>
63
<a href="[Link]" class="btn">login</a>
<?php
}
?>
</div>
</section>
</header>
<?php
if (isset($message)) {
foreach ($message as $message)
{ echo '
<div class="message">
<span>' . $message . '</span>
<i class="fas fa-times" onclick="[Link]();"></i>
</div>
';
}
}
?>
<header class="header">
<section class="flex">
<nav class="navbar">
<a href="employee_dashboard.php">home</a>
<a href="[Link]">products</a>
<a href="placed_orders.php">orders</a>
</nav>
<div class="icons">
<div id="menu-btn" class="fas fa-bars"></div>
<div id="user-btn" class="fas fa-user"></div>
</div>
64
<div class="profile">
<?php
$select_profile = $conn->prepare("SELECT * FROM `employee` WHERE id = ?");
$select_profile->execute([$employee_id]);
$fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC);
?>
<p><?= $fetch_profile['name']; ?></p>
<div class="flex-btn">
</div>
<a href="../components/employee_logout.php" onclick="return confirm('logout from this
website?');" class="delete-btn">logout</a>
</div>
</section>
</header>
$total_cart_items = $count_cart_items->rowCount();
5. Testing
The Test Strategy defines the overall approach to testing the users table, ensuring its
reliability, security, and efficiency in handling user data.
Software testing is the process of evaluating and verifying that a software application or
system functions correctly and meets the specified requirements. It plays a critical role in the
software development life cycle by identifying bugs, errors, or missing features before the
final product is delivered to the end users. The main purpose of software testing is to ensure
the quality, functionality, performance, and security of the application. It helps developers
identify issues early, reduce the cost of development, and improve user satisfaction.
There are different types of testing methods, such as manual testing, where testers execute
test cases without automation tools, and automated testing, where scripts and tools are used to
perform testing more efficiently. Testing is broadly classified into functional and non-
functional testing. Functional testing focuses on checking the business logic and features of
the application, while non-functional testing deals with performance, usability, compatibility,
and reliability.
65
In the development of a system like the Cafe Shop Management System, testing ensures that
every module — such as login systems, cart functionality, order processing, and user
management — works as intended. Proper testing provides confidence to both developers and
stakeholders that the software is ready for deployment and capable of handling real-world use
cases without failure.
4. Test Environment
• Database: MySQL or MariaDB
66
5.2 Unit Test Plan
The Unit Test Plan focuses on verifying individual components of the users table in the Cafe
Shop Management Website. It ensures that database operations such as insertion, retrieval,
update, and deletion work correctly and efficiently.
Unit testing is an essential phase of software testing that focuses on checking the individual
components or functions of a system to ensure they perform as expected. In the context of
the Cafe Shop Management System, unit testing involves testing small and independent
modules such as user login, admin access, menu management, cart functionalities, and order
placement. Each function is tested in isolation before it is integrated with other parts of the
system. The purpose of unit testing is to identify errors in the early development phase so
that they can be resolved quickly and efficiently. This not only improves the quality and
reliability of the software but also reduces the cost of debugging in later stages.
In this project, a bottom-up approach is used, where testing begins from the lowest-level
components like functions and database interactions, and gradually progresses to more
complex integrations. The testing environment consists of a frontend built using HTML, CSS,
and JavaScript, with backend logic written in PHP and a MySQL database handling data
storage. Test cases are created to validate each module using both valid and invalid input to
confirm that the system handles data correctly and provides appropriate feedback or output.
Unit testing ensures that every part of the application works as intended individually. It helps
maintain code quality by allowing developers to make changes or updates confidently,
knowing that tests will catch any unexpected behavior. The process also makes the system
more robust and reduces the likelihood of bugs making it into the final deployed version.
Overall, unit testing is a critical step toward delivering a stable, efficient, and user-friendly
cafe shop management system.
A test case is a detailed document that defines specific conditions and expected outcomes to
verify whether a system works as intended.
67
Key Elements of a
Test Case:
Test Script
A test script is a set of instructions (written in SQL or a programming language) that automates
or manually executes test cases.
Table: Objective: Test data insertion and retrieval for the user’s table.
68
6. Drawback and Limitations of Proposed System
Limited Scalability – The system may face performance issues if the number of users and
orders increases beyond its initial capacity.
Database Dependency – A single database failure could disrupt the entire system.
2. Security Limitations
Password Security – If not properly hashed, user credentials may be vulnerable to hacking.
SQL Injection Risk – Without strict validation and prepared statements, the system may be
exposed to SQL injection attacks.
Data Privacy Concerns – If user data is not encrypted, unauthorized access could lead to data
breaches.
69
7. Proposed Enhancements
To overcome the limitations and drawbacks of the existing system, the following enhancements
are proposed to improve scalability, security, and user experience.
1. Technical Enhancements
Cloud-Based Database – Implement a cloud-hosted database (e.g., MySQL on AWS,
8. Conclusion
70
9. Bibliography
Laravel Documentation. (n.d.). PHP Framework for Web Applications. Retrieved from
[Link]
To improve deployment, version control and monitoring, various DevOps tools were used:
GitHub: version control system to manage project code efficiently.
Postman: Used for API testing. Ensuring the correctness of backend endpoints and Response.
Maven: Build automation tools used in the Spring Boot backend for dependency management
and project compilation.
71