Giter VIP home page Giter VIP logo

cookbook's Introduction

Cookbook

This is the Data Centric Unit Milestone Project, for Code Institute's Full Stack Web Developer Course. The objective of this project is to create a web application in which users can easily store and retrieve cooking recipes. This is constructed on a relational Database, applying the backend coding language Python, and the Flask microframework to create the frontend.

UX

This website is designed for anyone who enjoys cooking and wishes to have access to a great variety of recipes in only one place with a clear and easy interphase.

The user of this web application will perform two sets of actions depending on whether or not the user is an Admin. A regular user can only search, read and vote in the recipes, while a user with Administration permissions can Edit and Delete all recipes, ingredients, categories and allergies.

Recipes can be read, searched for, downvoted or upvoted. They are classified in Categories such as Breakfast, Dessert or Vegan and have an Allergy indicator to ensure safety.

The following wireframe was designed to represent the website skeletal framework.

Wireframe

Prior to the web application creation, a Relational Database was mapped with the PonyORM tools (https://editor.ponyorm.com). The resulting diagram below represents the different tables and relationships between them.

PonyORM relational database map

A non Admin user will Create a User, Login to their account and Search for recipes.
This user can enter a keyword, choose an ingredient or a category of meal and search the existing recipes. The result is displayed and organized through Flask Pagination. The user can click on the recipe title and read the recipe.

Features

Existing Features

  • User creation and login, which allows users to vote
  • Recipe Search
  • Voting system
  • Non admin user can Read
  • Admin can Create, Edit and Delete allergies, ingredients,recipes and categories
  • Admin can associate an Allergy to an Ingredient

Technologies Used

Testing

Testing was performed through automated and manual tests.

Python code is PEP8 compliant, checked through http://pep8online.com/

Unit tests were performed on the different Repositories. The actions of Create, Read, Update and Delete were tested on each Repository using a test seeder mock database, created by Faker. After this, the repositories were refactored around the actions of create, edit, read and delete. Test driven development was carried out in this section.

Travis CI integration was configured to perform automatic tests -using testunit.py- before deployment.

This application was extensively tested in different browsers, screen sizes and Operative Systems, since it was originally designed in a Mac Desktop.

Manual Browser testing was performed through acting like a user in the web page, utilizing all the features.

An example of a manual browser test was User creation.

A. User Creation:

  1. In home, go to Register
  2. Submit a user name, longer than three characters
  3. Submit an email address, must be valid
  4. Submit a password and confirm it
  5. See a welcome message in the Navbar
  6. Be allowed to vote a recipe
  7. Logout with link in Navbar

Create, Read, Update and Delete methods were tested manually in Recipes, Allergies, Ingredients and Categories.

Deployment

This project was deployed through Heroku, it can be found here: http://winnerwinnerchickendinner.herokuapp.com/ (This name was chosen because Heroku app names have to be unique)

Heroku allows automatic deployment from a chosen branch. Travis CI integration was configured to perform automatic tests before every deployment. Exceptions were handled with Sentry platform.

In this case, the deployed branch is the master branch.

Development was done in the development branch managed through GitKraken.

Postgresql Database is used in the deployed version instead of SQLite, which was used for development. SQLite is not suitable for Heroku because Heroku deploys a managed container system and will therefore erase any added or edited information in the live version with each deployment.

Use the following credentials in order to test Admin function: email: [email protected] password: d123qwe

For environment variables in development .env was used. For deployment, the variables were manually set.

Credits

Recipes sourced from:

Media

  • The logo image was made by me.

cookbook's People

Contributors

mgsignorelli avatar

Watchers

 avatar James Cloos 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.