Skip to content
E-commerce Tailwind CSS 4 next.jsreacttypescriptclerk

Next.js E-commerce Template with Tailwind 4 and Clerk Auth - versator

A starter kit for building modern e-commerce sites with Next.js, Tailwind CSS, and Clerk authentication. Ideal for developers looking to launch an online store quickly.

By reliverse reliverse/versator 45 stars

Introduction

versator is a starter kit for building modern e‑commerce sites with Next.js 15, React 19, TypeScript 5, and Tailwind CSS 4. It includes ready‑made integrations for Clerk authentication, Stripe payments, Drizzle ORM with Neon, Uploadthing file uploads, Shadcn UI components, and motion animations. The project is licensed under the MIT License.

What this project offers

  • A complete Next.js application layout for an online store.
  • Built‑in authentication with Clerk.
  • Stripe webhook support for payment processing.
  • Database layer using Drizzle ORM and Neon PostgreSQL.
  • File upload handling via Uploadthing.
  • UI components from Shadcn UI styled with Tailwind 4.
  • Motion‑based animations and Vercel analytics.
  • Dark‑mode support out of the box.

Main features

  • Clerk auth integration – secure sign‑in, sign‑up, and user management.
  • Stripe webhook support – ready for payment events.
  • Drizzle ORM + Neon – type‑safe database access.
  • Uploadthing – easy file uploads.
  • Shadcn UI components – pre‑styled, accessible UI building blocks.
  • Motion animations – smooth UI transitions.
  • Vercel analytics – performance monitoring.
  • Tailwind 4 styling – utility‑first CSS with dark‑mode enabled.
  • TypeScript 5.8 – strict typing throughout the codebase.

Technology stack

CategoryTechnology
FrameworkNext.js 15.3
UIReact 19.1, Tailwind CSS 4, Shadcn UI
LanguageTypeScript 5.8
AuthClerk
PaymentsStripe
DatabaseDrizzle ORM, Neon PostgreSQL
File storageUploadthing
AnimationsMotion
AnalyticsVercel
Linting & formattingESLint, Biome, Prettier
Build toolBun (used for scripts)

Requirements

  • Node.js 20 or newer
  • Bun 1.0 or newer (used for running the provided scripts)
  • Environment variables for Clerk, Stripe, and Neon (see the Configuration section)

Installation

  1. Download the starter archive
wget https://github.com/reliverse/versator/releases/download/v1.1.0/versator-ecommerce.zip -O versator-ecommerce.zip
  1. Extract the archive
unzip versator-ecommerce.zip -d versator
  1. Enter the project folder
cd versator
  1. Install dependencies with Bun
bun install
  1. Create an environment file
cp .env.example .env
  1. Edit the .env file and add the required keys for Clerk, Stripe, and Neon (see the Configuration section).
  2. Push the database schema (creates tables in Neon)
bun db:push
  1. Start the Stripe webhook listener (optional, needed for payment testing)
bun dev:stripe
  1. Run the development server
bun dev
  1. Build a production version (creates the .next folder)
bun run build

The build command runs next build as defined in package.json. After a successful build, the compiled output is placed in the .next directory, ready for deployment to a Node‑compatible host (e.g., Vercel).

Configuration

The project uses a single .env file. The following variables are required:

VariableDescription
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYClerk publishable key (client side).
CLERK_SECRET_KEYClerk secret key (server side).
STRIPE_SECRET_KEYStripe secret key for API calls.
STRIPE_WEBHOOK_SECRETSecret used to verify Stripe webhook events.
DATABASE_URLConnection string for Neon PostgreSQL.
UPLOADTHING_SECRETSecret for Uploadthing file uploads.
NEXT_PUBLIC_BASE_URLBase URL of the deployed site (used in emails, redirects, etc.).

Copy the example file, fill in each value, and save. The project also supports additional optional variables documented in env.config.ts.

Customizing the project

  • UI changes – edit Tailwind classes in any component under src/ui/components or add new components with bun ui.
  • Page layout – modify files in src/app (e.g., src/app/dashboard, src/app/products).
  • Global styles – edit src/css/globals.css.
  • Database schema – adjust src/db/schema and run bun db:push to apply changes.
  • Authentication flow – customize Clerk settings in src/lib/auth.ts.
  • Stripe integration – update webhook handling in src/lib/stripe.ts.

Project structure

LICENSE
README.md
bun.lock
package.json
next.config.ts
postcss.config.js
tsconfig.json
public/
  └─ (static assets, favicons, og-image.png)
src/
  ├─ app/
  │   ├─ admin/
  │   ├─ api/
  │   ├─ auth/
  │   ├─ dashboard/
  │   ├─ layout.tsx
  │   ├─ page.tsx
  │   └─ … (other route folders)
  ├─ css/
  │   └─ globals.css
  ├─ db/
  │   ├─ index.ts
  │   └─ schema/
  ├─ lib/
  │   ├─ auth.ts
  │   ├─ stripe.ts
  │   └─ uploadthing.ts
  └─ ui/
      ├─ components/
      └─ primitives/

Tips

  • Run bun db:studio to open the Drizzle visual editor for the Neon database.
  • Use bun latest to update all dependencies and run the project's lint/type checks.
  • The env:dev, env:generate, and env:validate scripts (provided by fatima) help manage environment variables safely.
  • Dark mode is enabled automatically; you can toggle it in the UI or by setting NEXT_PUBLIC_THEME=dark in .env.
  • For production deployment, the built .next folder can be deployed to Vercel, Netlify (Node runtime), or any server that runs next start.

License and attribution

The project is released under the MIT License. See the full license file at LICENSE.

Original repository: https://github.com/reliverse/versator

When redistributing, keep the LICENSE file and retain the copyright notice for Nazar Kornienko (blefnk) and Reliverse.