Coder Social home page Coder Social logo

ecommerce-day-one's Introduction

eCommerce Project - Day 1

Objectives

The start of the eCommerce project for building a fully functional MongoDB, express api for a eCommerce style of application.

Resources


The domain


Most of the time in industry you are handed pretty vague requirements and expected to come up with a solution basedo on those requirements, luckily, we'll do the best to clarify what it is we are trying to build.

Most companies sell some sort of product and service. For this 3 day lab we will simulate buidling an eCommerce application.

We will start talking about some of the objects that will be needed to be stored into mongo.

Customers


First of most all eCommerce applications has a notion of a Customer. Whenever you've purchased something from an online store you usually have to provide some information about you as a Customer. Some of the information provided is your name, email address, addresses(billing and shipping), phone numbers (home, work, etc), password, and it's very common to have a way to turn a customer on or off (soft deleting, thing of something like active that is a boolean).

Products


There needs to also be notion of storing Products or Services. For this particular part, keep the Product model simple with a Name, Description, Price, and whether it's active or not (somtimes companies will want to turn things on and off).

Orders


The company will want to store various infomration about an order, for example the customer, the billing address, the shipping address, payment information, subtotal (total of items added to an order), sales tax (for now just use 7%), total (subtotal + total), products added to the order.

Order Details

An order will need to store the product that is applied to the order and the quantity of how many products the customer has added to the order. It might be handy to total up these lines (quantity * product price) to ease the subtotal calculation on the order.

Create a node project and create models for the above domain


For this project feel free to use additional frameworks to help with development.

  1. NPM install mongoose
  2. Create the models for Moongoose provided the above domain context of the application

Feel free to add any additional information to the models that will ease or enhance your solution

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.