Skip to content

EternalRival/eCommerce

Repository files navigation

eCommerce app

Table of Contents

Stack

  • NodeJS
  • NPM
  • TypeScript
  • React
  • Next JS
  • Feature Sliced Design
  • Zustand
  • Tanstack Query
  • Zod
  • Vitest jsdom Testing Library Testing Library
  • ESLint (airbnb, typescript, next, react, @stylistic/ts, tanstack/query, jest)
  • Stylelint (standard, clean-order)
  • Prettier
  • Husky Commitlint lint-staged
  • TailwindCSS
  • Material UI
  • Commercetools

Getting started

Prerequisites

Git & NodeJS

Notes

v20.11.0 version of Node.js is used

Downloading

git clone <project_url>
cd <project_dir>

Installing NPM modules

npm ci

Setting environment variables

# copy .env file to .env.local
cp .env .env.local
# get necessary data from `commercetools.com/<project>/settings/developer/api-clients` (or your project manager)
# .env notes
TBD=TBD

Run

# for dev
npm run dev

# for prod
npm run build
npm run start

Scripts

cmd Description
npm run dev Development Server at 3000 port
npm run dev:4000 Development Server at 4000 port
npm run build Build project
npm run start Project preview
npm run test Launch tests
npm run ci:lint Linting TS *(for lint-staged package only)
npm run ci:format Formatting codebase *(for lint-staged package only)
npm run ci:stylelint Linting css *(for lint-staged package only)
npm run lint Linting TS *(for manual use)
npm run format Formatting codebase *(for manual use)
npm run stylelint Linting css *(for manual use)
npm run fix Combined fix all script
npm run lint-staged Script for staged files only linter/formatter checks
npm run commitlint Linting commit messages *(for husky only)
npm run prepare Script for Husky package init