Groggo, like many software engineers, needs coffee before performing tasks. Unfortunately, he's out of coffee at home and needs your help. This application provides an interface for you to create maps that include Groggo's home, the coffee shop, and any obstacles you'd like to place in between. When you click 'Find Path', the application will translate your unique map to a weighted graph with 2,000+ nodes and 15,000+ edges and use Dijkstra's algorithm to display Groggo's shortest path to coffee along with a heat map so you can visualize relative travel times to any part of your map.
- Python 3.10
- PostgreSQL 12s
-
Clone the project repository
https://github.com/CameronWhiteside/Groggo-Needs-Coffee.git
-
Install Python dependencies from the root directory
pipenv install --dev -r dev-requirements.txt && pipenv install -r requirements.txt
-
Install Node package dependencies from the react-app directory
npm install
-
Create a .env file base on the .env.example given in the root directory
FLASK_APP=app
FLASK_ENV=development
SECRET_KEY=<you strong secret key>
DATABASE_URL=postgresql://<username>:<password>@<server>/<database>
-
Setup your username and database based on what you setup in your .env
-
Migrate and seed the database by intiating the pipenv shell from the root directory.
pipenv shell
flask db upgrade
flask seed all
-
Start the server from the root directory.
flask run
-
Start the frontend from the react-app directory.
npm start