GithubHelp home page GithubHelp logo

mini-store-task-mohamed-gamal's Introduction

This is my implementation of an assessment task. The task required an implementation as per a provided design to fetch data from the GraphQL endpoint and to provide an interface to view and interact with this data.

On the product listing page users can navigate between different categories to view the products which can be added directly to the cart if they are available (in-stock) and require no selection for additional options (attributes), also by clicking on any product the user will be directed to the product description page.
On the product description page, users can add the product to the cart if it's available (in stock) and all the options (attributes) are selected. Users can also change the currency and view the cart to modify, add, or remove any item.

Usage

Link for the live version: Mini Store

Install dependencies via npm: npm install
The app can be served on Localhost which can be done via npm script: npm start

Notes

The live version is connected to a GraphQL API endpoint to fetch the data, so please note that if the app will be served locally an API endpoint must be provided either by adding it to .env.local file or by serving it locally at http://localhost:4000

The cart data or any user selections aren't stored on a server nor cached locally and so please note that reloading the page will lead to the loss of all the progress (cart data and any selection).

It was required for the app to be built with React using only class-based components and limiting the usage of additional external libraries and thus:

  • An implementation using only React's Context API (for state management) currently lives in "without-router" branch and it's live version can be found in the Environments section as Preview.
  • The main implementation using React-Router (for routing as SPA) and React's Context API (for state management) currently lives in "main" branch and it's live version can be found in the About section or in Environments section as Production.

mini-store-task-mohamed-gamal's People

Contributors

mohamed-abdelfattah 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.