sbuergers / sustainable-recipe-recommender-website Goto Github PK
View Code? Open in Web Editor NEWFlask web-app for recommending sustainable recipes to users.
Flask web-app for recommending sustainable recipes to users.
The CSS styling of the navbar for the Blog link is mismatched, because I exported the Jupyter notebook that is displayed as HTML, which includes all kinds of custom CSS. I might simply be able to solve this by exporting the notebook as pdf.
The codebase needs some tests we can run to assess whether a new add-on (or indeed as it stands now) breaks it's functionality.
Worked on here:
https://github.com/sbuergers/sustainable-recipe-recommender-website/tree/continuous_integration
Tests could be grouped as follows:
It's annoying to have to sign in after just creating an account.
I want users to be logged in automatically after signing up.
Required email confirmation to be implemented first.
--> Only confirmed accounts can request password or account reminders (this issue: #26 (comment)).
Is your feature request related to a problem? Please describe.
At the moment, when users forget their password or username, they cannot ask to retrieve it via email.
Describe the solution you'd like
Include a "forgot password" and "forgot username" link to login page. They will be sent their password or username to their email address.
Describe alternatives you've considered
NA
Additional context
NA
A good website needs a footer!
Include my contact info + logo for now.
Check for vulnerability to the following (see here for more information):
1. SQL injection attacks
Cross site scripting
Cross site request forgery
Man in the middle attacks (check security headers)
It's more convenient and less confusing when everything is in one place.
This is also described in the about page, which is now incorrect. They are only matched by recipe specific url.
That being said, if you search for the recipe title, the only recipe that is going to be found is the one that contains all the recipe words in the url - so this somewhat works already (though maybe not always). It also does not open the results.html page, but rather explore.html with a single result - the recipe of interest.
Currently not clear how to do either.
Make sure they can easily set this on their profile page (add new links for it).
I believe the following would make interaction with the website more pleasant:
Describe the bug
When bookmarking a recipe it is automatically highlighted as liked at the same time on results.html (from compare_recipes route). Interestingly, this does not happen for profile.html and explore.html.
To Reproduce
On results.html click on a bookmark icon of an unbookmarked and unliked recipe.
Expected behavior
Recipe gets highlighted as bookmarked, but not as liked.
Describe the bug
After deleting account redirection to main.home fails. Instead we stay on main.profile.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After account deletion we should be redirected to main.home
Using a general code formatting framework makes things easier. ideally we should also add a bot that automatically updated any incoming PRs by running python3 -m black {source_file_or_directory}
on it.
It is possible for users to create an account and login. But there is no functionality that makes this useful.
The Cookbook link should refer users to their personal cookbook, which includes recipes that they liked / added to it. To make this work we need
Once the cookbook functionality has been created. The next step would be to integrate collaborative filtering recommendations.
Right now the free search only uses LIKE %search_term% and edit distance (aka Levenshtein distance) to sort the search results. The search is implemented in fuzzy_search in sql_queries.py. This should be improved. Postgres has pretty advanced full text search features, which should come in handy.
Since I cannot revoke a creative commons license, I will for now simply keep the copyright to myself.
Describe the bug
When I resize the browser image the emissions histogram on the profile page does not resize (which may be sort of ok), but it also starts overlapping with the text next to it.
Similarly, the options/links (recipe, suggestions, thumbs up ...) below recipe items in the cookbook do not rescale to fit the width of each recipe picture, which makes it look funny.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Emissions histogram should never overlap with text (either run out of screen or horizontally stack). Is it possible to resize the image depending on the browser width?
Links below recipe items should match the image in width whatever the browser window size
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
NA
Is your feature request related to a problem? Please describe.
People might be interested to put the carbon emission scores of recipes into context: E.g. related to their car or home electricity use.
Describe the solution you'd like
We can add some info links for this and refer to this website: https://www.epa.gov/energy/greenhouse-gases-equivalencies-calculator-calculations-and-references, as well as add some summary descriptive statistics to our site - e.g. how much CO2 eq the average car emits per day or the average home emits in utilities.
Find a way to continuously integrate new ratings with the existing epicurious dataset.
Following good practice with application factories, consider implementing a structure like suggested here.
Basically, do not lump too many things into app.py and modularize extensions.
I had a brief look at this and ran into problems with copying folders using the git comman line (permissions denied). A brief google offered no quick fix.
This is related to rewriting all psycopg2 queries as flask_sqlalchemy queries. It is still not clear to me though if I should use flask-sqlalchemy or simply sqlalchemy.
When developing (debugging and testing) I use HTTP, not HTTPS, which is used in production.
An enhancement would be to enable HTTPS also in development. mkcert can be used for this presumably.
This is not super urgent right now though, because I created the staging environment on Heroku.
Check Meta-tags?
Thanks Sebastian Michelmann for pointing this out!
If we do not do this, people could theoretically harrass others by sending them endless emails from SSR. I suppose if they can do that they could also spam them in a myriad of other ways, but then at least it does not drag SSR into it.
Low priority though for now.
SQL queries in sql_queries.py make use of bindparams, which will be deprecated in future releases of SQLAlchemy. Change syntax appropriately.
For instance, only search for vegan / vegetarian / pescetarian / paleo ...
It could also be great to allow for selecting certain ingredients, or conversely prohibiting certain ingredients (e.g. due to allergies).
All of these things could be accessed through a "filter" button / link on the home page, or in the navbar next to the search.
Once personal profiles are available, it should be possible to save personal preferences (e.g. allergies / vegan ...). So they do not need to be specified anew everytime.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.