Discover the ultimate solution for your culinary adventures! Our application empowers you to create, store, and explore a world of recipes, all in one place. Whether you're a seasoned chef or a home cook, our platform is designed to enhance your cooking experience. Join our thriving culinary community today and elevate your cooking journey with our feature-rich, user-friendly application. It's not just a recipe app; it's your culinary companion. Start creating, exploring, and savouring the joy of cooking!
Chef's Helper live website here
Dive into an immersive culinary journey with Chef's Helper's Recipe Management feature. Our platform offers a seamless and engaging user experience, ensuring effortless organization and exploration of your favourite recipes. Experience the convenience of storing, viewing, and managing your own culinary creations, alongside the ability to discover, review, rate, and like recipes contributed by fellow users.
The Recipe Management system is designed with user-friendly navigation, providing a visually stunning interface for an enjoyable and hassle-free experience. Whether you're a seasoned chef or a home cook, our personalized recommendations and comprehensive information cater to your unique preferences, making each step of your culinary adventure delightful.
Create a personalized collection of recipes, easily accessible from any device with our mobile-friendly design. Edit your recipes with ease, add new ingredients, and share your culinary masterpieces with the Chef's Helper community. Explore a treasure trove of diverse recipes contributed by others, offering inspiration for your next kitchen endeavour.
Feel the satisfaction of not only managing your culinary creations but also engaging with a community passionate about food. Leave reviews, rate recipes, and show appreciation by liking outstanding dishes. For those cherished favourites, the option to print your recipes ensures they are always at your fingertips, ready to impress friends and family.
Chef's Helper's Recipe Management is more than just a tool; it's a culinary haven where your cooking journey transforms into a delightful and enriching experience. Join us in celebrating the art of cooking, sharing, and savouring the flavour of a vibrant and thriving culinary community.
Chef's Helper aims to create a user-friendly online platform for culinary enthusiasts. The project focuses on:
Seamless Experience: Provide an intuitive interface for effortless recipe storage, management, and exploration.
Community Engagement: Foster a vibrant community where users can view, review, rate, and like recipes shared by fellow enthusiasts.
Effortless Management: Simplify the process of editing recipes, adding ingredients, and navigating through collections.
Print and Share: Enhance the joy of sharing culinary creations by allowing users to print their favourite recipes.
Mobile Accessibility: Prioritize accessibility with a mobile-friendly design for planning and managing recipes on any device.
Agile Methodology served as the guiding framework for prioritizing and organizing tasks in the Chef's Helper app development process. The workflow included:
In essence, the Agile Methodology, coupled with Github's Project Boards and a structured template for user stories and epics, ensured an efficient and collaborative approach to Chef's Helper app development. This methodology allowed for flexibility, adaptability, and continuous improvement throughout the project lifecycle.
Project set up
Site Navigation
Social network bar
User Registration
Manage recipes
Create drafts
Approve reviews
Review a recipe
Like a recipe
View reviews
Add a recipe
Open a recipe
Add an ingredient to the recipe
View likes
Online recipe book
Enhance Frontend Styling and Responsiveness
Readme file
Detailed look can be found on the project board
The design of Chef's Helper platform is carefully crafted to provide a visually appealing and user-friendly experience. The design strikes a balance between simplicity and sophistication, ensuring a clean and modern appearance. The light blue background creates a harmonious backdrop for the culinary-focused content. The design emphasizes user interaction, with hover styles applied to key elements such as navigation, social links, and recipe cards. This provides users with a responsive and dynamic experience as they navigate through the platform. The consistent use of the color scheme, fonts, and styling elements across the platform creates a cohesive and unified visual identity. The design of Chef's Helper is tailored to appeal to users seeking a seamless and visually delightful experience while exploring and managing their recipes.
The predominant color is a soothing light blue background #cff4fc
, creating a calm and inviting atmosphere for users.
The CH logo is elegantly presented in gold letters #dfb705
, adding a touch of sophistication to the overall design.
The font choice is a classic black #000
, ensuring readability and a timeless aesthetic.
Navigation elements, including the nav bar and social links, are designed to respond dynamically to user interaction. On hover, the color transitions to a rich burgundy #630a0a
, providing visual feedback.
Recipe Cards:
Recipe cards are styled with a hover effect to enhance the user's interaction. On hover, the card scales slightly increasing the size for a subtle animation. Additionally, a drop shadow is applied #2759fc
to create depth and highlight the selected card.
Lato is a modern and versatile sans-serif font. With a clean and friendly appearance, it ensures readability across various platforms. Ideal for paragraphs and body text, Lato provides a contemporary and professional look.
Roboto Slab is a serif font with a stylish and sophisticated feel. It adds a touch of elegance to headings and subheadings, making it suitable for conveying a sense of formality and structure in your design.
Pacifico is a lively and casual cursive font that brings a playful and handwritten charm to your special text. Perfect for creating a personalized and whimsical touch, Pacifico adds character and warmth to headings or elements you want to highlight.
Entity Relationship Diagram (ERD)
The current data scheme comprises models essential for the Minimum Viable Product (MVP) of the recipe management system. However, future updates are planned to enhance the application's functionality. The upcoming features include the addition of Categories to recipes, enabling users to better organize and filter recipes by category and allergens. This enhancement ensures that the system accommodates dietary needs and provides nutritional information for each ingredient and meal created using the recipes.
In subsequent phases, the system will introduce a Supplier model to transform the application into a comprehensive tool for the hospitality sector. This addition will facilitate inventory management, catering to the specific needs of commercial users. The planned updates align with a strategic roadmap, progressively expanding the capabilities of the recipe management system to meet evolving user requirements and industry demands.
Allauth User Model
Recipe Model
The Recipe model in the system represents a culinary recipe and encapsulates various attributes, including the recipe's title, author, creation/update timestamps, instructions, ingredients, featured image, and additional details related to preparation and user interactions.
Fields:
title: CharField for the title of the recipe, ensuring uniqueness.
slug: SlugField for a URL-friendly version of the title.
author: ForeignKey to the User model, establishing a many-to-one relationship.
created_on: DateTimeField for the creation timestamp.
updated_on: DateTimeField for the last update timestamp.
instructions: TextField for the detailed recipe instructions.
ingredients: ManyToManyField to the RecipeIngredient model, forming a many-to-many relationship.
featured_image: CloudinaryField for storing images, with a default placeholder image.
excerpt: TextField for a brief description or summary (optional).
likes: ManyToManyField to the User model, allowing users to express their liking for a recipe.
prep_time: IntegerField for the preparation time in minutes (optional).
cook_time: IntegerField for the cooking time in minutes (optional).
servings: IntegerField for the default number of servings.
rating: FloatField for the overall rating, constrained between 1 and 5.
total_ratings: IntegerField for the total number of ratings.
status: IntegerField with choices representing the status of the recipe (Draft or Published).
rated_users: ManyToManyField to the User model, tracking users who have rated the recipe.
sum_of_rating: FloatField for the cumulative sum of all ratings.
Meta specifies the default ordering based on the recipe title in descending order.
Methods:
__str__(self):
Returns the title of the recipe when converted to a string.
number_of_likes(self):
Returns the count of likes for the recipe.
number_of_reviews(self):
Returns the count of reviews for the recipe.
rate_recipe(self, user, user_rating):
Records a user's rating for the recipe, updating the total rating and user rating history.
calculate_average_rating(self):
Calculates and returns the average rating for the recipe.
has_unapproved_reviews(self):
Checks if there are unapproved reviews for the recipe.
Custom save method to create a unique slug for each recipe, ensuring a URL-friendly representation.
This model empowers the system to manage and present a diverse array of recipes, supporting interactions such as liking, rating, and reviewing. The inclusion of features like unique slugs and status tracking enhances the robustness of the recipe management system.
RecipeIngredient Model
The RecipeIngredient model represents an individual ingredient used in a recipe. It encapsulates information such as the ingredient's name, quantity, unit of measurement, and the recipe to which it belongs.
Fields:
name: CharField for the name of the ingredient.
quantity: DecimalField for the quantity of the ingredient.
unit: CharField for the unit of measurement.
recipe: ForeignKey to the Recipe model, establishing a many-to-one relationship.
This model serves as a crucial component in the recipe system, allowing for the detailed specification of each ingredient within a recipe. The ForeignKey establishes a link to the associated recipe, facilitating the organization and retrieval of ingredient information when needed. The __str__
method provides a readable string representation for ease of use and display.
Review Model
The Review model represents user reviews for a specific recipe within the recipe management system. It includes essential details such as the reviewer's name, email, the content of the review, creation timestamp, and approval status.
Fields:
recipe: ForeignKey to the Recipe model, establishing a many-to-one relationship.
name: CharField for the name of the reviewer.
email: EmailField for the email of the reviewer.
body: TextField for the content of the review.
created_on: DateTimeField for the creation timestamp.
approved: BooleanField indicating whether the review has been approved (default is False).
Meta specifies the default ordering based on the creation timestamp in ascending order.
This model plays a crucial role in collecting and managing user feedback for recipes. The ForeignKey establishes a link to the associated recipe, allowing for easy retrieval and organization of reviews. The approval status (approved) provides a mechanism to control the visibility of reviews, with the default set to False. The __str__
method ensures a meaningful and readable representation of reviews when converted to a string. The ordering meta attribute ensures that reviews are sorted based on their creation timestamp.
In Django, LoginRequiredMixin is a mixin class provided by the django.contrib.auth.mixins module. It is used in class-based views to require that the user making the request must be authenticated. If the user is not authenticated, the mixin will automatically redirect the user to the login page.
You can use LoginRequiredMixin by inheriting it in your class-based views. Typically, it's used as the leftmost mixin in the inheritance chain to ensure that authentication checks are performed before any other mixins. If the user is authenticated, the view proceeds as normal. If the user is not authenticated, the LoginRequiredMixin automatically redirects them to the login page.
Using LoginRequiredMixin helps in enforcing authentication requirements for views where you want to ensure that only authenticated users have access. It simplifies the process of handling authentication checks and redirects in class-based views.
In Django, CSRF (Cross-Site Request Forgery) protection is implemented using a CSRF token. The CSRF token is a unique value associated with a user's session, and it is used to verify the legitimacy of a form submission. When a user logs in or visits a page with a form, Django generates a unique CSRF token for that user's session. Django provides built-in middleware (django.middleware.csrf.CsrfViewMiddleware) that automatically checks and enforces CSRF protection for all incoming POST requests. The middleware ensures that each form submission includes a valid CSRF token. By incorporating these CSRF protection mechanisms, Django helps prevent attackers from executing malicious actions on behalf of authenticated users. The use of unique tokens tied to user sessions adds an additional layer of security, ensuring that form submissions are authorized and originate from legitimate sources.
When rendering an HTML form, Django includes the CSRF token as a hidden input field within the form. The {% csrf_token %} template tag is used to include the CSRF token in the form. See example below:
<form method="post" action="{% url 'custom_view' %}">
{% csrf_token %}
{% form.as_p %}
<button type="submit">Submit</button>
</form>
Overall, views incorporate authentication checks, form validation, and ownership verification to secure various operations. It's important to note that Django's built-in features, such as the authentication system, contribute to the overall security of the application. RecipeList:
ReviewForm and RecipeForm is a basic form, and validation is handled by the default behavior of Django's ModelForm.
AddIngredientForm uses Django form field types to ensure correct data types for name, quantity, and unit. Also, it specifies the available choices for the unit field and u tilizes attributes to control the appearance of form fields. Moreover, it sets specific constraints on the quantity field, limiting it to positive numbers and defining the maximum and minimum values. Uses the max_digits and decimal_places attributes for the quantity field to handle decimal precision. AddRecipeForm and UpdateRecipeForm ensure that the title is unique using a custom clean_title method. Also, they set specific constraints on the prep_time, cook_time, and servings fields, limiting them to positive numbers and defining maximum and minimum values. Furthermore, validate the size of the featured_image to ensure it is no larger than 5 MB. Next, customizes the appearance and behavior of form fields using widget attributes. Finally, the form methods checks for the uniqueness of the recipe title to prevent duplicate entries.
Logo
Navigation Bar differs for visitors, and logged in users.
About Section
Footer
Sign up Page
Login Page
Browse Available Recipes
Visitors, as well as logged-in users, have the ability to browse through our extensive collection of available recipes. The search functionality allows users to find specific recipes by providing either the complete name or a partial name. Each recipe is accompanied by essential information displayed under the recipe image or image placeholder. This information includes the recipe name, the author, the date when the recipe was added or last updated, the number of likes, and the average rating.
Additionally, when hovering over a recipe, users can access a short description (if provided), offering a glimpse into what makes each recipe special.
Recipe pagination
Logged in User's taskbar
Logout
Add a recipe
Edit the recipe
Rate and review recipe
Like the recipe and average rating.
Print Recipe
Delete Recipe
Admin Features
I. Feature Left to Implement with the next update:
II. Transformation into Inventory Application:
Supplier Management - Enable users to add and manage suppliers for ingredients.
Ordering System - Implement a system for creating and managing ingredient orders.
Order Tracking - Allow users to send and receive orders, with tracking capabilities.
Stock Management - Provide tools to update and monitor current stock levels.
Data Analytics - Offer data analytics features to highlight stock numbers, usage patterns, and order trends.
Compatibility with POS Applications - Ensure compatibility with popular Point of Sale (POS) applications used by restaurants and takeaways.
By incorporating these features, Chef's Helper will not only enhance the user experience but also position itself as a versatile tool catering to both home cooks and the hospitality sector. The inclusion of advanced inventory management features and compatibility with POS systems will make it a comprehensive solution for the culinary industry.
To fork the repository, follow the steps below:
Remember that if you forked the repository, none of the updates made to the source repo would be reflected in your forked repo.
To bring down project for local development, it is possible to clone a repository by following steps below:
git clone
and then paste the URL you copied from GitHub in step 5.pip3 install -r requirements.txt
CLOUDINARY_URL
to env.py and Heroku app variables. Make sure that env.py is added to .gitignore to not share you security key.In your workspace (GitPod) create an env.py file and add it to .gitignore
Add the DATABASE_URL value and your chosen SECRET_KEY value to the env.py file.
Update the settings.py file to import the env.py file and add the SECRET-KEY and DATABASE_URL file paths.
Comment out the original DATABASES variable and add the code below.
Don't forget to makemigrations and migrate to update your database.
Add the CLOUDINARY_URL to env.py
Add cloudinary to INSTALLED_APPS in settings.py.
Add cloudinary to the static files in settings.py
Link the file to the templates directory in Heroku.
Add TEMPLATES_DIR in settings.py
Change the templates directory to TEMPLATES_DIR
Add Heroku to the ALLOWED_HOSTS in settings.py
Add the following Config Vars in Heroku:
SECRET_KEY
(Any Django random secret key).CLOUDINARY_URL
(Insert your Cloudinary API key).PORT
= 8000.DISABLE_COLLECTSTATIC
= 1 (temporary and can be removed once static files are created).DATABASE_URL
(paste ElephantSQL database URL here).Heroku Additional Files:
Site is now live
You can visit the deployed application at Chef's Helper
Please see TESTING.md for all the detailed testing performed.