Code Monkey home page Code Monkey logo

jaweki / modern-ecommerce-product-page Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 842 KB

This repo is a solution to the E-commerce product page challenge on Frontend Mentor. Built with React.js and bundle with Vite, this Javascript built web page is fully responsive on various screen sizes and mainly implements the Context API, to store global state of the cart.

Home Page: https://modern-ecommerce-product-page.vercel.app

JavaScript 97.55% HTML 2.13% CSS 0.32%
chingu context-api ecommerce-website flexbox-css frontendmentor-challenge interactive-visualizations reactjs vite webdevelopment

modern-ecommerce-product-page's Introduction

Modern E-commerce Product Page - React.js Webpage - Frontend Mentor

This repo is a solution to the E-commerce product page challenge on Frontend Mentor. Built with React.js and bundle with Vite, this Javascript built web page is fully responsive on various screen sizes and mainly implements the Context API, to store global state of the cart. The app has mainly been styled using Tailwind CSS framework.

Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

Getting Started

clone the repo to your machine and run:

npm run dev

or

yarn dev

The challenge

User should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Open a lightbox gallery by clicking on the large product image
  • Switch the large product image by clicking on the small thumbnail images
  • Add items to the cart
  • View the cart and remove the items from it

Screenshots

Links

Build Process

Built With

  • Semantic HTML5 markup
  • Flexbox
  • Mobile-first workflow
  • Tailwind CSS Framework
  • React - JS library
  • Vite - app mobule bundler

What I learned

For an e-commerce website, its important to have a global store accesible by various webpages on the client side. Two major technologies used in React development, are Context API and React Redux toolkit. For this Project we used Context API, as it is much light weight and needs less boilerplate code for setting it up. Also, the project was single paged, hence no need to use redux.

In this app Context API, was used to store the cart contents. However, some other common use of the global state by context API, in e-commerce websites, include: theme congifuration and user wallet status.

The context API, has a context provider, that wraps around the main file in the code; in this case: App.jsx see this in the main.jsx. This provides a global access to the state variables defined in the app context.

Continued development

At the moment, the app is at a milestone of development; However, for future design implementations, this single pages e-commerce react app, could be made into a component and added into a Fullstack web app.

Ideas, of counter or exraborate thoughts on the projects are surely welcome, and can be sent via my email.

Useful resources

Author

Acknowledgements

This project was done to completion with team efforts of Jack Weru Kioni and Ben Hurst

Pair programming session was prepared by Chingu a web developers forum, that helps in boost developer growth. Chingu organizes weekly planned pair programming session which developer enroll on weekly basis, and Voyagers which developers join in teams to do a much complex tasks. Chingu is free to Join and participate, and has some premium perks it offers, which are quite affordable. see their website for more...

The challenge undertaken in this Repo project, was initially provided by Frontend Mentor. Frontend mentor provides chllenges at different developer levels from junior to intermidiate to advanced; and of course, there is free and premium versions of the challenges, with premium versions offering figma sketches. For free versions only design templates are given as snapshots.

More Resources

React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

modern-ecommerce-product-page's People

Contributors

jaweki 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.