Git Product home page Git Product logo

cell.me's Introduction

cell.me

cell.me is a mock project created using React. The state is managed through Redux and Redux-Saga (for asynchronous actions) and persisted thanks to Redux-Persist. It's a SPA which manages routes through React Router. All components and utils are tested using React-Testing-Library.

The app emphasizes code reusability and performance, making use of lazy load for better code splitting and dynamic loading.

The requirements

The project is supposed to consist of two pages, a home page and a detail page. Along the app, the user should be able to interact with the different products.

Header

The Header is meant to be visible accross all the pages. It should include a button to return to the home page and a cart where the user can see how many products he has added.

Header view

When the cart is clicked, a dialog pops up, displaying the chosen items. It shows the total price for the amount of products added, the amount can be increased and reduced, and also the item can be removed from the cart.

Cart content

Home

The Home renders a list of smartphones which come from a call to an API. The API is only called the first time the user accesses the page, then it's persisted in the local storage, so subsequent renders won't trigger the call again.
There's a search input at the top right corner, so that the devices can be filtered according to their brand and/or model. The filtering is done in real-time.

For each phone there's a card with the items's brand, model, image and price (if available). If the card is clicked, the app navigates to the detail page.

Home view

Detail page

In this page we can see the breadcrumbs at the top left corner of the page, letting the user know his navigation path. Below, the details are divided into two columns, the left one where the image is shown, the right one with technical specifications and actions associated with the phone's purchase.

When the page is accessed, a call to the API is fired requesting for the item's details by sending its id, which is taken from the URL. Once the details are received, they're persisted in the local storage, so that if the user accesses this product's details again, it doesn't need to repeat the request.

At the bottom of the page we can see the smartphone configuration options, from which the user can pick one of each category. If the item is added to the cart, a bubble will pop over the cart at the top of the page, rendering the number of items contained in it.

Detail view

Commands to run the app

After running npm install, the following commands will let you interact with the application:

  • npm start sets the app up and running on localhost:3000, so you can check it out
  • npm test runs all the app tests
  • npm build generates an optimized build for production
  • npm run lint will check the app's code to spot format mistakes

cell.me's People

Contributors

erikmonjas avatar

Watchers

James Cloos avatar  avatar

Forkers

revoul

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.