Skip to content
/ catalog Public

Internet Computer Game Database - 'catalog' project for Udacity Full Stack nanodegree. Uses Flask framework and Jinja2 templates.

Notifications You must be signed in to change notification settings

m1221/catalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About 'Catalog'

This project was completed as part of the Udacity Fullstack Nanodegree.

The assignment was to build an 'item catalog' web application that allows users to register & login via Open Authorization (OAuth). Registered users can make changes to a database. Google and Flask-SeaSurf were used in this setup.

I built Internet Computer Game Database (ICGDB).

UPDATE: This project is NOT meant to be run by anyone.

  • I've removed the google project.
  • The configuration files for vagrant aren't included.

Requirements

  1. Udacity-prepared Vagrant directory (NOT INCLUDED in repo)
  2. Python 3
    • flask-seasurf module
    • oauth2client
  3. Install VirtualBox download page link
  4. Install Vagrant download page link
  5. Setup Google OAuth Client

File Log

  1. static
    • pics
    • style_base.css
  2. templates
    • multiple html files (the pieces of the web page)
  3. README.md
  4. db_populate.py
  5. flask_server.py
  6. icgdb_database_setup.py

Setup Instructions:

  1. Install Flask-SeaSurf via PIP
  • `$ pip install flask-seasurf
  1. Access the Google Developers Console and create a project according to Udacity's guidelines
  2. Download the JSON file from the Developers Console and move this file into Catalog directory.
    • Change its name to 'client_secrets.json'
  3. Go to templates/login_html and change the value of the 'data-clientid' attribute to the client-id found in the client_secrets.json file
  4. Go to db_populate.py, read lines ~28-34 regarding the use of a 'superuser'

How to run:

  1. In your terminal, go to the Udacity-prepared Vagrant directory
  2. Launch VM by VirtualBox configured with Vagrant
    • $vagrant up
  3. Log into the VM
    • $vagrant ssh
  4. cd to catalog directory
  5. Create the database
    • $python icgdb_database_setup.py
  6. Populate the database
    • $python db_populate.py
  7. Serve the application
    • $python flask_server.py
  8. Open your browser and access the page via localhost:5000/
    • authenticated users (users logged-in to Google) can make changes to the database

This project has the following extra credit functionality:

  1. API Endpoints JSON, XML
  • to access the endpoints, add "JSON" or "XML" to the end of a URL
  • endpoints exists for a game, games, genres, and publishers
  1. CRUD: READ (image urls in DB)
  2. CRUD: CREATE, UPDATE (upload and update images)
  3. CRUD: DELETE (require token submission for POST requests... )

About

Internet Computer Game Database - 'catalog' project for Udacity Full Stack nanodegree. Uses Flask framework and Jinja2 templates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published