Giter VIP home page Giter VIP logo

tasty's Introduction

What's for Dinner website

Table of Contents

  1. Purpose
  2. Features
  3. Design
    1. User Stories
    2. Wireframes
    3. Data Model
  4. Initial setup
  5. Project follow-up
  6. Testing
    1. Manual tests
    2. Validator tests
    3. Automated tests
  7. Deployment
  8. Credits

Purpose

The What's for Dinner web site invite people to share their favorite recipes to cook for dinner.

Features

Existing Features

  • Welcome Page

This is the website's landing page.

For non-logged-in users, it presents an explanation of the site and invites the users to register.

For logged-in users, this page presents directly the recipe list.

  • Recipe List

Presents a list of all recipes shared by the website users.

  • View Recipe

Allows everyone to view each recipe that is in the website.

  • Authentication

Includes registration, login and logout.

  • Edit Recipe

Used to update a recipe. A recipe can only be updated by the user who created it.

  • Create Recipe

Used to create a recipe. Only authenticated users can create a recipe.

  • Delete Recipe

Used to delete a recipe. Only authenticated users can delete a recipe.

Features Left to Implement

  • Contents Review

This feature's objective is to avoid people sharing innapropriate or badly formatted contents in the website.

A newly created recipe should automatically be included in a list to be reviewed and approved or rejected.

Only approved recipes will be shared with all the site users.

Design

Putting myself in the user's position and trying to anticipate their needs, here are some examples of questions I have asked myself:

  • Why would a user wish to visit the What's for Dinner website?
  • What would make the users return?

After some design thinking work, I came up with the following.

As a site user, I would like to:

  • Take a look at a list of recipes, from where I can select a recipe to view.
  • Spend some time viewing recipes, one recipe at a time, until I decide on one to prepare for dinner.
  • Be able to use my smartphone to view the recipe I have selected, so that I can view any details of this recipe while I am cooking.
  • Enjoy dinner, knowing I can count on What's for Dinner website next time.

I would return if I liked the user experience when browsing, reading, preparing/cooking the recipe and having dinner.

User Stories

These are the users stories I have defined for the first version of the website.

  • Welcome page: As a Site User I can view the welcome/landing page so that I can log in or create an account
  • Create account: As a Site User I can create/register an account so that I can log in to the website
  • Log in: As a Registered Site User I can log in to the website so that I can create a recipe, edit any recipe I created and delete any recipe I created
  • Create recipe: As a Registered Site User I can create a recipe so that people can view this recipe in the website
  • Edit recipe: As a Registered Site User I can edit a recipe I created so that people can view a better version of this recipe in the website
  • Delete recipe: As a Registered Site User I can delete a recipe I created so that people can no longer view this recipe in the website
  • View recipe list: As a Site User I can view a list of recipes so that I can select a recipe to view
  • View recipe: As a Site User I can view a recipe I selected from the list of recipes so that I can learn how to cook this recipe

Wireframes

Here are some of the wireframes I used to define what this first version of the What's for Dinner website will look like.

I decided to not include the edit and view recipe wireframes here, so as to not overload this section. These wireframes are very similar to the create recipe wireframe, here included.

The log in and create account buttons are visible in the view recipe list page, in case the user is not logged in.

Together, the wireframes below were a great starting point for the development of the What's for Dinner website.

Create account

image image

For a better user experience, the create account user story is implemented with a Username field instead of the initially wireframed First Name and Last Name fields. This makes the registration process smoother and more likely to register a larger number of users.

The text here presented in the create account wireframe was moved to the view recipe list page which was also decided to be the the landing page. This decision was taken at a final stage of the project. The wireframes here presented helped a lot to kick off the development but this does not mean things cannot change.

View recipe list

image image

Create recipe

image image

Data Model

The data model of the What's for Dinner website is composed of the Recipe entity that references the User entity provided by the django framework.

Here are the details of the Recipe entity.

Key Field Name Type
slug (unique) SlugField
title CharField
ForeignKey author User model
short_description TextField
ingredients TextField
method TextField

Initial setup

Before starting working on the user stories, the following steps were taken, to prepare the environment:

  • Install django framework
  • Install gunicorn http server
  • Install dj-database-url python package to use with postgresql
  • Install psycopg2 postgresql data base adapter
  • Install dj3-cloudinary-storage django package for integration with cloudinary
  • Create a new django project, named tasty_project
  • Create a new app, named whats_for_dinner_app
  • Update settings.py with the new app, allowed hosts, cloudinary settings, getting of secret key and database url, templates dir, root url configuration, wsgi application, static url and media url configuration
  • Update urls.py and admin.py, allowing django admin module to manage recipes
  • Insert some recipe sample records, preparing for the development of the view recipe list functionality

Project follow-up

This section presents the status of the development of the What's for Dinner website along the way.

Start the project with 8 user stories to do

Fri May 13 20:40:28 2022 +0100 image

Start working on the view recipe list user story

Fri May 13 20:40 2022 +0100 image

Recipe list user story done

Tue May 17 01:25:41 2022 +0100 image

Start working on the view recipe user story

Tue May 17 22:12:05 2022 +0100 image

View recipe user story done

Tue May 17 23:57:00 2022 +0100 image

Start working on the account management user stories

Wed May 18 22:58:06 2022 +0100 image

Account management user stories done

Thu May 19 01:06:10 2022 +0100 image

Start working on the delete recipe user story

Fri May 20 11:13:08 2022 +0100 image

Start working on the create recipe user story

Fri May 20 17:34:00 2022 +0100 image

Start working on the edit recipe user story

Sun May 22 11:14:15 2022 +0100 image

Create, edit and delete recipe user stories done

Mon May 23 20:54:13 2022 +0100 image

Create tasks for improving automated tests and for a better design of the landing page

At this stage, the application is working.

There was only one user story in the to do column of the Kanban board so it was moved to the in progress column.

USER STORY: Welcome page

It was decided to implement the welcome page in the view recipe list page. This way a new user and a returning user will have access to a quick explanation about the website each time they visit it. This user story consists in updating the view recipe list with a welcome explanation.

There is some time before the delivery day. This way the following new tasks were indentified and placed into the Kanban board.

TASK: Improve appearance of the landing page

Landing page is working but not yet looking good. Some elements are very close together and this makes the website look unfinished. Some design work is needed in the landing page and then new similar tasks will be created for the remaining pages.

TASK: Improve automated tests

Automated tests were developed for view recipe list and view recipe but there are no automated tests for create, edit and delete recipe. The automated tests must be reviewed in order to cover at least the CRUD functionalities.

Mon May 23 21:32:50 2022 +0100 image

Changes to the landing page contents and appearance done

The landpage is now with the intended design and content for this version of the project, to be delivered on 28th of May.

New tasks were created to style each of the remaining pages.

The automated tests task was moved back to the to do column. The tasks in the to do column are now being prioritized.

Wed May 25 02:35:00 2022 +0100 image

Styling the main pages

Tasks updated and repositioned accordingly to the current need. One task was renamed to follow the naming convention of others (task #10). One task was created (task #16).

The focus now is on styling the main pages of the project.

Wed May 25 21:25:00 2022 +0100 image

Landing page, recipe list and create recipe are styled

New done column was created in the Kanban board so that it is possible to see all the done user stories and tasks in one screenshot.

Wed May 26 00:27:00 2022 +0100 image

View and edit recipe pages are styled

Wed May 26 01:42:00 2022 +0100 image

Styling the login, logout and register pages

Tasks updated and repositioned accordingly to the current need. One task was created (task #17). The focus now is on styling the authentication-related pages.

Wed May 26 12:52:00 2022 +0100 image

Final styling and automated tests

Task #15 removed from the project. Task #11 renamed to style the view/edit/delete recipe pages. These pages are similar so they are better styled together.

Wed May 27 12:07:00 2022 +0100 image

Project completed successfully

Automated tests have been revised but there is still work to do in this area. This work has been postponed to the release 2 of the What's for Dinner website.

Wed May 28 11:05:00 2022 +0100 image

Testing

Manual tests

The following manual testing scenarios were defined and successfuly carried out along the development.

Navigation on the entire site

Navigate to each page, following the available links. Make this navigation works good.

Navigate to not authorized pages, typing directly the url to delete recipe, edit recipe and create recipe. Make sure an appropriate message is displayed. This test must be done:

  1. With non-logged-in users trying to create, edit and delete recipe.
  2. With logged-in users that are not owner of a recipe, trying to edit and delete that recipe.

Broken links

Make sure all the links are good.

Ease of Navigation

In different devices, including desktop and mobile devices, navigate for the entire site and make sure your navigation is nice.

Validator tests

In order to improve the readability and consistency of the Python code, I have used the http://pep8online.com code checker.

Files reviewd:

  • tasty_project/settings.py
  • tasty_project/urls.py
  • whats_for_dinner_app/admin.py
  • whats_for_dinner_app/apps.py
  • whats_for_dinner_app/forms.py
  • whats_for_dinner_app/models.py
  • whats_for_dinner_app/test_models.py
  • whats_for_dinner_app/test_views.py
  • whats_for_dinner_app/urls.py

Automated tests

The automated tests are currently developed in the test_models.py and test_views.py and the can be kicked off by the following command.

python3 manage.py test --keepdb

A separate testing data base is used so that the data is not mixed up with the production data.

Deployment

The website is deployed to heroku.

Here is the link for the live site https://whats--for--dinner.herokuapp.com/

Credits

Background image

tasty's People

Contributors

jmarcosdias avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.