Project Report
Project Report
1. Introduction
o 1.1 Project Title
o 1.2 Category
o 1.3 Overview
o 1.4 Background
1.4.1 Introduction of the Company
1.4.2 Existing System
o 1.5 Objectives of the System
o 1.6 Scope of the System
o 1.7 Structure of the System
o 1.8 System Architecture
o 1.9 End Users
o 1.10 Software/Hardware Used for Development
o 1.11 Software/Hardware Required for Implementation
1
o3.1 Introduction
o 3.2 Assumptions and Constraints
3.2.1 Assumptions
3.2.2 Constraints
o 3.3 Functional Decomposition
3.3.1 Admin Module
3.3.2 User Module
o 3.4 Description of Programs
3.4.1 Context Flow Diagram (CFD)
3.4.2 Data Flow Diagrams (DFDs)
4. Database Design (or Data Structure)
a. Introduction (brief write-up about Database design)
b. Purpose and scope
c. Table Definition
d. ER diagram
2
c. Menu
d. Data store / retrieval / update
e. Validation
f. View
g. On screen reports
h. Data Reports
i. Alerts
j. Error messages
8. Testing
i. Unit Testing
b. Test Reports
Conclusion
Limitations
Scope for enhancement (future scope)
Abbreviations and Acronyms (list)
Bibliography / References (list in specified format)
3
INTRODUCTION
i. Project Title
Cooking Companion
ii. Category
iii. Overview
A Cooking Companion is a website that allows users to search for recipes based
on specific ingredients is a valuable tool for home cooks. It operates by building
a vast database of recipes and then using sophisticated algorithms to match user-
inputted ingredients with potential dishes.
b. Background
The idea for this recipe finder website originated from personal struggles in the
kitchen. With a busy schedule and a limited pantry, finding creative and
delicious meals often felt like a chore. Existing recipe websites required specific
ingredients, leading to frustration and wasted food.
4
c. Objectives of the System
User Module
The User module is the core component of the recipe finder application,
focusing on the end-user experience. Its primary functions include:
User Registration: Allows users to create accounts with necessary details like name,
email, and password.
User Authentication: Verifies user identity through login credentials.
Profile Management: Enables users to update personal information, preferences, and
dietary restrictions.
Recipe Interaction: Facilitates user interactions with recipes, such as saving, rating,
and commenting.
Search Functionality: Enables users to search for recipes based on ingredients,
keywords, or other criteria.
5
Admin Module
The Admin module is responsible for managing the overall platform and its
content. Its primary functions include:
f. System Architecture
Presentation Layer: User interface components for Admin and User module.
Application Layer: The Application Layer is responsible for handling the business
logic of the Recipe Finder application. It acts as an intermediary between the user
interface (Presentation Layer) and the data layer.
Data Layer: Database management system for storing user data, recipes.
G .End Users
Admin: System administrators who manage and oversee all aspects of the
application.
User: Customers who search for and purchase medicines through the system.
6
h. Software/Hardware Used for the Development
Software:
o Development Frameworks: VScode.
o Language used: HTML, CSS, Bootstrap, node.js, PHP ,js query
o Database: MySQL
o Hosting: XAMPP
Hardware:
o Development Machines: PCs or laptops with modern processors and sufficient
RAM
o Server Hardware: Dedicated servers or cloud infrastructure for deployment.
Software:
o Production Environment: Web server software (e.g., Apache, Nginx), database
management systems (MySQL, PostgreSQL)
o Development Tools: IDEs (e.g., Visual Studio Code), version control systems
(e.g., Git)
Hardware:
o Production Servers: High-performance servers or cloud infrastructure with
scalable resources
o User Devices: PCs, tablets, and smartphones for accessing the application.
7
SOFTWARE REQUIREMENT
SPECIFICATION
8
Software Requirements Specification (SRS) for Cooking
Companion
a. Introduction
b. Overall Description
i. Product Perspective
Admin Module:
o Manage user accounts.
o Add, delete and update the recipes
User Module:
o Browse and search for recipes.
o View categories. And search for recipes.
o Manage user account information.
o
Admins: System administrators can access user data, recipe data and create,delete
and update
Users: user can view recipes and create,delete and update recipes
Security: The system must ensure secure access and data protection, especially
regarding sensitive information like user details and transaction data.
Performance: The system should handle concurrent users efficiently and provide
quick response times.
Compliance: The system must adhere to relevant recipes ingredients
v. Assumptions
9
c. Special Requirements (Software / Hardware)
Software Requirements:
o Web server software (e.g., Apache, Nginx)
o Database management system (e.g., MySQL, PostgreSQL)
o Development frameworks (e.g., HTML,CSS for frontend, mysql for backend)
Hardware Requirements:
o Development machines with modern processors and sufficient RAM
o Production servers or cloud infrastructure with scalable resources
d. Functional Requirements
User Management: User can view recipes and can add recipes and can also remove
his own recipes
Search : user can search recipes with ingredient’s
e. Design Constraints
User Interface: The interface must be intuitive and accessible across different
devices and screen sizes.
Integration: The system must integrate with existing systems or APIs if necessary for
additional functionalities.
Scalability: The design should support scalability to accommodate future growth and
additional features.
f. System Attributes
g. Other Requirements
10
SYSTEM DESIGN
a. Introduction
System Design involves defining the architecture and components of the software
system to meet specified requirements. It translates high-level requirements into
detailed design elements that guide the development process. For the Recipes finder
this phase focuses on structuring the application to ensure efficient management of
recipes while providing a clear path for implementation and integration of various
functionalities.
Assumptions
User Experience: Users will have basic familiarity with web applications and
internet navigation.
Technology Stack: The chosen technology stack (e.g., html, mysql) will be suitable
for implementing the required features.
Availability: Adequate server resources and network infrastructure will be available
to support system operations.
Constraints
Performance: The system must handle high traffic volumes during peak times
without significant performance degradation.
Security: Sensitive data such as user information and transaction details must be
securely stored and transmitted.
Integration: The system should integrate seamlessly with third-party services if
required, such external APIs.
c. Functional Decomposition
1. Admin Module:
o User Management: Functions for adding, updating, and deleting user and
accounts.
o System Settings: Functions for configuring application settings and
preference
2. User Module:
o Search and view: user can view recipes by ingrendients and search
o Create account: create account and log out
d. Description of Programs
11
i. Context Flow Diagram (CFD)
The Context Flow Diagram provides a high-level view of the system’s interactions
with external entities. In the cooking companion the CFD would include:
Processes:
o User Module: Search recipes and view recipes by ingrendients
o Admin Module: Manage Users, manage website and database like
example(CRUD)
Data Flows:
o User to System: Search recipes by ingrendients
o System to User: Search and view recipes
o User to System: add recipes view recipes add profiles
o System to user: Display the recipes by ingrendients
o Admin to System: admin can add, delete, view, update recipes
12
Level 0 DFD:
Level 1 DFD:
13
Level 2 DFD: (Admin)
14
Database Design (or Data Structure)
a. Introduction
Purpose
The purpose of the database design is to create a robust and scalable data
structure that supports the Recipe System's functionality. It aims to:
Organize Data: Efficiently store and manage information about users,admin, recipes,
categories, and comments.
Ensure Integrity: Maintain data accuracy and consistency across the system.
Support Operations: Facilitate quick and reliable data retrieval for system operations
and reporting.
Scope
c. Table Definition
15
d. ER Diagram
Entities:
o Users: Represents system users with attributes such as user ID, password, and
sign in account.
o Ingredients: Represents user has ingredients with attributes like ingredient
ID, ingredient name, and ingredient type.
o Recipes: Represents recipes available for search with attributes such as recipe
ID, recipe name, ingredient id, description, recipe type.
o Categories: Represents categories with attributes including recipe ID, is veg,
non-veg and regional.
Relationships:
o Users to Search: One-to-Many (One user can search multiple recipes).
o Recipes to Ingredients: One-to-Many (One recipe can have multiple
ingredients).
o User to Ingredients: One-to-Many (One user can enter multiple ingredients).
o Category to Recipes: One-to-Many (One category can have multiple recipes).
16
17
DETAILED DESIGN (LOGIC AND MOULES)
a. Introduction
Detailed design involves creating a comprehensive plan for how each module of
the system will be implemented. This phase translates high-level system
requirements into detailed logic, specifying how each component will function,
interact, and interface with other parts of the system. For the Recipe System,
detailed design ensures that each module operates correctly and integrates
seamlessly with others, providing a cohesive and functional application.
The structure chart provides a hierarchical view of the software components and
their relationships. It illustrates how various modules interact and the flow of
control between them. For the Recipe System, the structure chart might include:
Admin Module
o User Management
o Recipe Management
o System Settings
User Module
o Recipe Search and Browse
o Add recipe and delete their own recipe
o Profile Management
1. Inputs:
o User registration data (username, password, email, etc.)
o Login credentials (username and password)
o User profile updates (address, phone number, etc.)
2. Procedural Details:
o Registration Process: Validate user input, create a new user record in the
database, and send a confirmation email.
o Login Process: Verify login credentials, generate a session token, and redirect
to the user dashboard.
o Profile Management: Allow users to update their profile information and
save changes to the database.
3. File I/O Interfaces:
o Database Interaction: Read and write user data to/from the users table in
the database.
18
o Email Service: Interface with an email service for sending confirmation and
notification emails.
4. Outputs:
o Registration Confirmation: Display a message or redirect the user after
successful registration.
o Login Confirmation: Redirect users to their dashboard upon successful login.
o Profile Update Confirmation: Display a message indicating that profile
changes have been saved.
5. Implementation Aspects (if any):
o Security Measures: Implement encryption for passwords and secure
authentication mechanisms.
o Error Handling: Provide appropriate error messages for failed registrations,
incorrect login attempts, and profile update issues.
Admin Module Overview: The admin modules are critical for managing the
content and users of the Cooking Companion website. They allow the admin to
input and manage recipes, user accounts, and overall site content.
1. Recipe Management:
o Add New Recipes:
Admins can input new recipes by filling out a form that includes fields
for recipe title, description, ingredients, instructions, cooking time, and
category.
o Edit Recipes:
Admins can modify existing recipes by updating the content within the
form fields.
o Delete Recipes:
Admins can permanently remove a recipe from the database.
2. User Management:
o View Users:
Admins can view a list of registered users, including their usernames,
email addresses, and registration dates.
o Manage User Accounts:
Admins can deactivate or delete user accounts if necessary.
o User Permissions:
Admins can assign different roles to users, such as regular user,
contributor, or moderator.
3. Content Management:
o Homepage Content:
Admins can update featured recipes, banners, and promotional content
on the homepage.
o Static Pages:
Admins can edit content on static pages like About Us, Privacy Policy,
and Terms of Service.
Procedural Details:
19
Access Control:
o Admins must log in with a username and password to access the admin panel.
The system verifies credentials using PHP and MySQL.
Form Handling:
o Forms for adding, editing, and deleting content are processed through PHP
scripts, which interact with the MySQL database to store or update
information.
Validation:
o Input validation is performed on both client-side (using JavaScript) and server-
side (using PHP) to ensure that data entered by the admin is correct and safe.
2. Procedural Details
1. Form Display:
o When the admin selects the option to add a new recipe, a form is displayed
with fields for all necessary recipe details.
2. Input Validation:
o As the admin fills out the form, client-side validation checks for required
fields, proper formatting, and other constraints.
3. Form Submission:
o Upon submission, the data is sent to a PHP script that further validates and
sanitizes the inputs to prevent SQL injection and other security issues.
4. Database Insertion:
o The validated data is then inserted into the appropriate tables in the MySQL
database.
File Uploads:
File Handling:
20
Upload Directory:
o A designated directory on the server is used to store uploaded images. The
directory is structured to organize files based on categories or upload dates.
File Validation:
o Uploaded files are checked for type, size, and extension to ensure they meet
the site’s requirements (e.g., only .jpg, .png formats allowed).
Database Backups:
o Regular backups of the MySQL database are performed, ensuring data can be
restored in case of failure.
File System Backup:
o The uploaded files directory is periodically backed up to prevent data loss.
4. Outputs
Admin Dashboard:
Visual Output:
o The admin dashboard displays visual data, such as charts or tables,
representing the number of users, recipes, and site activity over time.
Textual Reports:
o Admins can generate reports on user activity, popular recipes, and site
performance. These reports can be exported as CSV or PDF files.
Testing
1. Testing Strategies
Purpose:
Approach:
21
o Test cases are written to cover various scenarios, such as valid and invalid
input data, edge cases, and expected outputs.
JavaScript Unit Testing:
o If JavaScript is used for client-side logic, testing frameworks like Jasmine or
Mocha are used to test individual functions and event handlers.
o Tests ensure that form validations, dynamic content updates, and other
interactive features behave as expected.
Recipe Submission:
o Test if the recipe submission form correctly processes valid data and rejects
invalid input.
o Ensure that the form submission triggers the correct database insertions.
User Login:
o Test if the login process correctly handles valid credentials, rejects invalid
credentials, and manages session creation.
Purpose:
Integration testing ensures that different modules of the application work together as
expected. This includes testing the interaction between the frontend and backend, as
well as the integration of various components like the database, file uploads, and user
sessions.
Approach:
Frontend-Backend Integration:
o Test the flow of data between the frontend forms and the backend PHP scripts.
For example, submitting a recipe and checking if it correctly appears in the
user’s profile and public listings.
Database Integration:
o Test the interaction between the application and the MySQL database,
ensuring that CRUD (Create, Read, Update, Delete) operations are performed
correctly.
File I/O Integration:
o Test the process of uploading images for recipes, ensuring that files are
correctly stored on the server, paths are accurately saved in the database, and
images are displayed on the frontend.
Recipe Display:
o Submit a recipe and verify that it appears in the public listing, with the correct
image, ingredients, and instructions.
Profile Updates:
o Update user profile information and check if changes are reflected in the
database and displayed on the user’s profile page.
22
1.3 User Acceptance Testing (UAT)
Purpose:
UAT involves real users testing the website to ensure it meets their needs and
expectations. This type of testing validates the overall user experience and confirms
that the site functions correctly in real-world scenarios.
Approach:
Test Scenarios:
o Create test scenarios based on typical user interactions, such as searching for a
recipe, submitting a new recipe, or managing a user profile.
Feedback Collection:
o After testing, users provide feedback on usability, functionality, and any issues
they encountered. This feedback is used to make improvements before the
final deployment.
Search Functionality:
o Users perform searches using various keywords and filters, checking if the
results are relevant and accurately displayed.
Recipe Submission:
o Users go through the process of submitting a recipe, editing it, and viewing it
in their profile, providing feedback on the ease of use and any potential issues.
Purpose:
Security testing identifies vulnerabilities in the application, ensuring that user data is
protected and the site is secure from attacks.
Approach:
23
o Test the file upload process to ensure that only allowed file types are accepted
and that files are properly sanitized before being stored on the server.
Purpose:
Performance testing assesses the website's responsiveness, load times, and ability to
handle a large number of users or high traffic.
Approach:
Load Testing:
o Simulate multiple users accessing the site simultaneously to test how the website
performs under heavy traffic.
Stress Testing:
o Push the website beyond its normal operational capacity to identify potential
breaking points and areas that need optimization.
Page Load Time Testing:
o Measure the time it takes for different pages to load, especially those with heavy
content like images or database queries.
Tools Used:
24
o Use tools like JIRA, Trello, or GitHub Issues to track bugs, assign them to
developers, and monitor the progress of bug fixes.
Version Control Integration:
o Integrate bug tracking with version control (e.g., Git) to manage code changes
related to bug fixes and ensure proper documentation of issues.
1. Bug Identification:
o During testing, any discovered bugs are logged in the issue tracking system
with detailed descriptions and steps to reproduce.
2. Prioritization:
o Bugs are prioritized based on their severity and impact on the user experience,
with critical issues being addressed first.
3. Assignment:
o Bugs are assigned to developers for resolution. The issue tracking system
helps coordinate these tasks.
4. Fixing and Testing:
o Developers fix the bugs and update the relevant code. The fixes are then tested
to ensure the issue is resolved.
5. Verification:
o After the fix is confirmed, the bug is marked as resolved in the tracking
system, and the code is merged into the main codebase.
6. Regression Testing:
o After bug fixes, regression testing is performed to ensure that the fixes did not
introduce new issues elsewhere in the application.
Pre-Launch Testing:
Before the final launch, a comprehensive round of testing is conducted, including all
the above types, to ensure the application is stable, secure, and ready for production.
User Sign-Off:
Users (especially those involved in UAT) provide final approval after testing,
confirming that the application meets their requirements and expectations.
Deployment Testing:
25
After deploying the site to a live server, final checks are performed to ensure that all
functionalities are working as expected in the production environment.
4. IMPLEMENTATION :
Index.html :
<div class="col-md-6">
<?php
$limit=8;
if(!isset($_GET['page']) || $_GET['page']==1){
$start=0;
}else{
$start=($_GET['page']*$limit)-$limit;
$recipe=get_all_recipe_front($start,$limit);
if($recipe['bool']==true){
26
foreach($recipe['allData'] as $recipe){
?>
<div class="panel-body">
<div class="row">
<div class="col-md-4">
</a>
</div>
<div class="col-md-8">
<p class="margin-top5">
</p>
</div>
</div>
</div>
<div class="panel-footer">
27
<div class="row">
</div>
</div>
</div>
</div>
<?php
?>
<div class="pagination-container">
<ul class="pagination">
<?php
$totalRecipes=count_recipe();
$totalRecipes=$totalRecipes['total'];
$links=ceil($totalRecipes/$limit);
$class='active';
}else{
if($i==1){
28
$class='active';
}else{
$class='';
$class='';
?>
<?php
?>
</ul>
</div>
</div>
2.Login/Register html:
29
<?php require('../common/functions.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Admin Login</title>
<link rel="stylesheet" type="text/css" href="<?php echo $path['siteUrl'];
?>/fonts/font-awesome-4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $path['siteUrl'];
?>/lib/bootstrap-3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $path['siteUrl'];
?>/css/style.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<h3 class="page-header"><a href="index.php" class="logo"><i
class="fa fa-spoon fa-2x"></i> Steel Spoon</a></h3>
<div class="panel panel-primary">
<div class="panel-heading">Admin Login</div>
<div class="panel-body">
<form action="" method="post">
<?php
if(isset($_POST['submit'])){
$data=array();
$data['username']=$_POST['_user'];
$data['password']=$_POST['_pass'];
$res=admin_login($data);
if($res['bool']==false){
echo _error('Invalid Username/Password');
}else{
$_SESSION['admin']=true;
header("location:index.php");
}
}
?>
<table class="table table-bordered">
<tr>
<td>Username</td>
<td><input type="text" name="_user" class="form-
control" /></td>
</tr>
<tr>
<td>Password</td>
30
<td><input type="password" name="_pass" class="form-
control" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit"
value="Login" class="btn btn-danger btn-block" /></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
3.Logout.php:
<?php
session_start();
if(isset($_SESSION['admin'])){
unset($_SESSION['admin']);
header("location:login.php");
}
?>
Admin Panel:
Index.php:
<!--Simranjeet Singh : Instagram - @ItsExceptional-->
<?php include('common/header.php');?>
<!-- Right Content Start -->
<div class="col-md-9">
<div class="panel panel-default">
<?php
$totalRecipe=count_recipe();
?>
<div class="panel-heading">All Recipes <span class="badge"><?php
echo $totalRecipe['total']; ?></span> <span class="pull-right"><a href="add-
recipe.php">Add Recipe <i class="fa
fa-long-arrow-right"></i></a></span></div>
<div class="panel-body">
<?php
if(isset($_SESSION['msg'])){
echo $_SESSION['msg'];
31
unset($_SESSION['msg']);
}
?>
<table class="table table-bordered">
<thead>
<tr>
<th>Category</th>
<th>Title</th>
<th>Description</th>
<th>Image</th>
<th>Video Url</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$recipe=get_all_recipe();
if($recipe['bool']==true){
foreach($recipe['allData'] as $recipe){
$categoryDetail=get_category_by_id($recipe['category_id']);
// _t($categoryDetail);
?>
<tr>
<td><?php echo $categoryDetail['allData']['title'];
?></td>
<td><?php echo $recipe['title']; ?></td>
<td><?php echo $recipe['small_desc']; ?></td>
<td><img src="<?php echo
$path['siteUrl'].'/admin/upload/'.$recipe['img']; ?>" width="100" /></td>
<td><?php echo $recipe['video_url']; ?></td>
<td>
<a href="edit-recipe.php?recid=<?php echo
$recipe['recipe_id']; ?>" title="Edit" class="text-blue"><i class="fa fa-
pencil"></i></a>
<a onclick="return confirm('Are you sure to delete
this?')" href="delete-recipe.php?recid=<?php echo $recipe['recipe_id']; ?>"
title="Delete" class="text-red"><i class="fa fa-times"></i></a>
</td>
</tr>
<?php
}
}else{
?>
<tr>
32
<td colspan="4"><p class="alert alert-warning">No Data
Found</p></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th>Category</th>
<th>Title</th>
<th>Description</th>
<th>Image</th>
<th>Video Url</th>
<th>Action</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- Right Content End -->
<?php include('common/footer.php'); ?>
33
Layouts:
Admin Dashboard:
34
Login(Admin):
Categories:
35
Recipes:
CONCLUSION
Conclusion:
36
Cooking Companion, a robust recipe finder application, has the potential to
revolutionize the culinary experience for users of all levels. By offering a
comprehensive database of recipes, intuitive search functionalities, personalized
recommendations, and integration with other culinary tools, the application
effectively addresses the needs of modern-day cooks.
The development of Cooking Companion not only provides a convenient
platform for discovering new recipes but also fosters a deeper engagement with
food and cooking. As technology continues to advance, there is an opportunity
to further enhance the application with features such as augmented reality
cooking assistance, nutritional analysis, and social sharing.
By focusing on user experience, data-driven recommendations, and continuous
improvement, Cooking Companion can establish itself as an indispensable tool
in every kitchen.
Future Scope
The potential for expansion and improvement of Cooking Companion is
significant.Key areas for future development include:
Enhanced personalization: Leveraging AI and machine learning to provide even
more tailored recipe suggestions based on individual preferences, dietary restrictions,
and cooking skills.
37
Interactive cooking experience: Incorporating augmented reality features to guide
users through recipes step-by-step, offering visual demonstrations and real-time
assistance.
Nutrition and health focus: Providing detailed nutritional information for recipes,
allowing users to track their dietary intake and make informed food choices.
Social integration: Creating a platform for users to share recipes, photos, and
cooking experiences, fostering a sense of community.
Offline functionality: Enabling users to access recipes and plan meals even without
an internet connection.
Integration with smart kitchen devices: Connecting with smart appliances to
automate cooking processes and control kitchen equipment.
REFERENCES
Bibliography:
GIT HUB
Chat gpt
Gemini
YouTube
38