Skip to content

Student project for DHBW-Friedrichshafen to search for restaurant or recipe suggestions.

License

Notifications You must be signed in to change notification settings

DHBW-FN-TIT20/essensfindung

Repository files navigation

Essensfindung

Student project for DHBW-Friedrichshafen to search for restaurant or recipe suggestions.
Go to ReadTheDocs: https://dhbw-fn-tit20.github.io/essensfindung/

Docs

See GitHub-Pages

Usage

If you want to run it make sure you habe a GoogleAPI KEY
The Application use Geocoding, place-details and nearby-search
!!! The GoogleAPI Requests are not for free, so pay attention on the pricing !!!

Direct with Python

Requirements

To run the application install the requirements:

pip install requirements.txt

OR

poetry install --no-dev

Configuration

If you dont have a PostgreSQL Database use .env-example1 with only the GOOGLE_API. With this Configuration it will create a SQL-Lite DB in the app folder. Not Recommended for Production!

# Copy the Example
cp .env-example1 .env
# Edit the File
nano .env

If you have a PostgreSQL Database use .env-example2

# Copy the Example
cp .env-example2 .env
# Edit the File
nano .env

Impressum / Legal Notice

The legal.json file found at /static/text/legal.json should contain information about the hosting entity. Each property should contains the necessary information with the following format:

  • Full Name (or company name)
  • Address Line 1 (street and house number)
  • Address Line 2 (zip code and city)
  • Phone number (international format)
  • Email (of the contact person)

Docker

You also can build a docker container

git clone https://github.com/DHBW-FN-TIT20/essensfindung.git
cd essensfindung
docker build essensfindung .

If you dont have a PostgreSQL Database start the container:

docker run -p 8080:80 \
-v /essensfindung/app/data \
-e GOOGLE_API_KEY=KEY \
-e SECRET_KEY=KEY \
--name essensfindung \
essensfindung

If you have a PostgreSQL Database:

docker run -p 8080:80 \
-e GOOGLE_API_KEY=KEY \
-e SECRET_KEY=KEY \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=PASSWORD \
-e POSTGRES_SERVER=localhost \
-e POSTGRES_DATABASE=essensfindung \
-e POSTGRES_PORT=5432 \
--name essensfindung \
essensfindung

Docker-Compose

See the docker-compose.yml File

Developing

Python-Verison 3.9 or higher
You can use pyenv to manage you virtual envioremnts.

pyenv install 3.9.7
pyenv rehash
pyenv global 3.9.7

Please formatt your Code with black and validate it with flake8 and pylint.

Pre-Commit

If you use git on console the pre-commit will take affect automatically. This will format the code to reduce merge conflicts and ensure some type of standards.
To activate the automaticall validation type:

pre-commit install

If you want to manuall start the pre-commit check run:

pre-commit run

Dependencies

To develop on this project we recommend to use venv.
You can use some extra tools like:

  • pyenv (manage the global python version you can use)
  • pipx (install global packages for all you venv's),
  • poetry (manage the local venv)

Poetry

To install the requierd dependencies via poetry do:

poetry install

To add a developer only dependencies do:

poetry add -D [Package] [Package]...
poetry export --dev -f requirements.txt -o requirements-dev.txt

To add a production dependencies do:

poetry add [Package] [Package]...
poetry export -f requirements.txt -o requirements.txt

pip

To install the requierd dependencies via pip:

pip install -r requirements-dev.txt

Here you have to manuel manage the requirements.txt files. Use a fixed versions only.

Recipes

To get the recipe json visit: https://github.com/jakevdp/open-recipe-data

About

Student project for DHBW-Friedrichshafen to search for restaurant or recipe suggestions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published