https://github.com/laudep/itemcatalog
Item Catalog web app
https://github.com/laudep/itemcatalog
flask python sqlalchemy sqlite
Last synced: about 2 months ago
JSON representation
Item Catalog web app
- Host: GitHub
- URL: https://github.com/laudep/itemcatalog
- Owner: laudep
- Created: 2018-09-29T12:06:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T08:58:12.000Z (over 7 years ago)
- Last Synced: 2025-02-05T14:11:33.999Z (over 1 year ago)
- Topics: flask, python, sqlalchemy, sqlite
- Language: Python
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Item Catalog
A web application that provides a list of items within a variety of categories as well as provide a user registration and authentication system.
Everyone can view the catalog. Registered users are able to post, edit and delete their own items.
## About
This project was made as part of the Udacity [Full-stack Web Developer Nanodegree](https://www.udacity.com/course/full-stack-web-developer-nanodegree--nd004).
## Technologies
- Python
- HTML
- CSS
- Flask
- SQLAchemy
- OAuth
- Google Login
- Facebook Login
## Dependencies
### Vagrant VM
- [Vagrant](https://www.vagrantup.com/)
- [Udacity Vagrantfile](https://github.com/udacity/fullstack-nanodegree-vm)
- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
### Custom Environment
Instead of using the Udacity supplied Vagrant setup the app can run from any environment where the required dependencies are available.
- [Python 2.7](https://www.python.org/downloads/)
- [SQLite](https://www.sqlite.org/index.html)
- [SQLAlchemy](https://www.sqlalchemy.org/)
- [Flask](http://flask.pocoo.org/)
## Getting Started
### Preparation (Vagrant)
- Download and install [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
- Clone the Vagrantfile from the [Udacity Repository](https://github.com/udacity/fullstack-nanodegree-vm)
- Clone this repository into the `Vagrant` directory
- Run the VM with `vagrant up`
- Use `vagrant ssh` to login to the VM
- (Optional) run the sample data generator script (see below)
### Adding sample data
Warning: the steps below will overwrite any existing data.
The sample data generator uses the [Wikipedia API](https://pypi.org/project/wikipedia/).
Please note internet connection is required for fetching item descriptions.
To run generate sample data use the following commands:
- `pip install wikipedia` (if Wikipedia module isn't installed yet)
- `python create_sample_catalog.py`
- alternativly run `sudo python create_sample_catalog.py` to automatically install Wikipedia if needed
### Running the application
- Start the app by running `python application.py` within its root directory
- Visit [https://localhost.8000/categories](https://localhost.8000/categories) with your web browser to load it
- If the sample data generator wasn't used add a few categories and items if running for the first time
## JSON Endpoints
The JSON Endpoints are case insensitive; `JSON` and `json` can be used interchangeably.
| Data | URL |
| ---------------------- | ---------------------------------------------------------------------------- |
| All catalog categories | `/api/v1/categories/JSON` |
| Full item catalog | `/api/v1/catalog/JSON` |
| Single catalog item | `/api/v1/categories/`
`/item//JSON` |