Coder Social home page Coder Social logo

ecommerce-checkout-api's Introduction

E-Commerce Checkout Process Rest APIs

Frameworks

The backend is built using Nodejs / Expressjs framework and MongoDB Database

How to run the app

First, make sure Nodejs and npm packages are installed, then inside directory folder:

npm install
npm start

Then, you can send requests on localhost:5000

You do not have to setup MongoDB cluster as it is already running using ATLAS.

Schemas

We have 3 schemas User, Item, and Basket

Each Item has name, serialNumber, quantity, price, and availability flag. Each Basket has a list of items and related to a specific user.

Validation

  1. Validate basket items availbility
  2. Validate that total basket price is above 100.
  3. Check if the user is fraud by ensuring the total price does not exceed 1500 money value.

Credit Card Integration

We used Stripe library to be able to simulate a payment method for the items in the basket.

Design Pattern

We used MCV desgin pattern without the view part and the code is asynchronous.

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.