Code Monkey home page Code Monkey logo

everlane's Introduction

Everlane Sample App

This is a working sample project that solves the specifications from Everlane's take home project. The decisions for using Django were twofold: familiarity of use and ease of rapidly building and testing database models.

SQLite3 was used because of ease of installation and use. Considering that this project is expected to run on an ambiguous set of computers, the decision was made to pick a lightweight DB. If this were a production-grade application, PostgreSQL or MySQL would have been used because these implementations can handle much larger datasets. Either way, with Django it's relatively painless to port over databases and implement raw SQL statements if needed.

Several API endpoints and database models were created. This could be worked on further, but I made the decision to stop work after the main features were implemented.

Installing the project

  • Ensure that Python 2.7.x is installed on your machine.
  • Ensure that you have pip installed.
  • Clone this repo.
  • cd into the repo.
  • run pip install -r requirements.txt.
  • Run python manage.py migrate from the top level directory.

To Run Tests

  • run python manage.py test

For Database Management

  • Run python manage.py createsuperuser to create an administrator account.
  • Run python manage.py runserver and head to http://127.0.0.1:8000/admin (or wherever the server is running).
  • Log in with the newly created admin account and start adding users, shopping carts, and products.

API Usage

  • python manage.py add_to_cart <user_id> <product_id> <product_quantity>
  • python manage.py remove_from_cart <user_id> <product_id>
  • python manage.py purchase <user_id>
  • python manage.py view_purchase_history <user_id>

everlane's People

Contributors

alekhinen avatar

Watchers

James Cloos avatar  avatar

everlane's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.