Next.jsReactE-commerce

e-commerce-template — Next.js Ecommerce Template

By AmarMuric04

A full-stack e-commerce starter template based on Next.js, integrating NextAuth authentication, Drizzle ORM, and Neon PostgreSQL, providing product listing, detail, cart, and checkout skeleton.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

3 previews
Desktop homepage1 / 3
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 3

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-11View source

What stands out

A quick read of the recorded project description.

01

Next.js App Router hosts both frontend pages and API routes

02

NextAuth authentication supports Google, GitHub OAuth, and email/password login

03

Drizzle ORM defines the schema, which can be pushed to Neon or other PostgreSQL instances

04

Built-in product listing, product detail, cart, and checkout skeleton

05

Provides a mock data seed script to start with sample data

06

Includes reusable components such as product cards, cart modal, and authentication forms

Template Details

This template is a starter e-commerce application that uses Next.js for both frontend and backend. The authentication layer uses NextAuth, supporting OAuth (Google, GitHub) and email/password. The data layer uses Drizzle ORM to connect to PostgreSQL; the README uses Neon as an example managed database and notes that any PostgreSQL-compatible instance can be substituted as long as DATABASE_URL points to it.

Functionally, it covers product listing, product detail, cart, and a checkout skeleton; the checkout part requires integrating a payment provider yourself. The project provides reusable product cards, cart modal, and authentication form components, along with a mock data seed script to get the flow running without real product data. The database schema is located in the drizzle/schema directory and is pushed to the database via drizzle-kit push.

Limitations: The README marks testing as "coming soon" and does not include Playwright or React Testing Library integration; the checkout flow does not include payment implementation; whether TailwindCSS is used for styling depends on the specific configuration. The template's MIT license covers only the code itself; third-party assets such as demo images, fonts, icons, and external services like domain, hosting, database, and payment must be independently verified and paid for.

Next.jsReactE-commerce

Is it right for your project?

Use Cases

  • Learning Next.js full-stack architecture and how NextAuth and Drizzle work together
  • As a starting point for a self-hosted store, continue development after replacing product data and payment provider
  • Quickly validate product browsing and cart flow locally with mock data
  • Build an e-commerce backend structure based on a PostgreSQL-compatible database

Suitable For

  • Developers who want to build an e-commerce project based on Next.js
  • Full-stack learners who need ready-made authentication and database schema to start
  • Independent developers planning to integrate their own PostgreSQL and payment services

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    After cloning the repository, run npm install or yarn to install dependencies

  2. 2

    Create .env.local based on .env.example, configure DATABASE_URL, NEXTAUTH_SECRET, NEXTAUTH_URL; for OAuth, additionally fill in the corresponding client ID and secret

  3. 3

    Run npx drizzle-kit push to push the schema in drizzle/schema to the database

  4. 4

    Optionally run npm run seed to write mock data, or insert products yourself via SQL or a database GUI

  5. 5

    Run npm run dev and visit http://localhost:3000

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in a public repository; the free scope is the code of this version, and does not imply that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are allowed.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be verified under their respective licenses; they cannot be judged solely by the code's MIT license.
  • External services such as domain, hosting, database, payment, or AI may incur additional charges.
  • The checkout flow is only a skeleton and does not include payment implementation; you need to integrate a payment provider yourself.
  • Testing integration is not yet provided; Playwright and React Testing Library integration are marked as coming soon.
  • Whether TailwindCSS is used for styling depends on the specific configuration and is not included by default.
  • The README uses Neon as an example PostgreSQL hosting; using that service requires registering and bearing the corresponding costs.
  • OAuth login is optional; enabling Google or GitHub login requires applying for and configuring the corresponding client ID and secret.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Checkout skeleton (add your own payment provider)

Original README

Coming soon: integration with Playwright and React Testing Library.

Original README

Styling:** TailwindCSS (optional depending on setup)

Original README

Database:** PostgreSQL (hosted on [Neon](https://neon.tech))

Original README

OAuth Providers (optional)

Original README
https://github.com/AmarMuric04/e-commerce-template/blob/master/LICENSEhttps://github.com/AmarMuric04/e-commerce-template/blob/master/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-11. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 79 / 100
Technologies
Next.js · React
Website type
E-commerce
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2025-05-10
Screenshot last checked
2026-10-11

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-11

Inspect the recorded source material

SHA-256: 9256bd1d6978132c27af8705f6ef1da486f6787d05dc5069ea5206568a0d34d1

2026-10-11T06:30:37.164Z

Source file / repository
# 🛒 Full Stack E-Commerce App (Next.js + NextAuth + PostgreSQL + Drizzle)

A full-featured e-commerce web application built with **Next.js** for both frontend and backend, powered by **NextAuth** for authentication (OAuth + Credentials), and backed by a **PostgreSQL** database using **Drizzle ORM** hosted on **Neon**.

This project is **ready-to-use**, modular, and easy to configure. Whether you want to use **mock data** for testing or connect it with **real products**, it's just a few steps away.

---

## 🔧 Tech Stack

- **Frontend:** Next.js (App Router)
- **Backend:** Next.js (API Routes)
- **Authentication:** NextAuth.js (OAuth + Credentials)
- **ORM:** Drizzle ORM
- **Database:** PostgreSQL (hosted on [Neon](https://neon.tech))
- **Styling:** TailwindCSS (optional depending on setup)
- **Deployment Ready:** Vercel / Docker / Custom hosting

---

## 🚀 Getting Started

### 1. Clone the Repository

```bash
git clone https://github.com/amarmuric04/e-commerce-template.git
cd e-commerce-template
```

### 2. Install Dependencies

```bash
npm install
# or
yarn
```

### 3. Set Up Environment Variables

Create a `.env.local` file based on the provided `.env.example`:

``env
DATABASE_URL=postgresql://user:password@host/dbname
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000

# OAuth Providers (optional)
GITHUB_ID=your_github_client_id
GITHUB_SECRET=your_github_client_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
```

### 4. Push Schema to the Database

If using Drizzle with Neon:

```bash
npx drizzle-kit push
```

Alternatively, if you're using your own PostgreSQL setup, just make sure `DATABASE_URL` is set correctly and run the same command.

### 5. Use Mock or Real Data

You can choose to populate your database with mock data:

```bash
npm run seed
```

Or manually insert your own data via a GUI (like Neon dashboard) or SQL tool.

### 6. Start the App

```bash
npm run dev
# or
yarn dev
```

Visit **http://localhost:3000** to see it in action.

---

## 🧩 Features

- 🔐 **Authentication**
  - OAuth (Google, GitHub)
  - Email + Password (Credentials)
- 🗂️ **Reusable Components**
  - Product cards, cart modal, auth forms
- 📦 **E-Commerce Essentials**
  - Product listing, detail page
  - Cart functionality
  - Checkout skeleton (add your own payment provider)
- 🛠️ **Database Ready**
  - Drop-in schema support with Drizzle
  - Easily seed with mock data

---

## 🗃️ Database Setup (Drizzle + Neon)

Schema lives inside the `drizzle/schema` directory.

- Run migrations:
  ```bash
  npx drizzle-kit push
  ```
- Preview schema or explore your tables using Neon dashboard or `psql`.

---

## 🧪 Testing (Optional)

Coming soon: integration with Playwright and React Testing Library.

---

## 📦 Deployment

- [ ] Ready for Vercel out of the box
- [ ] Environment variables configured in the Vercel dashboard
- [ ] You can also deploy via Docker or any Node host

---

## 📁 Project Structure

``
/app               → Next.js App Router pages
/components        → UI components
/lib               → Utils (auth, db, helpers)
/drizzle           → ORM schema and config
/pages/api/auth    → NextAuth configuration
/public            → Static assets
/styles            → Global styles (optional)
``

---

## 🙋 FAQ

**Q: Can I use my own database?**  
Yes! As long as it’s PostgreSQL-compatible, just change `DATABASE_URL` and run `npx drizzle-kit push`.

**Q: How do I add products?**  
Either use the mock data seed script or use your own admin interface / direct SQL insert.

**Q: Can I add my own OAuth providers?**  
Yes, just update the `.env.local` and NextAuth config under `/pages/api/auth/[...nextauth].ts\`.

---

## 📬 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.

---

## 📄 License

MIT

---

Made with ❤️ using Next.js, Drizzle, and Neon.
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.