Created with Python, Flask and MnogoDB and the purpose of this project is to create an interactive website with database of recipes that allows the user to create, read, update and delete (CRUD) recipes.
This project only for demonstrate the usage of Python language helped by Flask and Jinja and build an interactive application for certain functionality.
Website deployed on Heroku at Hungarian Cuisine
Front-end web design built conventional manner and presented by a clear layout. Header section with navigation bar, main section and an informative footer.
The project did not required log in functionality and have no restriction at DELETE buttons so please use them wisely.
- Create my own recipes with images.
- Read my own and others recipes.
- Update or change infromations at recipes.
- Delete old or not wanted recipe.
- Find all recipes or organised views for example see recipes by categories.
- Use all functionality at any device
- Able to see all data stored at database by users.
- Modify and use these data from a safe storage.
- Create new functionalities for the page.
This webpage is responsive clear view and all buttons and functions working on mobile devices. User of page can create new recipes edit them, create new categories and delet them.
The delete functionality was more useful if users can delete their only creations so user login would be the solution. At this time only a JavaScript warning ask to be careful with delete.
Also another feature idea to put sidebar at base.html for more links and advertisements for business purpose.
Back-end language is Python. The recipe filter by categories and recipes pagination are the two functionality for demonstrate the understanding the python language and its logic.
In development I wanted to see all functionalities, design, and responsiveness: after I made some changes at AWS C9 EC2, also put the hosted page under crome developer tool.
HTML, CSS code changes was made in Google Crome developer tool and copy and paste back to AWS C9 and after code was pushed also checked at Heroku hosted page.
AWS C9 inbuilt hosting feature make ti easy to test every changes promt. During the development I have used this to check back-en and fron-end changes as well.
Family members and friends tested the functionality and responsiveness at different devices sach as Samsung A7 phone, iPhone 8, Samsung tablet, APPLE 13.3, MacBook Air (2017) and Lenovo ideapad 110-15ACL with Widows 10.
- Go to New Recipe at navigation bar
- Fill up the form. HTML validation for filling up all lines can not submit with empty lines
- For image url With Javascrip there is a defuolt url
- Hit submit buttons
- Go to recipes page at navbar to check your new recipe
For deployment I have used Heroku. When I enabled the automated deployment from Heroku after every time the project was pushed to Github, the Heroku automaticly built the new version of the project.
Secure keys, usernames and passwords in production should be never committed to github. As it suggested the Atlas MongoDB connection string to the .bashrc file:
export MONGO_URI = " long string with name and password "
app.config["MONGO_URI"] = os.getenv("MONGO_URI")
To deploy to Heroku I have used AWS Cloud9 IDE to develop this application before deplyment I have turned off Flask debugging by setting debug=False
sudo pip3 freeze --local > requirements.txt.
Followd the videos to create a Procfile: web: python app.py. Through this Heroku find the application.
_id:5d9d159b1e4fa8dcb734f2ca
category_name:"soups and starters"
allergens_types:"milk"
recipe_title:"Cold Fruit Soup"
img_url:"http://rendeles.introcafe.hu/images/products/originals/8.jpg"
recipe_ingredients:"milk, flour, sugar"
recipe_preparation:"boil fruits with sugar add powder and stir"
is_favourite:"on"