https://github.com/giladfuchs/next-ecommerce
Free, Modern, accessible monorepo e-commerce platform built with Next.js 16. Includes two standalone implementations: Payload CMSโbased and Express with a custom admin. Features a dynamic storefront and production-ready commerce flow
https://github.com/giladfuchs/next-ecommerce
ecommerce express nextjs payloadcms postgresql storefront typescipt
Last synced: about 1 month ago
JSON representation
Free, Modern, accessible monorepo e-commerce platform built with Next.js 16. Includes two standalone implementations: Payload CMSโbased and Express with a custom admin. Features a dynamic storefront and production-ready commerce flow
- Host: GitHub
- URL: https://github.com/giladfuchs/next-ecommerce
- Owner: giladfuchs
- License: mit
- Created: 2025-05-19T15:59:13.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2026-03-20T13:02:39.000Z (2 months ago)
- Last Synced: 2026-03-21T05:36:10.628Z (about 2 months ago)
- Topics: ecommerce, express, nextjs, payloadcms, postgresql, storefront, typescipt
- Language: TypeScript
- Homepage: https://payload.url-link.org
- Size: 1.9 MB
- Stars: 60
- Watchers: 1
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## ๐งฑ Payload Version
This repository contains the **Express + PostgreSQL** e-commerce template.
If you're looking for the **Payload CMS (Next.js + Payload 3)** version, see:
- [`/payload`](payload) โ Payload-based store (Next.js + Payload CMS 3)
---
# Next.js E-commerce Template ๐๏ธ
A modern, accessible e-commerce platform built with Next.js 16 (frontend) and Express + PostgreSQL (backend), designed for both customers and store administrators.
Includes a dynamic storefront, full admin dashboard, backend API, image upload, order tracking, and multilingual support (RTL & LTR).
---
## ๐ Live Preview
This project uses a mixed mock dataset of **Hebrew (RTL)** and **English (LTR)** product and category entries.
The layout is fully optimized for both directions, ensuring a seamless multilingual experience.
- **๐บ๐ธ LTR (English):** [modern-ecommerce-store.vercel.app/en](https://modern-ecommerce-store.vercel.app/en)
- **๐ฎ๐ฑ RTL (Hebrew):** [modern-ecommerce-store.vercel.app/he](https://modern-ecommerce-store.vercel.app/he)
- **๐ Admin Panel:** [modern-ecommerce-store.vercel.app/admin](https://modern-ecommerce-store.vercel.app/admin) โ includes a built-in login form
---
## โฒ Deploy Your Own
Deploy your own version of this e-commerce storefront.
[](https://vercel.com/new/clone?repository-url=https://github.com/giladfuchs/next-ecommerce)
This deploy uses Next.js route handlers (app/api) as the server.
After creating your project, make sure to go to the Vercel dashboard
and update your environment variables based on [functions/.env.example](functions/.env.example)
---
## ๐ฆ Environment Variables
To run the app locally or in production, you must configure the appropriate environment variables.
See the example files for full variable lists and inline comments:
- [`frontend/.env.example`](frontend/.env.example) โ for frontend mode
- [`functions/.env.example`](functions/.env.example) โ for Next.js API routes & Frontend
- [`backend/.env.example`](backend/.env.example) โ for Express backend mode
---
## ๐ Getting Started (for Local Development)
This project supports multiple development modes:
- **Fullstack** โ run a real backend with PostgreSQL + Express
- **Next.js API** โ use serverless functions instead of Express
- **Mock** โ use local mock data for instant setup
Choose the guide that fits your workflow:
- [๐๏ธ `frontend/README.md`](frontend/README.md) โ run the frontend with mock data or connect to a backend
- [๐ ๏ธ `backend/README.md`](backend/README.md) โ set up the Express API and database
- [โ๏ธ `functions/README.md`](functions/README.md) โ uses Next.js API routes for backend logic (no separate server needed)
---
## โจ Key Features
### ๐งโ๐ป Frontend (`/frontend`)
- ๐
Fully styled with **MUI v7**
- ๐๏ธ Dynamic storefront with product filtering and category browsing
- ๐งพ **Admin dashboard** with full model management (products, categories, orders, images)
- ๐ง SEO & Open Graph via **Next.js 16 Metadata API**
- โฟ **Accessibility bar** with font scaling and contrast settings
- ๐ **Cart and admin state managed via Redux Toolkit** with **persisted state**
- ๐งช **Playwright-based E2E tests** for key storefront and admin flows
### ๐ Backend (`/backend`)
- ๐ RESTFUL CRUD API for products, categories, orders, and images
- ๐ Token-based authentication using **JWT**
- ๐๏ธ **TypeORM + PostgreSQL** schema design
- ๐ค Image upload via **Vercel Blob** + processing with **Multer + Sharp**
- โ๏ธ Optional: email and WhatsApp order notifications
- โ
**100% test coverage** for API routes using **Vitest + Supertest**
---
## ๐งฉ Tech Stack
### Frontend
- **Next.js 16**, **React 19**, **TypeScript**
- **MUI 7**
- **Redux Toolkit** with **redux-persist**
- **AG Grid**, **Formik**, **Yup**, **react-intl**, **Sonner**
- **Playwright** for E2E testing
### Backend
- **Express.js** + **TypeScript**
- **TypeORM** with **PostgreSQL**
- **JWT** + **bcryptjs** for authentication
- **Multer** + **Sharp** for image upload & processing
- **Vercel Blob** for cloud storage
- **Nodemailer**, **SendGrid**, **CallMeBot** for notifications
- **Vitest** + **Supertest** for full API test coverage
---
## ๐ค Contributing
Contributions are welcome!
If you find this project useful, consider giving it a โญ on GitHub โ it helps others discover it!
To contribute, fork the repository and submit a pull request with your enhancements or bug fixes.
---
## ๐ License
This project is licensed under the [MIT License](./LICENSE).