Eatable makes cooking simple by allowing users to store all of their recipes in one place. With Eatable's hashtag feature, users can easily organize, search, and share their recipes without sifting through cookbooks or food blog links. Users can also create a Grocery List from their recipe ingredients, and have that list texted to them.
Justine Turnbull is an avid chef and software engineer based in San Francisco, CA. She loves full-stack web development and burritos equally. You can learn more about her on LinkedIn, as she is actively seeking employment.
- Python
- PostgreSQL
- SQLAlchemy
- Flask, a Python web framework
- Jinja
- Javascript
- jQuery
- Flask-RESTful
- Bootstrap
- Python Test Coverage
- Flask-Testing
- typeahead.js
Search your recipes based on a recipe title, ingredient, or hashtag. The typeahead.js plugin will make suggestions for you. Your search triggers an AJAX request, which quickly displays ranked results thanks to PostgreSQL's powerful search features.
Adding a recipe is simple. Include as many ingredients as you want--the fields just get duplicated with Javascript's clone()
method.
Adding a recipe's ingredients to your cart can be done with a click. The recipe's ingredients are added to an association table in the database, and displayed with Jinja.
Eatable isn't just for the home chef—businesses can leverage these features with the RESTful Eatable API. Thanks to the API, companies can tailor their products and services, as they have their customers' taste preferences at their fingertips.
You want: /api/users/<string:email>
Returns JSON: {user_id: user_email}
Example: {"14": "test@testing.com"}
You want: /api/recipes/<int:userid>
Returns JSON: {recipe_id: recipe_title}
Example: {"15": "Stewy Shrimp with Tomatoes and White Beans", "16": "Ratatouille", "30": "Avocado Bean Salad", "31": "Cajun Collard Greens"}
You want: /api/ingredients/<int:userid>
Returns JSON: {ingredient_name: count}
Example: {"olive oil": 7, "love": 1, "cucumber": 1, "cereal": 1, "arugula": 1, "lemon juice": 1, "green pepper": 1, "oregano": 2, "green onions": 2, "dijon mustard": 1, "brown rice": 1, "large shrimp": 1, "parsley": 1, "red pepper": 1, "chickpeas": 2, "red pepper flakes": 1, "salt": 6, "diced tomatoes": 4}
You want: /api/hashtags/<int:userid>
Returns JSON: {'hashtags': [tags_list]}
Example: {"hashtags": ["myown", "vegan", "vegetarian", "chinese", "mom", "kale", "lunch", "shrimp", "seafood", "healthy", "cool", "stew", "meat", "comfortfood", "dessert", "chocolate", "soup", "delicious"]}
You want: /api/recipes/search/<string:query>
Returns JSON: {recipe id: [recipe title, relevance ranking]}
Example: {"1": ["Hummus", 0.198206], "34": ["French Onion Soup", 0.198206], "10": ["Couscous Salad", 0.198206], "15": ["Stewy Shrimp with Tomatoes and White Beans", 0.198206], "16": ["Ratatouille", 0.198206], "30": ["Avocado Bean Salad", 0.198206], "31": ["Cajun Collard Greens", 0.198206]}
Coming soon...
Machine learning feature that recommends new recipes around the web, given the recipes a user has already inputted.
- Git clone this repo
- Set up and activate a python virtualenv, and install all dependencies:
pip install -r requirements.txt
- Make sure you have PostgreSQL running. Create a new database in psql named eatabledb:
psql
CREATE DATABASE eatabledb;
- Create the tables in your database:
python -i model.py
- While in interactive mode, create tables:
db.create_all()
- Now, quit interactive mode. Start up the flask server:
python server.py
- Go to localhost:5000 to see the web app
Eatable has 98% test coverage, as per the Coverage.py library. If you notice a problem with this app, please report it.