The web app is built with Python Flask framework, which allows users to store, manage and share their movie watching history. The web app persists user data in Postgres database and implements a full CRUD (create, read, update and delete) RESTful APIs and UI to movies users watched. The app also offers a third-party authentication & authorization service such that users can login/register via their Google or Facebook Account. I also configured and published the application on an Ubuntu server offered by AWS Lightsail. (https://github.com/junyan59/Linux-server-configuration)
- Python
- Flask
- HTML
- CSS
- SQLAchemy
- OAuth2.0
- Facebook / Google Login
- Install Vagrant & VirtualBox
- Clone the Udacity Vagrantfile
- Go to Vagrant directory and either clone this repo or download and place zip here
- Launch the Vagrant VM (
vagrant up
) - Log into Vagrant VM (
vagrant ssh
) - Navigate to
cd/vagrant
as instructed in terminal - Setup application database
python database_setup.py
- *Insert example items data
python example_items.py
- Run application using
python __init__.py
- Access the application locally using http://localhost:8000
*Optional step(s)
To get the Google login working there are a few additional steps:
- Go to Google Dev Console
- Sign up or Login if prompted
- Go to Credentials
- Select Create Crendentials > OAuth Client ID
- Select Web application
- Enter name 'Movies Bookmark'
- Authorized JavaScript origins = 'http://localhost:8000'
- Authorized redirect URIs = 'http://localhost:8000/login' && 'http://localhost:8000/gconnect'
- Select Create
- Copy the Client ID and paste it into the
data-clientid
in login.html - On the Dev Console Select Download JSON
- Rename JSON file to client_secrets.json
- Place JSON file in movies-bookmark directory that you cloned from here
- Run application using
python __init__.py
The following are open to the public:
Catalog JSON: /catalog/JSON
- Displays the whole movies catalog, categories and all items
Category Items JSON: /catalog/<int:category_id>/items/JSON
- Displays movie items for a specific movie category
Category Item JSON: /catalog/<int:category_id>/items/<int:item_id>/JSON
- Displays a specific movie category item