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.
e-commerce-small.mp4
- π Browse products
- π Search and filter products
- π Shopping cart
- π³ Stripe checkout integration
- π€ User authentication
- β€οΈ Wishlist
- π± Responsive design
- π¦ Product management
- π Category management
- π Dashboard analytics
- π¦ Order management
- π₯ User management
- Reusable UI component library
- Shared API client
- Shared utility functions
- Shared Tailwind configuration
- React 19
- Vite
- React Router
- Tailwind CSS v4
- TanStack Query
- Axios
- React Hook Form
- Headless UI
- React Icons
- React Toastify
- Recharts
- Swiper
- Stripe
- Turborepo
- npm Workspaces
- Oxlint
- Prettier
- Vitest
.
βββ apps
β βββ store
β β βββ src
β β βββ package.json
β β
β βββ dashboard
β βββ src
β βββ package.json
β
βββ packages
β βββ api
β βββ ui
β βββ utils
β βββ tailwind-config
β
βββ package.json
βββ turbo.json
βββ README.md
| 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. |
Monorepo
β
ββββββββββββββββ΄βββββββββββββββ
β β
apps/store apps/dashboard
β β
ββββββββββββββββ¬βββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββ
β β β
ui api utils
β
tailwind-config
- Node.js 18+
- npm
git clone https://github.com/your-username/e-commerce-monorepo.git
cd e-commerce-monoreponpm installCopy the example environment files.
cp apps/store/.env.example apps/store/.env
cp apps/dashboard/.env.example apps/dashboard/.envFill in the required values such as:
- API URL
- Stripe Publishable Key
- Any authentication credentials
Run every application simultaneously.
npm run devOr run a single workspace.
npm run dev --workspace=store
npm run dev --workspace=dashboardnpm run buildnpm run preview --workspace=store
npm run preview --workspace=dashboard| 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 |
Install a dependency into a specific workspace.
npm install axios --workspace=storeExample imports.
import { Button } from '@repo/ui'import { apiClient } from '@repo/api'
apiClient.get('/products')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.
Contributions are welcome!
If you'd like to contribute:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature- Commit your changes
git commit -m "Add amazing feature"- Push to your branch
git push origin feature/amazing-feature- Open a Pull Request
Please ensure the project builds successfully and passes linting before submitting a PR.
This project is licensed under the MIT License.
See the LICENSE file for more information.
If you found this project useful, consider giving it a β on GitHub.