Skip to content

About

A scalable React e-commerce monorepo featuring a customer storefront and admin dashboard. Built with Turborepo, Vite, Tailwind CSS, and Stripe to demonstrate modern frontend architecture and code sharing.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

292 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ E-Commerce Monorepo

A modern React-based e-commerce frontend built with Turborepo and npm Workspaces, featuring a customer storefront and an admin dashboard that share reusable UI components, API utilities, and development tooling.

Designed to demonstrate scalable frontend architecture, code sharing, and modern React development practices.


πŸ“Έ Preview

πŸŽ₯ Demo Video

e-commerce-small.mp4


✨ Features

Storefront

  • πŸ› Browse products
  • πŸ” Search and filter products
  • πŸ›’ Shopping cart
  • πŸ’³ Stripe checkout integration
  • πŸ‘€ User authentication
  • ❀️ Wishlist
  • πŸ“± Responsive design

Admin Dashboard

  • πŸ“¦ Product management
  • πŸ“ Category management
  • πŸ“Š Dashboard analytics
  • πŸ“¦ Order management
  • πŸ‘₯ User management

Shared Packages

  • Reusable UI component library
  • Shared API client
  • Shared utility functions
  • Shared Tailwind configuration

πŸ›  Tech Stack

Frontend

  • React 19
  • Vite
  • React Router
  • Tailwind CSS v4

State & Data Fetching

  • TanStack Query
  • Axios

Forms & UI

  • React Hook Form
  • Headless UI
  • React Icons
  • React Toastify
  • Recharts
  • Swiper

Payments

  • Stripe

Tooling

  • Turborepo
  • npm Workspaces
  • Oxlint
  • Prettier
  • Vitest

πŸ“ Project Structure

.
β”œβ”€β”€ apps
β”‚   β”œβ”€β”€ store
β”‚   β”‚   β”œβ”€β”€ src
β”‚   β”‚   └── package.json
β”‚   β”‚
β”‚   └── dashboard
β”‚       β”œβ”€β”€ src
β”‚       └── package.json
β”‚
β”œβ”€β”€ packages
β”‚   β”œβ”€β”€ api
β”‚   β”œβ”€β”€ ui
β”‚   β”œβ”€β”€ utils
β”‚   └── tailwind-config
β”‚
β”œβ”€β”€ package.json
β”œβ”€β”€ turbo.json
└── README.md

πŸ“¦ Workspace Packages

Package Description
packages/ui Shared React UI components used by both applications.
packages/api Axios client, API helpers, and React Query configuration.
packages/utils Shared utility functions and helpers.
packages/tailwind-config Shared Tailwind CSS configuration and theme.

πŸ— Architecture

                    Monorepo
                       β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                             β”‚
   apps/store                 apps/dashboard
        β”‚                             β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚              β”‚              β”‚
       ui             api           utils
                       β”‚
               tailwind-config

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm

Clone the repository

git clone https://github.com/your-username/e-commerce-monorepo.git

cd e-commerce-monorepo

Install dependencies

npm install

Configure environment variables

Copy the example environment files.

cp apps/store/.env.example apps/store/.env

cp apps/dashboard/.env.example apps/dashboard/.env

Fill in the required values such as:

  • API URL
  • Stripe Publishable Key
  • Any authentication credentials

Start development

Run every application simultaneously.

npm run dev

Or run a single workspace.

npm run dev --workspace=store

npm run dev --workspace=dashboard

Build

npm run build

Preview

npm run preview --workspace=store

npm run preview --workspace=dashboard

πŸ“œ Available Scripts

Command Description
npm run dev Start all applications in development mode
npm run build Build every workspace
npm run lint Run Oxlint across the monorepo
npm run format Format the repository with Prettier

πŸ“¦ Installing Dependencies

Install a dependency into a specific workspace.

npm install axios --workspace=store

Example imports.

import { Button } from '@repo/ui'
import { apiClient } from '@repo/api'

apiClient.get('/products')

πŸ’³ Stripe

The storefront integrates with Stripe for payment processing.

To test payments locally, configure your environment variables with your Stripe publishable key and backend API endpoints.


🀝 Contributing

Contributions are welcome!

If you'd like to contribute:

  1. Fork the repository
  2. Create a feature branch
git checkout -b feature/amazing-feature
  1. Commit your changes
git commit -m "Add amazing feature"
  1. Push to your branch
git push origin feature/amazing-feature
  1. Open a Pull Request

Please ensure the project builds successfully and passes linting before submitting a PR.


πŸ“„ License

This project is licensed under the MIT License.

See the LICENSE file for more information.


⭐ Support

If you found this project useful, consider giving it a ⭐ on GitHub.

About

A scalable React e-commerce monorepo featuring a customer storefront and admin dashboard. Built with Turborepo, Vite, Tailwind CSS, and Stripe to demonstrate modern frontend architecture and code sharing.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages