Our project aims to tackle one of the world's greatest mysteries. What's for dinner tonight? A question that has stumped us all at one point or another. However, with the use of Artificial Intelligence and the abundance of recipes online, we have an idea for a solution, MealMatch. A mobile web-app which allows you to input the ingredients you have in your pantry, receiving back a detailed recipe outlining a meal best suited to you and your kitchen. With the ability to save recipes, you’ll be able to hold on to your favourite recipes and even plan out your recipes and groceries for the whole week. Print out a shopping list, share your favourite recipes, search for a related recipe, MealMatch will cover all your culinary needs in one space.
To correctly set up the application for viewing/contributions, follow the steps below.
- Make a fork of the repository.
- Clone the repository into your local machine.
- Optionally, run the command
git remote add upstream https://github.com/SOFTENG-310-Group-7/Recipe-App/
to push and pull changes to/from the main repository. Keep in mind that all changes must be approved via a code review and pull request, as seen in CONTRIBUTING.md - 'How to Submit a Pull Request'.
From here, the easiest way to deploy the app is to use the Vercel Platform from the creators of Next.js.
Please refer to /frontend/README.md for further details on deploying the app.
Frontend - The front end was developed using a React and Next.js framework for the user interface.
Backend - Node.js with Express is used for backend logic such as authentication, storing user data, and integrating with external APIs.
Database - MongoDB is used to store user and recipe data.
Auth - Auth0 is used for creating accounts.
APIs - Gemini API is used for retrieving AI generated recipes and Pexels API is used for generating images.
Before using our application, make sure to follow the setup instructions below:
The following field will need to be replaced by the applications database secret:mongodb+srv://softeng310Admin:codeWarriors@recipe-app.ks9m0.mongodb.net/?retryWrites=true&w=majority&appName=Recipe-App
under server/config.env
:
MONGO_URI=<mongoDB-uri>
As explained, this application uses Gemini and Pexels to generate recipes and images. Below is an explanation if the setup needed to use these endpoints.
First you will need to setup an account with Google Gemini - you can do so here
-
Generate an API key for Google Gemini
-
Under
server/config.env
replace the following field with your newly generated API key:
GEMINI_API_KEY=<your-api-key>
- Save your changes and you're good to go!
First, you will need to set up an account with Pexels, you can do so here
-
Generate an API Key for Pexels
-
Under
server/config.env
replace the following field with your newly generated API key:
PEXELS_API_KEY=<your-api-key>
- Save your changes and you're good to go!
Follow the instructions here
- Under
frontend/env.local
replace the following field with your newly generated API key:
JWT_SECRET=<your-api-key>
- Save your changes and you're good to go!
To run the project, follow these steps:
- Install dependencies in the root folder:
npm install
- Install dependencies in the server folder:
Run in root folder.
cd server
npm install
- Install dependencies in the frontend folder:
Run in root folder.
cd frontend
npm install
After install all dependencies, you need to run the backend server:
- Go to the server folder (run in root folder):
cd server
- Start the server:
npm run dev
In another terminal window (or the equivalent on your system), you need to run the frontend:
- Go to the frontend folder (run in root folder):
cd frontend
- Start the frontend:
npm run dev
To run tests To run the tests first install new dependencies and then run 'npm test' in the command line at the root of the project. You should see 18 tests passed, as in the image below.
If you get timeouts on the test, you can increase the specific timeout threshold in the outermost (project root) package.json (30000 ms currently).
You are free to:
- Use the software for any purpose, whether personal, academic, or commercial.
- Modify the software to fit your needs or improve its functionality.
- Distribute copies of the software to others.
- Incorporate this software into your own projects, either in original or modified form.
This project is licensed under the MIT License. For more details, please refer to the LICENSE file in the root directory of this repository.
For project-specific help, please email us at softeng310group7@gmail.com. For git related help, please refer to the github support page. For help with other frameworks, please visit the relevant website linked in Acknowledgments.
We would like to acknowledge the resources we utilised for this project: