Git Product home page Git Product logo

shopping-cart-assigment's Introduction

Shopping Cart Assigment

The target of this project is to develop a simple Shopping Cart with the followin features:

Features:

  1. Browse products in a list.
  2. Add and remove a product to their shopping cart, as long as it is available. 3. Go back to the products list view and keep browsing.
  3. Add another product to their cart.
  4. Go to the checkout and view their cart.
  5. Modify quantity and remove the product on the checkout page.

The status of the Cart is stored in the localStorage. All products are stored in a static file in the path api/_db.json

Testing

The project contains unit tests with Jest and Enzime. The coverage is present in the most critical areas in the project.

Disclaimer

I used NextJs to take advantage of the SSR to have a good SEO during the web indexation. The first page of each search is generated with a Server-Side Rendering. The detail page of the products are created with the Static Generation during the building step.

Commands

Start the project for development yarn dev

Create the static html files yarn build

Start nextJS server for production (this has to be executed after the yarn build) yarn start

Run tests yarn test

Run tests with coverage report yarn test --coverage

shopping-cart-assigment's People

Contributors

fjn2 avatar

Watchers

 avatar

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.