Skip to content

Developed a content management system using the Flask framework in Python. Authentication is provided via OAuth and all data is stored within a PostgreSQL database.

Notifications You must be signed in to change notification settings

chatla92/Catalog

Repository files navigation

Amazon Catalog app

Description

Developed a content management system using the Flask framework in Python. Authentication is provided via OAuth and all data is stored within a PostgreSQL database.

Features

  • Users are allowed to view information on products without being logged. However, to add an item and its reviews on amazon the user shoould be logged in.

Home

  • Upon clicking a category in the left column, the user is taken to a page with list of all products in the category

Category

  • Upon clicking on a product, either in the home page for the category page, the user is redirected to page with information related to the particular product

Product_public

  • In the product page, if the user is logged and is the owner of that particular entry then the user can edit or delete the product

Product_logged_in

  • User can edit individual details of the product.

Edit

  • User can also delete the whole product info

Delete

  • API endpoints are provided to either access information of a particular product or all products in a category or just list the categories available

Product API
Category

URI End Points Template used Description
/
/catalog
catalog.html Takes user to the Home page
/login login.html Takes user to the Login page
/user/add user_add.html Create new user
/catalog/<int:categ_id>/ category.html,
public_category.html
Lists of all Products in a category
/catalog/<int:categ_id>/products/<int:product_id> product_show_public.html,
product_show.html
Shows information regarding a particular product
/catalog/new new_product.html Adding a new product
/catalog/<int:categ_id>/products/<int:product_id>/edit edit_product.html Edit a product
/catalog/<int:categ_id>/products/<int:product_id>/delete delete_product.html Delete a product
/catalog/<int:cat>/JSON N/A API endpoint to list all the products in a category in JSON format
/catalog/<int:cat>/products/<int:product_id>/JSON N/A API endpoint for details on a particular product in JSON format
/catalog/JSON N/A API endpoint to list all the categories

Login Credentials

Some Usernames already in the database
amazdnu, AmazonCustomer, AllyMG, Gena, AWG, ahoffoss, James
Default password for the above users is 1234

Requirements

The Python requirements are given in the file python_requirements.txt

The server should be run on a Vagrant VM. The required vagrant files are

Vagrantfile
pg_config.sh

Data

The Dataset for the project has been collected from SNAP.

A reduced Amazon Electronics Dataset was used which can be found here elec.json.

gen_database.py uses the information present in elec.json cleans the data and saves it in amazon.txt.

Database is setup using database_setup.py with sqlite as database engine. populator.py along with amazon.txt is then used to populate the database.

About

Developed a content management system using the Flask framework in Python. Authentication is provided via OAuth and all data is stored within a PostgreSQL database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published