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
| Category | Technology |
|---|---|
| Framework | Next.js 15.3 |
| UI | React 19.1, Tailwind CSS 4, Shadcn UI |
| Language | TypeScript 5.8 |
| Auth | Clerk |
| Payments | Stripe |
| Database | Drizzle ORM, Neon PostgreSQL |
| File storage | Uploadthing |
| Animations | Motion |
| Analytics | Vercel |
| Linting & formatting | ESLint, Biome, Prettier |
| Build tool | Bun (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
- Download the starter archive
wget https://github.com/reliverse/versator/releases/download/v1.1.0/versator-ecommerce.zip -O versator-ecommerce.zip
- Extract the archive
unzip versator-ecommerce.zip -d versator
- Enter the project folder
cd versator
- Install dependencies with Bun
bun install
- Create an environment file
cp .env.example .env
- Edit the
.envfile and add the required keys for Clerk, Stripe, and Neon (see the Configuration section). - Push the database schema (creates tables in Neon)
bun db:push
- Start the Stripe webhook listener (optional, needed for payment testing)
bun dev:stripe
- Run the development server
bun dev
- Build a production version (creates the
.nextfolder)
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:
| Variable | Description |
|---|---|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Clerk publishable key (client side). |
CLERK_SECRET_KEY | Clerk secret key (server side). |
STRIPE_SECRET_KEY | Stripe secret key for API calls. |
STRIPE_WEBHOOK_SECRET | Secret used to verify Stripe webhook events. |
DATABASE_URL | Connection string for Neon PostgreSQL. |
UPLOADTHING_SECRET | Secret for Uploadthing file uploads. |
NEXT_PUBLIC_BASE_URL | Base 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/componentsor add new components withbun 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/schemaand runbun db:pushto 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:studioto open the Drizzle visual editor for the Neon database. - Use
bun latestto update all dependencies and run the project's lint/type checks. - The
env:dev,env:generate, andenv:validatescripts (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=darkin.env. - For production deployment, the built
.nextfolder can be deployed to Vercel, Netlify (Node runtime), or any server that runsnext 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.
Use this prompt with an AI coding assistant (Claude Code, Cursor, Copilot, ChatGPT and similar).
- Download the ZIP and extract it where your new project will live.
- Download the ZIP and extract it next to your project, so the assistant can read both.
- Fill in the bracketed parts under “About my project”.
- Paste the prompt into your assistant and review each change it proposes.
# Start a new project with versator ## Your task You are a senior frontend engineer. We are building a new project using versator, a web application built with Tailwind CSS 4, as the starting point. Keep its design and turn the demo into a clean, real codebase that I can maintain. ## About my project - What I'm building and for whom: [describe it] - Pages I need: [list them] - Stack: [keep it as it is, with its own build, or name one: Vite / Laravel / Next.js / Astro] - Brand: [name, colours, fonts, logo] # versator — project brief ## Source project versator is a Next.js 15.3 e‑commerce starter that uses Tailwind CSS v4 for styling. It combines React 19, TypeScript 5, Clerk authentication, Stripe integration, Drizzle ORM and other modern libraries. Repository https://github.com/reliverse/versator, license MIT (see LICENSE, author Nazar Kornienko). ## Files that matter **Pages (entry points)** - `src/app/page.tsx` – main landing page (entry page). - `src/app/dashboard/page.tsx` – admin dashboard. - `src/app/auth/page.tsx` – sign‑in / sign‑up flow. - `src/app/products/page.tsx` – product listing. - `src/app/success/page.tsx` – order success page. - `src/app/sso-callback/page.tsx` – SSO callback handling. **Stylesheets** - `src/css/globals.css` – Tailwind base, components and utilities plus custom globals. **Scripts** - `src/app/page.client.tsx` – client‑side logic for the main page. - `src/lib/*.ts` – helper functions (API, auth, Stripe, Uploadthing, etc.). **Images & fonts** - `public/*.png`, `public/*.svg` – favicons, OG image, placeholder assets. **Partials / templates** - `src/app/layout.tsx` – root layout used by all pages. - `src/app/admin/…` – admin section components. - `src/ui/components/…` – shadcn/ui component library. - `src/ui/primitives/…` – low‑level UI primitives. **Configuration** - `next.config.ts` – Next.js configuration (image domains, ESLint settings). - `postcss.config.js` – loads Tailwind via PostCSS. - `tsconfig.json` – TypeScript compiler options. - `drizzle.config.ts` – Drizzle ORM database config. - `env.config.ts` – environment variable schema (used by `fatima`). ## Setup and build The project requires a build step with Next.js. ```bash # install dependencies (bun is the default package manager) bun install # create a .env file from the example and fill required variables cp .env.example .env # optional: push database schema bun db:push # start Stripe webhook listener (if using Stripe) bun dev:stripe # start development server bun dev # create a production build bun run build ``` The production build outputs to the default `.next` directory used by Next.js. ## How it is put together The app uses a **root layout** (`src/app/layout.tsx`) that wraps every page with a common header, footer and theme provider. Each page lives under `src/app/…` and follows the new Next.js App Router conventions (a `page.tsx` file for the route, optional `page.client.tsx` for client‑only code). UI components come from **shadcn/ui** and **Radix UI** primitives, imported from `src/ui/components` and `src/ui/primitives`. These are styled with Tailwind v4 classes; dark mode is enabled via Tailwind’s `media` strategy and toggled automatically based on the user's OS preference. JavaScript initialization includes: - Clerk provider (auth) set up in the root layout. - Stripe elements initialized in `src/lib/stripe.ts` and used on checkout pages. - Drizzle ORM connections configured in `src/db/*`. - Motion animations applied via the `motion` library in various components. Theme values (colors, fonts, spacing) are defined in the Tailwind configuration (implicitly via `globals.css` and the default Tailwind v4 config). No custom RTL support is present. ## Watch out for 1. **Tailwind version mismatch** – the project expects Tailwind v4; installing v3 or v5 may break class utilities and the dark‑mode handling. 2. **Global CSS side effects** – `globals.css` applies Tailwind’s base styles globally; adding additional global selectors can unintentionally affect all components. 3. **Clerk and Stripe scripts** – the pages assume Clerk and Stripe scripts are loaded via the providers; removing them or loading different versions will cause runtime errors. 4. **Environment variables** – missing or mis‑named variables in `.env` (Clerk keys, Stripe secret, Neon DB URL) will cause the app to fail at start‑up. 5. **Database schema** – the Drizzle ORM expects the schema defined in `src/db/schema`; running the app without executing `bun db:push` first may lead to missing tables. 6. **Duplicate library imports** – some Radix components are imported both from `@radix-ui/react-*` and via shadcn wrappers; ensure you do not add another version of Radix UI to avoid duplicated bundles. ## Verify - [ ] Main landing page (`/`) renders without console errors and shows the expected hero section. - [ ] Dashboard (`/dashboard`) loads the admin layout and displays navigation links. - [ ] Authentication flow (`/auth`) shows Clerk sign‑in UI and works after providing Clerk keys. - [ ] Product list page displays products fetched from the API and is responsive. - [ ] Stripe checkout components initialize without errors when Stripe keys are set. - [ ] Dark mode toggles automatically based on system preference and applies Tailwind dark classes. - [ ] No duplicate copies of Tailwind, Radix, or Clerk libraries appear in the final bundle. - [ ] Build completes successfully (`bun run build`) and the `.next` output can be started with `next start`. # How to work ## Step 1 — Get it running as it is Start from the downloaded ZIP or a clone of the repository. Install the dependencies and start the dev server with the exact commands in "Setup and build" above. Confirm it runs without console errors before changing anything. ## Step 2 — Plan the project with me List the pages and sections of versator to keep, rename or remove for my project, the folder structure you propose for my stack, and where the repeated parts will live. Wait for my OK. ## Step 3 — Build it - Keep the pages I need, remove the rest, and replace the sample content with real content. - Extract repeated parts (header, navigation, footer) into shared partials or components. - Put my brand name, colours and fonts where versator defines its theme (see "How it is put together" above), not as one-off overrides. - Keep Tailwind CSS's markup patterns and class conventions so the design stays consistent, and don't change its major version unless I ask. - Keep dark mode working on every page you touch. ## Step 4 — Polish and launch - Remove demo content and every CSS/JS file nothing uses any more; optimise images. - Check phone, tablet and desktop widths, labels, alt text, keyboard focus and colour contrast. - Run the production build and tell me which folder to deploy. - Keep the license file and credit the author of versator. ## Ground rules Work in small steps and show me each change. Use only the libraries already in the project unless I agree to add one.



