SugarFree

Date: May 2023

View on GitHub

The "SugarFree" project is a web-based platform centered around sharing sugar-free, gluten-free, dairy-free, and other specialized recipes. It provides users with the ability to browse recipes, submit their own, and allows admin users to manage recipe submissions.

 

SugarFree
HTML CSS (Bootstrap) JavaScript PHP MySQL

How It Works

The project is built using PHP for server-side logic, along with a MySQL database for storing users, recipes, and submissions. The front-end is enhanced with Bootstrap for responsiveness and styling.


Main Features:

Recipe Browsing: Users can browse recipes sorted into different categories such as sugar-free, gluten-free, or dairy-free. The recipes.php file displays all recipes based on the category selected by the user. The images of the dishes and recipe details like ingredients and instructions are fetched dynamically from the database.

User Authentication: The platform supports user authentication, allowing users to log in, submit their own recipes, and view other users' submissions. User roles are implemented, with admins able to accept or reject recipe submissions via an admin panel (admin_submissions.php).

Recipe Submission: Registered users can submit their own recipes through a form (submissions.php), where they provide a title, description, ingredients, instructions, and an image. The submission is then reviewed by an admin before being displayed.

Homepage when an admin is logged in

Homepage when an admin is logged in

The page listing all recipes

The page listing all recipes


Database Structure:

MySQL connection handling recipes, users, and submissions. SQL queries are used to display recipes dynamically, and submissions are stored and accessed for both user and admin functionalities.

The dropdown when "see recipe" is clicked

The dropdown when "see recipe" is clicked

The accept/decline recipe form for admins

The accept/decline recipe form for admins

Some code snippets:

Homepage section including image and recipe details

Homepage section including image and recipe details

Displaying recipes by fetching data from the database

Displaying recipes by fetching data from the database