adesege / product-details-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Product Details page

This project uses the Atomic Design pattern as described by Brad Frost in his book Atomic Design.

Building and maintaining large React applications can quickly become messy and tedious to maintain if a proper folder structure is not employed. The Atomic Design pattern helps to solve this problem by grouping components into atoms, molecules, organisms, templates and pages.

Since this project is small, only atoms folder was implemented.

  1. Typescript is used to enable static type checking
  2. Core project componets are prefixed with App to easily identify them.
  3. CSS Modules is configured to enable scoping of css styles within a component
  4. Tailwind is configured to easily use utility css classes
  5. Redux is configured for global state management. While this might be an overkill for this small project, I used it to model how it can be used in a real-life application.

Installation

$ git clone git@github.com:adesege/product-details-demo.git // to clone the project

$ cd product-details-demo // change working directory

$ npm install -g pnpm // Install pnpm globally if you don't have it installed already

$ pnpm install // Run this command to install dependencies

$ pnpm start:dev // To start the app in development environment.

// If you are deploying for production

$ pnpm build // To build the app. Copy the contents of the "build" directory to a static server. vercel.com is recommended.

Once the app is running, you can access the app on http://localhost:3900 in development environment.

See https://pnpm.js.org/en/motivation for why pnpm is used for this project.

About


Languages

Language:TypeScript 52.8%Language:JavaScript 36.6%Language:CSS 9.2%Language:HTML 1.4%