An open API service indexing awesome lists of open source software.

https://github.com/franklinmoy3/whats-good-here

Python Flask web app that allows users to rate dishes served at restaurants.
https://github.com/franklinmoy3/whats-good-here

Last synced: 4 months ago
JSON representation

Python Flask web app that allows users to rate dishes served at restaurants.

Awesome Lists containing this project

README

        

# What's Good Here
This is a web app that shows different restaurants and their dishes. Authorized users are allowed to rate these dishes and contribute to the database.

## UML Diagram
![UML Diagram](media/UML_Diagram.png)

## Requirements
```
python >= 3.5
```

## Running this Project Locally
```bash
git clone https://github.com/franklinmoy3/whats-good-here.git whatsgoodhere
cd whatsgoodhere
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export FLASK_APP=app
# uncomment the below line to have Flask automatically refresh after modifying a Python file
# export FLASK_DEBUG=1
flask run
```

## GCP Deployment
Create a `app.yaml` file in the root folder with the following contents:
```yaml
runtime: python38 # or another supported version

instance_class: F1

env_variables:
MYSQL_USER: # username on the GCP MySQL instance
MYSQL_PASSWORD: # password for the above GCP MySQL instance user
MYSQL_DB: # name of database on GCP MySQL instance
MYSQL_HOST: # public IP of the GCP MySQL instance
INSTANCE_CONNECTION_NAME: # the instance's connection name

handlers:
# Matches requests to /images/... to files in static/images/...
- url: /img
static_dir: static/img

- url: /script
static_dir: static/script

- url: /styles
static_dir: static/styles
```

Setting up the deployment
```bash
curl https://sdk.cloud.google.com | bash
gcloud components install app-engine-python
gcloud config set project [PROJECT_ID]
gcloud auth login
gcloud app deploy
```