8000 GitHub - somphouang/ItemCatalog: Item Catalog using skills involving Full Stack Web Development.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

somphouang/ItemCatalog

Repository files navigation

Item Catalog Project

Project Overview

Item Catalog web application that uses the full stack development skills. Project would cover Python code to perform backend CRUD operations with the ProgreSQL database and using Google Authentication for user login. Front end coding involves understanding the use of Bootstrap stylesheet and user web interface.

Packages required

  • sqlalchemy
  • ProgreSQL
  • google_auto_oauthlib

Google API Client Key Instruction

  1. Sign in at https://console.developers.google.com/apis/
  2. Create a new Web application
  3. Go to Credential under APIs & Services
  4. Add the following to the field Authorized JavaScript origins
http://localhost:8000
  1. Add the following the field Authorized redirect URIs
http://localhost:8000/login
http://localhost:8000/catalog
http://localhost:8000/oauth2callback

Quickstart

  • Step 1: Installing the Virtual Machine Instruction tools called Vagrant and VirtualBox to manage the VM needed to run this project python code against the database for log analysis.
  • Step 2: Install VirtualBox. VirtualBox is the software that actually runs the virtual machine. Install the platform package for your operatuing system. Vagrant will use VirtualBox to launch VM.
  • Step 3: Install Vagrant. Vagrant is the software that configures the VM and lets you share files between host computer and VM filesystem via folder '/vagrant/'
  • Step 4: Download the VM configuration for Vagrant. This will contain the directory vagrant which contains the VagrantFile. Alternatively, it is possible to use Github to fork or clone the repository https://github.com/udacity/fullstatck-nanodegree-vm
  • Step 5: Start the Virtual Machine, change directory using cd into the /vagrant directory and use the command vagrant up, then log into it with vagrant ssh
  • Step 6: In order to use the Google Authentication API, run command:
sudo pip install google_auth_oauthlib
  • Step 7: In the Vagrant ssh enter the following: Create the database using ProgreSQL
psql -c "CREATE DATABASE catalogdb"
  • Step 8: Setup the database tables for the operations with command below:
python init_database.py
  • Step 9: Run the project by running 'app.py'
python app.py

JSON endpoint for API request

  • Possible API are the followings:
http://localhost:8000/catalog/JSON
http://localhost:8000/catalog/categories/JSON
http://localhost:8000/catalog/PUT_CATEGORY_NAME_HERE/items/JSON
http://localhost:8000/catalog/PUT_CATEGORY_NAME_HERE/PUT_ITEM_NAME/JSON

Cleaning Up Project

  • Run command to drop the table from ProgreSQL
psql -c "DROP DATABASE catalogdb"

About

Item Catalog using skills involving Full Stack Web Development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Footer

© 2025 GitHub, Inc.
0