https://github.com/flackdl/recipe_api
Recipe Database & API
https://github.com/flackdl/recipe_api
django django-rest-framework full-text-search postgresql recipe-api recipe-app recipe-database recipe-search recipes vue
Last synced: 6 months ago
JSON representation
Recipe Database & API
- Host: GitHub
- URL: https://github.com/flackdl/recipe_api
- Owner: flackdl
- License: gpl-3.0
- Created: 2020-04-19T21:10:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-01T15:16:23.000Z (8 months ago)
- Last Synced: 2025-02-01T16:24:49.916Z (8 months ago)
- Topics: django, django-rest-framework, full-text-search, postgresql, recipe-api, recipe-app, recipe-database, recipe-search, recipes, vue
- Language: Python
- Homepage: https://recipes.eerieemu.com/
- Size: 30.2 MB
- Stars: 14
- Watchers: 4
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Recipe API
This is an open source recipe database and api.
### Overview
- The recipes are stored in a postgres database with [full-text search](https://www.postgresql.org/docs/9.5/textsearch.html) enabled
- The REST API powers the single-page-application front-end
- The seed data was *collected* from the NYT Cooking service### Technology
- python 3
- django 3
- django rest framework
- vue 2
- postgres### Screenshots
#### Search

#### Result
### Development
Start postgres:
docker-compose up -d postgres
Install python dependencies:pip install -r requirements.txt
Create database and tables:python manage.py migrate
Create cache tables:
python manage.py createcachetable
Create superuser for admin:python manage.py createsuperuser
Scrape recipes:python manage.py scrape --urls --recipes --images --ingest
Run web server:
DEBUG=1 python manage.py runserver
URL: http://localhost:8000### Deployment
*Clone repo first.*
Bring up everything:
docker-compose up -d
Deploy front-end updates:
git pull
docker-compose up --force-recreate -d recipesDeploy front and back-end:
git pull
docker-compose up --build --force-recreate -d recipesForce scrape:
docker-compose exec recipes python manage.py scrape --urls --recipes --images --ingest --force
### Helpers
Clear cache:
docker-compose exec recipes python manage.py shell
from django.core.cache import cache
cache.clear()