An Udacity Full Stack Web Developer II Nanodegree project
In this project, you will be developing a web application that provides a list of items within a variety of categories and integrate third party user registration and authentication. Authenticated users should have the ability to post, edit, and delete their own items.
You will be creating this project essentially from scratch, no templates have been provided for you. This means that you have free reign over the HTML, the CSS, and the files that include the application itself utilizing Flask.
This application provides a list of items within a variety of categories , Here you can view all the items filtered by a particular category. Click on a specific category to view, add, or delete items. as well as provide an authentication system. Registered users will have the ability to post, edit, and delete their own items.
- Proper authentication and authorisation check.
- Full CRUD support using SQLAlchemy and Flask.
- JSON endpoints.
- Implements oAuth using Google Sign-in API.
.
├── static
│ └── style.css : Cascading Style Sheets (CSS) describe how documents are presented on screens
├── templates : HTML webpage templates.
│ ├── delete_category.html
│ ├── delete.html
│ ├── edit_category.html
│ ├── index.html
│ ├── items.html
│ ├── layout.html
│ ├── login.html
│ ├── new-category.html
│ ├── new-item-2.html
│ ├── new-item.html
│ ├── update-item.html
│ └── view-item.html
├── app.py : Main Flask app Python file.
├── client_secrets.json : json file used for authantication with google.
├── database_setup.py : Python file used to configure the database.
├── database_data.py : Python file used to populate the database.
├── itemcatalog.db : SQLite database.
└── README.md : This file, a concise description of the project.
System setup and how to view this project:
This project makes use of Udacity's Linux-based virtual machine (VM) configuration which includes all of the necessary software to run the application.
- Download Vagrant and install.
- Download Virtual Box and install.
- Clone or download the Vagrant VM configuration file from here.
- Clone this repository to a directory of your choice inside
vagrant/
sub-directory.
vagrant up
to start up the VM.vagrant ssh
to log into the VM.cd /vagrant
to change to your vagrant directory.cd "type the location of this repo "
to change to your repo directory.python logs_project.py
to run the reporting tool.- Install or upgrade Flask:
sudo python -m pip install --upgrade flask
- Set up the database:
python database_setup.py
- Insert dummy values. If you don't run this, the application might not run.
python database_data.py
- Run this application:
python app.py
- Open
http://localhost:5000/
in your browser, and start exploring .
this application has 3 JSON Endpoints
-
http://localhost:5000/catalog.json
- Return JSON of all the items in the catalog.
-
http://localhost:5000//categories/<int:category_id>/item/<int:item_id>/json
- Return JSON of a particular item in the catalog.
-
http://localhost:5000//categories/json
- Returns JSON of all the categories in the catalog.
In case you run into any trouble, create an issue on GitHub. I will make sure to look into it as soon as possible.