This is my Item Catalog project for Udacity's Full Stack Developer Nanodegree.
It is a Python web application using the Flask framework along with SQLAlchemy for an items catalog. In it you can view categories and related items.
Once logged in you can create, edit and delete items.
Front-end was built for mobile first.
For best experience, use Google Chrome. 😜
- CSRF protection
- Flask-login based login module
- OAUTH signup with:
- Github
- Image upload
- JSON API endpoints
- Installed VirtualBox
- Installed Vagrant
- Registered Facebook App for OAUTH
- Registered Github App for OAUTH
- Registered Google App for OAUTH
- Clone the repository
- Using your console
cd
into the repository's directory - Use
vagrant up
❗ Note: this can take a few minutes - The VM needs a restart once setup - use
vagrant halt
to stop the VM - Finally, use
vagrant up
again to start the VM
- Using your console
cd
into the repository's directory - Start the VM using
vagrant up
- SSH into your VM using
vagrant ssh
cd
into the app folder as/vagrant/catalog
- Create the dummy DB using
python setup.py
- Open
/vagrant/catalog/instance/fb_client_secret.json
with your editor - Enter your
app_id
andapp_secret
for Facebook login and save - Open
/vagrant/catalog/instance/gh_client_secret.json
with your editor - Enter your
client_id
andclient_secret
for Github login and save - Open
/vagrant/catalog/instance/goo_client_secret.json
with your editor - Enter your
client_id
,project_id
andclient_secret
for Google login and save
In case you'd like to modify the DB items, edit setup.py
file
- Make sure your application is setup (check First time setup step above)
- Using your console
cd
into the repository's directory - Start the VM using
vagrant up
- SSH into your VM using
vagrant ssh
cd
into the app folder as/vagrant/catalog
- Create the dummy DB using
python run.py
- In your browser open http://localhost:8000/catalog
Open http://localhost:8000/catalog/categories/JSON
to see the list of categories.
{
"categories": [
{
"id": 1,
"name": "Armor"
},
...
]
}
Open http://localhost:8000/catalog/<category_name>/items/JSON
where category_name
is an existing category's name.
{
"items": [
{
"category": "Jewelry",
"description": "It induces honesty, induces wakefulness, aids certain skin problems, and enhances the sense of touch.",
"id": 1,
"image": null,
"name": "Longevity Canopic Jar"
},
...
]
}
Open http://localhost:8000/catalog/<category_name>/<item_name>/JSON
where category_name
is an existing category's name and item_name
is an existing item's name of that category.
{
"item": [
{
"category": "Jewelry",
"description": "It wards off nightmares.",
"id": 35,
"image": null,
"name": "Fortitude Sword"
}
]
}
Copyright (c) 2017 Péter Szabó. All rights reserved.
This work is licensed under the terms of the MIT license.
For a copy, see https://opensource.org/licenses/MIT.