Mealize is a React and Flask app that aims to reduce food scarcity and waste by connecting businesses to nonprofits.
-
Clone this repository
git clone [email protected]:Luke-Yamasaki/Mealize.git
-
Install dependencies
pipenv install --dev -r dev-requirements.txt && pipenv install -r requirements.txt
-
Create a .env file based on the .env.example file with credentials of your choice. I recommend creating a UUID for secrets. If you do not know how to do so, here are the commands in JavaScript:
const crypto = require('crypto')
console.log(crypto.randomUUID({disableEntropyCache : true}));
The images you see in the homepage were seeded from my S3 bucket. However, you will need to create your own AWS account, create a bucket and acquire credentials if you want to allow users to upload local files. There is a storage limit that builds up fast, so please be careful of data usage.
If you are unfamiliar with AWS, here is an excellent walkthrough courtesy of James Robertson: AWS walkthrough.
-
Create a PostgreSQL user, password and database to match your chosen credentials in the .env file.
If you forgot commands, type 'psql' in your terminal to open up the PostgreSQL interface.
Next, enter CREATE USER (your chosen username) WITH PASSWORD 'your password.' CREATEDB login;
Then, type CREATE DATABASE (your chosen database name) WITH OWNER (the username from above);
-
Enter your shell environment, upgrade and seed your database, and run your flask app
pipenv shell
flask db upgrade
flask seed all
flask run
-
To run the React App, go inside the
react-app
directory,npm install
andnpm start
. This should open your browser automatically but if not, you may navigate tolocalhost:3000
to access the application.