Udacity Project to use Python to create a CRUD app using OAuth and API endpoints.
This is the final project of the Servers, Authorization, and CRUD course in the full stack nanodegree program at Udacity.
The course rubric has the following requirements:
- Does the project implement a JSON endpoint with all required content?
- Does the website read category and item information from a database?
- Does the website include a form allowing users to add new items and correctly processes these forms?
- Does the website include a form to update a record in the database and correctly processes this form?
- Does the website include a way to delete an item from the catalog?
- Do create, delete, and update operations consider authorization status prior to execution?
- Does the website implement a third party authentication and authorization service?
- Is there a “login” and “logout” button/link in the website?
- Is the code ready for personal review and is neatly formatted?
- Are comments present and effectively explain longer code procedures?
- Is there a README file included detailing all steps required to successfully run the application?
My implemetation of the item catolog project is to catalog video games and categorize them by the system they run on and the game publisher and developer.
I've created my own users stories in the GitHub issues log using a custom Story tag.
The application is hosted at https://games.joebehrens.com but if you would like to run it on your own you can use the following instructions.
The keys required to use OAuth are not included in source control. You will need to provide your own keys and setup your reply URLs within your accounts to use login.
-
To run the application locally it's recommended to use Docker:
- To install Docker you will first need to download and install for your operating system.
a. Mac
b. Windows
c. Ubuntu - If you're running Windows make sure to set Docker to run in Linux Mode. Also, you will need to allow Docker to access the drive where you'll clone this repo.
- Clone or download this repo.
- Open a command shell and navigate to the folder where you cloned the repo and run
docker-compose up --build - With the container running you can reach the application in a browser at http://localhost:5000
- To stop the container press Ctrl+c in the shell and run
docker-compose down
- To install Docker you will first need to download and install for your operating system.
-
Another option is to use Vagrant:
- To install Vagrant you will first need to download and install Virtual Box
- Download and install Vagrant
- Clone or download this repo.
- Open a command shell and navigate to the folder where you cloned the repo and run
vagrant up
This will take a few minutes the first time you run it. - Once the machine is running run
vagrant sshfrom the same directory to log in to the computer. - To run the application from the vagrant ssh session run
python /vagrant/app/views.py - You can reach the application in a browser at http://localhost:5000
- To end the application press
Ctrl+cin the shell and then runvagrant haltto stop the virtual machine.
-
If you prefer to not use Docker or Vagrant and want to run the application on your own machine:
- Download Python and install it onto your own computer.
- Clone or download this repository to your computer.
- Open a command shell and navigate to the directory you cloned the code into.
- This application requires Flask and SqlAlchemy to be installed.
a. First, ensure pip is installed
b. Then from your command shell in the cloned directory run
pip install --no-cache-dir -r requirements.txt
This will install of the required Python packages for the application to run. - Run the application using
python views.py - To end the application press
Ctrl+cin the shell.
