/next-ecommerce

Modern, accessible e-commerce platform built with Next.js 15 and Express. Full admin dashboard, dynamic storefront, and backend API with TypeORM, PostgreSQL, and JWT auth

Primary LanguageTypeScriptMIT LicenseMIT

Next.js E-commerce Template ๐Ÿ›๏ธ

A modern, accessible e-commerce platform built with Next.js 15 (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.


โ–ฒ Deploy Your Own

Deploy your own version of this e-commerce storefront.

Deploy with Vercel

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


๐Ÿ“ฆ 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:


๐Ÿš€ 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:


โœจ 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 15 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 15, 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.