Giter Club home page Giter Club logo

datacentricproject's Introduction

Data Centric Development Milestone Project

The project is focused on the use of databases and the use of python and flask to put it all together.

My cooking book concept is a space where users can check, create or edit their own recipes, with a simple, yet balanced design. The user experience is clean and the navigation through pages creates a space where you can come and go as you please, never limiting the user.

This project generated various challenges when using the different syntax for the Mongo terminal and pymongo. The conceptualization of the project was simple but creating the logic in python based in mongo and applied to flask was the biggest challenge. Trying to create a web site which responds to the user in the most basic manner and keep the standards for an acceptable web site took time but was rewarding.

This project delivers by using the mongo database, which is flexible and intuitive.

** All information and pictures are fictional, non related and just for testing **

Application guidelines

  • MongoDB to hold a database based on cooking recipes
  • User is presented to a web page inviting to see create or edit recipes
  • User can create, edit and delete recipes created by him/her
  • User has a simple verification method to access his/her own recipes
  • The page flow is intuitive and lets the user navigate to any place at any moment
  • The web development has sections which allow for the distribution of information
  • A graph updates and shows users the amount of authors and recipes in the site

Project guidelines

  • Logic written in python. other technologies used
  • Semantic HTML
  • The website must be data-driven (MongoDB)
  • Use Flask, a micro-framework, to run your application
  • Instructions to deploy (see deployment)
  • Share details of how you created your database schema in your README.
  • Make sure the site is responsive
  • User stories, wireframes
  • CSS and Bootstrap frameworks used
  • README.md file made
  • GitHub version control used during development https://github.com/CEsarABC/DataCentricProject
  • Final version of the code deployed in Heroku

Technologies used

  • HTML
  • CSS
  • Bootstrap 4.0
  • Python 3.6
    • PyMongo
  • JavaScript
  • Charts.js
  • Flask
  • Cloud9
  • mLab MongoDB
  • Adobe Illustrator
  • Abobe Photoshop

Basic project tree

UX

  • This development presents the content to the users and let them chose what path they want to take.
  • The information is simple and in a clean manner
  • The introduction invites the users to interact and find what they are looking for.
  • Images are compresed and light so the user doesn't experience delays

Features

  • User can navegate in any section of the site
  • User can see all recipes in the database
  • User can search by author name, cuisine or search by filtering an allergen
  • User is able to add recipes, important fields are required in the form
  • User validation for editing or deleting recipes
  • User is able to retrieve all his/her recipes for edition or deletion
  • User can see how many recipes all users have
  • Forms are not case sensitive to avoid problems trying to access any data

Left to Implement

Bringing this project to life took some time and some ideas where left on the side just because of the time left to finish my course.

  • A better and more complete search section
  • Giving the user option to upload their own pictures
  • Adding more grahps to display more information on the database
  • More visually appealing design
  • Pagination for extensive results
  • Limit to the amount of results in the graph
  • Code auto format for ingredients and method sections

Database Schema

I decided that mongoDB was the best database I could use in my project. I needed flexibility and my data was not extensive enought for me to create a relational database to extract information. My collections were then divided between the document, which was going to hold all the information about the recipe, and the options such as cuisine type. Choices in cuisine was supported by having its own document with data avaliable for the user, when creating or editing recipes.

The Database structure:

  • recipes database
    • collection of recipes
    • collection of cuisines

The schema used for the main document:

  • 'author': name (used for verification)
  • 'dob': dob (used for verification)
  • 'recipe_name': nrecipe (new document)
  • 'description': description (information)
  • 'cuisine': cuisine (information)
  • 'serves': serves (information)
  • 'time': ctime (information)
  • 'ingredients': ingredients (information)
  • 'method': method (information)
  • 'views': 0 (views count and record)
  • "images_small": "/dishes0.jpg" (image link for card)
  • "images_large": "/dishesL0.jpg" (image link for recipe page)
  • 'allergens': arrayValues (array created with the selected allergens)

Testing

  • Mostly manual testing, all modules in the python application where developed individually and the assembled into the full application

  • Modules tested:

  • reading from database

  • queries from database

  • use of flask to bring data to html documents

  • inserting and modifing from database

  • use of python to extract data from database

  • use of python to create basic javascript documents

  • passing data from database to charts

  • Tests have been made for media queries in different formats from pc to mobile

  • Heroku deployement tested

Deployment

  • Project fully deployed to Heroku https://cooking-book-cb.herokuapp.com/

    • The project was deployed following the guidelines from the code Institute materials
    • New project was created in Heroku
    • requirements.txt was created by the use of pip3 freeze
    • Procfile was created
    • Heroku remote was set in order to push application
    • Configuration variables were changed as indicated to have 'IP' = (0.0.0.0) and 'PORT' = (5000)
    • To access the recipes for edition you can use and test your own recipes or just use:
      • ==author: Cesar DOB: 24/02/87==
      • ==author: Oscar DOB: 24/02/88==
    • In search by cuisine italian, british and japanese have some recipes
  • pip3 used to install pymongo

  • Requirements.txt

    • Click==7.0
    • Flask==1.0.2
    • Flask-PyMongo==2.2.0
    • Jinja2==2.10
    • MarkupSafe==1.1.0
    • Werkzeug==0.14.1
    • itsdangerous==1.1.0
    • pymongo==3.7.2

Running locally - in the terminal

  • To run this application in cloud9 $ python3 app.py

Credits

Media

Acknowledgments

Thank you to the code institute for the support. This last project has been challenging and took me some time to develop. I have learned a lot and I hope to keep learning to become the professional I want to be. Thank you to the slack channels for the support and the code academy tutors which always had answers to help me move forward.

datacentricproject's People

Contributors

cesarabc avatar

Watchers

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.