Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Latest commit

 

History

History
96 lines (77 loc) · 3.19 KB

README.md

File metadata and controls

96 lines (77 loc) · 3.19 KB

Item Catalog Project

An Udacity Full Stack Web Developer II Nanodegree project developed by Subhadeep Dey.

About

This application provides a list of items within a variety of categories as well as provide a user registration and authentication system. Registered users will have the ability to post, edit, and delete their own items.

Features

  • Proper authentication and authorisation check.
  • Full CRUD support using SQLAlchemy and Flask.
  • JSON endpoints.
  • Implements oAuth using Google Sign-in API.

Project Structure

.
├── app.py
├── client_secrets.json
├── database_setup.py
├── fake_db_populator.py
├── itemcatalog.db
├── LICENSE
├── README.md
├── static
│   └── style.css
└── 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

Steps to run this project

  1. Download and install Vagrant.

  2. Download and install VirtualBox.

  3. Clone or download the Vagrant VM configuration file from here.

  4. Open the above directory and navigate to the vagrant/ sub-directory.

  5. Open terminal, and type

    vagrant up

    This will cause Vagrant to download the Ubuntu operating system and install it. This may take quite a while depending on how fast your Internet connection is.

  6. After the above command succeeds, connect to the newly created VM:

    vagrant ssh
  7. Type cd /vagrant/ to navigate to the shared repository.

  8. Download or clone this repository, and navigate to it.

  9. Install or upgrade Flask:

    sudo python3 -m pip install --upgrade flask
  10. Set up the database:

    python3 database_setup.py
  11. Insert dummy values. If you don't run this, the application might not run.

    python3 fake_db_populator.py
  12. Run this application:

    python3 app.py
  13. Open http://localhost:5000/ in your favourite Web browser, and enjoy.

Debugging

In case the app doesn't run, make sure to confirm the following points:

  • You have run python3 fake_db_populator.py before running the application. This is an essential step.
  • The latest version of Flask is installed.
  • Python 3.6 is installed. In the vagrant machine, you may find Python 3.5 installed by default. To install Python 3.6, follow this answer. To invoke Python 3.6, type python3.6 instead of python3.

Known Issue

This app might show an empty username if you sign in with a custom-domain-based Google account (Corporate accounts). For instance, if you use a Google account [email protected], this app might show an empty username.

Help and Support

In case you run into any trouble, create an issue on GitHub. I will make sure to look into it as soon as possible.