The Item Catalog
is a web application using the Python framework Flask implementing third-party OAuth authentication, Google plus and Facebook log-in. It provides a list of game items within a variety of genres as well as provides a user registration and authentication system. This project is one of assignments for the Udacity's Full Stack Web Developer Nanodegree program.
- 한글 리드미(README Korean) 파일: README_ko.md
Game List Page | Game Detail Page |
---|---|
Clone the github repository and install dependencies as follow.
git clone https://github.com/YoungsAppWorkshop/itemcatalog
cd itemcatalog
sudo pip3 install -r requirements.txt
Since Item Catalog
is implementing third-party OAuth authentication APIs from Google and Facebook, client secrets of both services should be stored in JSON files.
- Download Google client secrets file and store it in
google_client_secrets.json
file. - Specify Facebook App ID and App Secret in the
fb_client_secrets.json
file.
After including the API credentials in the client secrets files, the app can be started with:
python3 run.py
└── itemcatalog
├── app
│ ├── mod_api # JSON API module
│ ├── mod_auth # User authentication module
│ ├── mod_catalog # Catalog module
│ ├── static
│ ├── templates
│ ├── __init__.py # Base application
│ └── models.py # Database schema
├── uploads # User uploaded images
│ ...
├── catalog.db # Sample database
├── config.py
├── fb_client_secrets.json # Facebook OAuth2 credentials
├── google_client_secrets.json # Google OAuth2 credentials
├── README_ko.md
├── README.md # This file
└── run.py # Run the application
The Item Catalog
provides a JSON API endpoint that users can easily find information about games registered. To access the API, you can browse http://YOUR_SERVER_NAME/api
.
/api/categories/all/
: Returns all games of all genres/api/categories/<int:category_id>/items/all/
: Returns all games of a genre/api/categories/<int:category_id>/items/<int:item_id>/
: Returns a game of a genre/api/users/all/
: Returns all users information
The Item Catalog
app is built with Flask, Flask-SQLAlchemy, SQLAlchemy, Jinja2 Templates, httplib2, oauth2client, Bootstrap4, and others. The below is the list of third-party sources which have been modified and used for the app:
- Flask Uploading File pattern for uploading featured images of items
- Google OAuth Sample code from Udacity
This app is MIT licensed.