MealMate is a web application built with Django, designed to generate recipes suggestions using AI, based on food ingredients, calorie limit and cuisine.. This project aims to help those people who have some random ingredients at their home and want to utilize the ingredients to cook something at home. The application is scalable, modular, and follows best practices for Django development.
- User Authentication: Sign up and login.
- RESTful API: Built with Django REST Framework for easy integration.
- Previous History: Shows previous ingredients & generated recipes.
- Responsive Design: Optimized for desktop and mobile devices.
- Django: The main web framework for building the project.
- OpenAPI: For generating receipes.
- MySQL: Relational database for data storage.
- HTML/CSS/JavaScript: Frontend for user interface.
- Tailwind: Frontend framework for responsive design.
- Git/GitHub: Version control and collaboration.
Follow these steps to get your project up and running locally.
- Python 3.x
- pip (Python package installer)
- Virtual Environment (optional but recommended)
-
Open a terminal & Run the following command to create a new directory named
Test:mkdir Test
-
Move into the newly created
Testdirectory:cd Test -
Create a virtual environment called
venvusing Python:python3 -m venv venv
-
Activate the virtual environment to isolate your project dependencies:
source venv/bin/activate -
Clone the
mealMaterepository from GitHub:git clone https://github.com/Joe-26/mealMate.git
-
Change to the
mealMatedirectory:cd mealMate -
Install the required Python dependencies listed in
requirements.txt:pip install -r requirements.txt
-
Open the
.envfile to configure the environment settings:nano .env
-
In the
.envfile, add the following line to set your OpenAI API key (replace{Your API Key}with your actual API key):OPENAI_API_KEY="{Your API Key}" -
Save the changes and exit the editor by pressing
Ctrl+X, then confirming withYto save. -
Finally, run the development server to start the application:
python manage.py runserver
This will start the application on the default local server (localhost:8000), and you can access it in your browser.
