This app will eventually allow a user to input a list of ingredients and tools they have on hand, and it will return recipes for drinks that they could create.
As of this build (1.0.1), the app provides a random recipe to check out on the home page.
It then allows a user to input an ingredient to search for and returns a list of cocktails which contain that ingredient.
- Vanilla JS
- JQuery
- WTForms
- Bootstrap
- CSS
- Font Awesome
- Python
- Postgresql
- SQLAlchemy
- Flask
- WTForms
- BCrypt
- Heroku
- Nginx
Getting started in a flash, you have two options.
- Sign up to be a Patreon supporter of thecocktaildb to get an API key (recommended).
or
- install the provided database file (swap username with your username)
Good choice. We should all be supporting one another. Also, you'll always get the most up to date database this way.
- You should install everything in the requirements.txt
pip install -r requirements.txt
-
Then you should create a separate file for your API key. Import it into front_loader.py replacing line 3 with whatever your import should be.
NOTE: import your API key as
api_key
to not have to change anything else. -
Set up your database. You can do this by either creating your database as you like and setting your environment variable to
DATABASE_URL
or creating a postgresql database and naming it 'quixr'. -
You should then run front_loader.py
python front_loader.py
- At this point, your app is ready to launch locally:
flask run
Access at http://127.0.0.1:5000/
- Preload the database in
psql -U postgres quixr < dbexport.pgsql 1
postgres
is usually the default username that installs with postgres DB. If you've set up your postgres to use a different username, insert it here.
- Create a virtual environment (highly recommended, not 100% necessary) run it:
python -m venv venv
python might actually be python3 depending on your system In Mac/Linux, running your virtual environment is:
. venv/bin/activate
In Windows:
source venv/bin/activate
- Install the required frameworks and tools:
pip install -r requirements.txt
- Your app should be ready to run:
flask run
Access at http://127.0.0.1:5000/ or set it up to be hosted.
There are some basic tests. I will add some more going forward, so check back from time to time.
To run the tests:
- Activate your virtual environment
- Run Python's unittest module
python -m unittest
- setting up tools and ingredients that the user has, and being able to search and sort by what the user has on hand
- implementing preferences
- implementing a rating system
- ability to share favorite recipes with other users, which in itself implies a forum/message board/communication method
- search history (per user)
Footnotes
-
I have taken this file out. If you send a request to me, I will get it to you. ↩