Skip to content

Capturing amazon's free shipping with the power of community.

Notifications You must be signed in to change notification settings

ZivFarin/AmazonUs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazonus banner

Capturing amazon's free shipping with the power of community

This project was built as part of our internship at Microsoft and the Open University of Israel.
In this project we built a functioning web service based on the following technologies:

  • Flask
  • Python
  • PostGress
  • React

While using the following API's:

  • Firebase
  • PayPal

What the project do?

This project let's a user (costumer) to upload an item from Amazon which doesn't meet the requirement for free shipping to our web service for him to be paired with one (or more) other items in order to get the free shipping discount. We would love for you to shop with us, AmazonUs

Team Members

  • Frontend:
    Dvir Bar Marziano
    Omri Steinberg
  • Backend:
    Eitan Bar Shimon
    Elad Zaltsman
    Ziv Farin

Table Of Contents

Required Installations

  • Download python
    • Python packages
      • pip install pipenv
  • Download PostgreSQL (this might save you some searching...).
    • Leave the 'PG-admin' option CHECKED!!!!! (just leave all of them checked...)
    • In the second 'check the wanted options' I've checked every thing except the already installed option in it's latest version - in 64 bits. Skip this at your own peril.
    • Make all DB related passwords '12345678', otherwise - go with the defaults.
  • Download Postman (which is used to "automate" api calls to the backend without needing a frontend or even a browser)

Preparing the project

  • Clone this project from this GitHub repo.
  • Running the backend
    • Preparing the backend server
      • In the terminal - cd into "backend" folder
      • Run pipenv install which will download and install all of this project's dependencies into an environment.
    • Running the backend server
      • Inside the backend folder - run pipenv shell flask run.
        It's better to keep this terminal open and open another one for the frontend using VSCode's 'split terminal feature.
      • Use a 'GET' request in postman on 'http://localhost:5000' just to see you get a valid responses.
        If you did - it works.
    • Preparing the DB:
      • Follow the instructions in the backend video from about 09:40 and on regarding how to set up a DB on your computer.
        Note that your password should be '12345678' and the DB name should be 'amazonus'. Just keep on using these throughout the setup process.
        I recommend doing the sql server set up and postman actions with him until everything is working.
  • Running the Frontend
    • If you already have react installed on your computer - just navigate into the frontend folder and run npm start (you should do this after the server is running).

Database setup

  • Running the reset script

    • Do not run this script on your own! This script will reset all the tables in the DB and will re-add the mock data. Only run this script after receiving team approval!
      • In the terminal - cd into "backend/DB" folder.
      • Run python dbsetup.py.
  • Setting the DB in pgAdmin4

    • In pgAdmin4 in the top left, right click Servers. Then click Register -> Server....
    • In the 'General' tab, set the 'Name' field to amazonus.
    • In the 'Connection' tab
      • Set the 'Host name/address' field to amazonus.cjtaog2z5fsh.eu-north-1.rds.amazonaws.com.
      • Set the 'Password' field to 12345678.
      • Make sure that 'Port' is set to 5432, and that 'Username' is set to postgres.
    • Click Save.

    Database design

    Amazonus banner

    To initiate DB creation, run python3 create_basic_db.py from the project root.

About

Capturing amazon's free shipping with the power of community.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published