The site that helps you and your family plan the dinner for the week including shopping list management.
Live site location:
The typical website user is an adult ready to take the responsibility to plan the dinner for the whole week.
- As a user, I would like to see my weekly dinner planning so I can get a dinner overview of what's up for dinner.
- As a user, I would like to find a recipe and add it to the week's planning so that I can get an overview of what is for dinner.
- As a user, I would like to get an automated shopping list based on my weekly schedule, so I know what to buy in the store.
- As a user, I should be able to add items to the shopping list so I don't miss buying other items in the store.
- As a user, I should be able to tick off items when I'm in the store so I know what I have left to find.
- As a user, I would like to send my shopping list as an email to my fellow users, so I don't have to do all the shopping myself.
Site screenshots are found in the project folder /wireframes.
Site wireframes:
- Find meal page search meal page, showing search results. Also acts as site index page
- Weekly schedule Page showing the dishes selected for each day.
- Favourites Page showing the current favourite dishes.
- Shopping list Page showing the current shopping list with email possibility
- Meal page showing selected meal ingredients and instructions.
The website contains a clear navigation on every page. The site is based on a navigational hierarchical tree structure. Navigation bar is responsive and will fold down to a burger menu when it wont fit the size.
Navigation items: Find meal (the logo is also a link to Find meal) Week schedule Shopping list Favourite meals
Each page includes a footer element containing information about the site and links to site social accounts and link to favourites page. Footer wireframe example
- Find meals - allows users to find a recipe by searching for a dish by using the query field.
- Week schedule overview - allow users to get a weekly dinner overview including a weekly overview widget on pages that require it.
- Shopping list - Allow users to establish a shopping list based on the weekly schedule where additional items can be added.
- Favourite meals - Allow users to see all meals set as users favourites.
- Meal cooking instructions - let the user see the recipe details for the meal.
- Set Random meals - If the user does not want to find a meal it is possible to use the random function in the weekly widget or the week page.
- Custom 404 - Navigating to a page that does not exist will tell the user about the error. This works in Development and in Production.
- Data Storage - Allow user selections to be stored between sessions.
Anonymous users are tracked with a fingerprint and the user data is stored with Google Firebase.
Here is an example user record stored on Google Firebase.
{
"data": {
"meals": {
"Mon": {mealobject},
"Tue": {mealobject},
"Wed": {mealobject},
"Thu": {mealobject},
"Fri": null,
"Sat": null,
"Sun": {mealobject}
},
"additionalItems": ["1 x Toilet paper", "2 x lollipops"],
"favlist": [mealobject,mealobject],
"shoppingChecked": [itemObject,itemObject]
},
}
Most of the site content is provided from API.
Site use system sans-serif provided by bootstrap to stay clean on all supported platforms
The site color scheme is light and high contrast, with user information text and navigation bar muted gray.
- Use social logins to use the custom data site on multiple devices.
In this section, all of the languages, frameworks, libraries, and any other tools that are used to construct this project are listed with its name, a link to its official site and a short sentence of why it was used.
- HTML5
- Used to render the DOM
- CSS
- Used to layout the site.
- Javascript
- Used to handle site code logic and API integrations
- Bootstrap
- used to make site responsive
- Fontawesome
- Used to display icons on website
- themealdb
- Used as recipe database
- JQuery
- The project uses JQuery to simplify DOM manipulation.
- Google Firebase
- Used to store and recall user data
- https://console.firebase.google.com/project/neon-research-304412/overview (restricted access)
- Yarn
- Used to start dev environment
- fingerprintjs
- is used to create a browser fingerprint without the user actually login.
- emailjs
- Used to send email from site
Site is tested on the following platforms and browsers
- Mac
- Google Chrome (91.0.4472.106)
- Safari (14.1.1)
- Firefox (89.0.1)
- Windows 10
- Google Chrome (91.0.4472.114)
- Edge (91.0.864.53)
- Firefox (89.0.1)
- Iphone 12
- Safari
- Google Chrome
- Android Samsung S12
- Google Chrome
All tests pass on all platforms.
The site has the feature to send emails with emailjs. Errors & Success in sending emails is displayed to the user in the UI. The form will not send the email if the email address has the wrong format.
The send email feature correctly handles errors and sends emails upon valid email addresses.
- Contact form:
- Go to "Index" page
- Add a meal to any weekday by clicking on for example "Mo"
- Go to "Shopping list" page
- In the end of the list add your own item by clicking "Add Items", type for example "4 rolls of Toilet paper" and press enter.
- Scroll to the top of the "Shopping list"
- Try to submit the empty form and verify that "Send" button is disbled.
- Try to submit the form with an invalid email address and verify that a relevant error message appears
- Try to submit the form with email input valid and verify that a success message appears.
Feature passed this test
- goto "Index"
- On a couple of meals click on a couple of Weekdays "Mo" - "Su"
- Confirm meals to show up on correct days.
Feature passed this test
- goto "Find meal"
- On a couple of meals click on the favourite heart.
- Confirm the heart goes red.
- Goto "Favourite meals" and confirm Favourite meals show up in the list
Feature passed this test
- Got to "Shopping list"
- click "add items"
- type anything in the input box.
- Hit Enter on keyboard
Feature passed this test
- Got to "Week schedule"
- hover the image on a meal and "Set a random dish"
- confirm new meal show up
Feature passed this test
- Got to "Find meal"
- Type in "fish" and hit enter
- Confirm you get a list of "fishy" items.
Feature passed this test
- Add one or more meals to week schedule
- Goto "Shopping list"
- Confirm ingredients for the selected meals show up in list
Feature passed this test
- Add one or more meals to week schedule
- Goto "Shopping list"
- click on a row on ingredient text or the checkbox
- confirm row is checked
Feature passed this test
- Goto "Find meal"
- click on any dish name
- Confirm recipe reads fine
Feature passed this test
- Goto "https://malmgrenola.github.io/feed-us/wrong.html"
- Confirm you get a "Page not found" Page
Feature passed this test
Each page should return no errors & warnings using validator.w3.org
All pages are validated without errors or warnings.
Site CSS should return no errors or warnings.
CSS Validator testing style.css
- themealdb is case sensitive in ingredients that means that "eggs" and "Eggs" will show up twice in the shopping list.
- During site test and adding meal to a weekday, there was a meal from themealdb that could not be encoded with encodeURIComponent. This resulted that it was not possible to add the particular meal, the problem cannot currently be reproduced so it's not possible to write a catch error function.
- emailjs has a limitation on 200 emails per month on the free plan.
- Since this site re-renders all content in the sections using JQuery on each page HTML validators yells a warning that h1-h6 is missing. Each page section has a
h1
andh2
in order for the validators to accept the html without warnings. This has no impact on site functionality. - Site stores data based on browser fingerprints. changing browser will create a new dataset and the selected data will be lost. The future feature Add Social logins will ensure users can login on any device using the same dataset.
- Github Pages will now have the
Permissions-Policy: interest-cohort=()
header set. There is currently no way to opt out of it. A warning will be seen in for example Chrome Developer tools.
Site is deployed to malmgrenola.github.io/feed-us using Github Pages.
The static
subfolder is deployed by pushing the static
folder to its own branch gh-pages
, used by Github Pages to deploy the site.
The command git subtree push --prefix static origin gh-pages
is added to package.json
as script deploy, making it possible to run yarn deploy
from the project root folder.
Deploy by:
- Fork the feed-us repo
- In the terminal run
git clone https://github.com/{your-own-gituser-here}/feed-us.git
- to fetch code - In the terminal run
cd feed-us
- to place yourself in the root of the project. - In the terminal run
yarn
- to download all dependencies - commit your changes to your forked repo
- in a terminal run
yarn deploy
- to fire deploy script to Google Pages with custom root folder.
If deployed to anything other than malmgrenola.github.io/feed-us you must create your own instances of Google Firebase with your own api keys provided in the firebase-api.js config section. Full guideline documentation is provided by Google.
This project uses yarn
to start a development server.
- Fork the feed-us repo
- In the terminal run
git clone https://github.com/{your-own-gituser-here}/feed-us.git
- to fetch code - In the terminal run
cd feed-us
- to place yourself in the root of the project. - In the terminal run
yarn
- to download all dependencies yarn dev
- to start a dev environment.
a http-server should start on port 3000 and the site is now available on http://localhost:3000
.
Google API's used is locked to localhost:3000
& deploy url malmgrenola.github.io/feed-us
.
To change the default port please update in package.json
under the scripts section. Please note that changing port will disable the usage of the restricted google api key provided in the project.
The photos used in this site were obtained from:
- I received inspiration from allrecipes and simply recipes
- I received inspiration for the week planner from freepik
- I received inspiration for loading images from Creating a CSS Animated Loading Card
- I received inspiration for Styling a Search Bar from mikedane website
- I received inspiration for site render and code flow from React