https://github.com/blefnk/relivator-nextjs-template
β¨ Relivator: Next.js 15 React 19 eCommerce Template β² Better-Auth Polar Shadcn/UI Tailwind Drizzle ORM TypeScript TS Radix, Postgres Neon, App Router SaaS Commerce eCommerce Shop Pricing Payments Dark Mode Full Stack Free β more stars π more features
https://github.com/blefnk/relivator-nextjs-template
drizzle-orm e-commerce ecommerce next-auth nextauthjs nextjs nextjs-boilerplate nextjs-example nextjs-starter nextjs-tailwind nextjs-template nextjs14 nextjs15 radix-ui shadcn shadcn-ui starter stripe t3-stack template
Last synced: about 2 months ago
JSON representation
β¨ Relivator: Next.js 15 React 19 eCommerce Template β² Better-Auth Polar Shadcn/UI Tailwind Drizzle ORM TypeScript TS Radix, Postgres Neon, App Router SaaS Commerce eCommerce Shop Pricing Payments Dark Mode Full Stack Free β more stars π more features
- Host: GitHub
- URL: https://github.com/blefnk/relivator-nextjs-template
- Owner: blefnk
- Created: 2023-08-12T20:07:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-07T02:40:09.000Z (10 months ago)
- Last Synced: 2025-03-23T13:02:29.705Z (9 months ago)
- Topics: drizzle-orm, e-commerce, ecommerce, next-auth, nextauthjs, nextjs, nextjs-boilerplate, nextjs-example, nextjs-starter, nextjs-tailwind, nextjs-template, nextjs14, nextjs15, radix-ui, shadcn, shadcn-ui, starter, stripe, t3-stack, template
- Language: TypeScript
- Homepage: https://relivator.com
- Size: 17.4 MB
- Stars: 1,211
- Watchers: 28
- Forks: 231
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/funding.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
- awesome - blefnk/relivator-nextjs-template - π¬ relivator: next.js 15 react 19 ecommerce template β² better-auth polar shadcn/ui tailwind drizzle orm typescript ts radix, postgres neon, app router saas commerce ecommerce shop pricing payments dark mode full stack free β more stars π more features (TypeScript)
README
# π¬ relivator β’ next.js ecommerce starter
[demo](https://relivator.com) β [sponsor](https://github.com/sponsors/blefnk) β [discord](https://discord.gg/Pb8uKbwpsJ) β [github](https://github.com/blefnk/relivator) β [docs](https://deepwiki.com/blefnk/relivator-nextjs-template)
> **relivator** is a robust ecommerce template built with next.js and other modern technologies. it's designed for developers who want a fast, modern, and scalable foundation without reinventing the backend.
## stack
1. π§± **core**: [nextjs 15.3](https://nextjs.org) + [react 19.1](https://react.dev) + [ts 5.8](https://typescriptlang.org)
2. π¨ **ui**: [tailwind 4.1](https://tailwindcss.com) + [shadcn/ui](https://ui.shadcn.com)
3. π **auth**: [better-auth](https://better-auth.com)
4. π¬ **anims**: [animejs](https://animejs.com)
5. π¦ **storage**: [uploadthing](https://uploadthing.com)
6. π **analytics**: [vercel](https://vercel.com/docs/analytics)
7. 𧬠**db**: [drizzle-orm](https://orm.drizzle.team) ([pg](https://neon.tech/postgresql/tutorial)) + [neon](https://neon.tech)/(π€π)[supabase](https://supabase.com)
8. ποΈ **dx**: [eslint](https://eslint.org) + [biome](https://biomejs.dev) + [knip](https://knip.dev)
9. π **forms**: [react-form](https://tanstack.com/form) _(π w.i.p)_ + [arktype](https://arktype.io)
10. π
**tables**: [react-table](https://tanstack.com/table)
11. π **i18n**: [next-intl](https://next-intl.dev) _(π w.i.p)_
12. π **email**: [resend](https://resend.com) _(π w.i.p)_
13. π³ **payments**: [polar](https://polar.sh)
14. π **api**: [orpc](https://orpc.unnoq.com) _(π w.i.p)_
> these features define the main reliverse stack. for an alternative setupβfeaturing clerk, stripe, trpc, and moreβcheck out [versator](https://github.com/blefnk/versator).
## quick start
1. install [git](https://git-scm.com), [node.js](https://nodejs.org), [bun](https://bun.sh).
2. run:
```bash
git clone https://github.com/blefnk/relivator.git
cd relivator
bun install
copy .env.example .env
```
3. fill in the required environment variables in the `.env` file.
4. optionally, edit the `src/app.ts` file to make the app yours.
5. run:
```bash
bun db:push # populate db with schema
bun dev # start development server
bun run build # build production version
```
6. edit something in the code manually or ask ai to help you.
7. done. seriously. you're building now.
### commands
| command | description |
|-----------------|--------------------------------|
| `bun dev` | start local development |
| `bun build` | create a production build |
| `bun latest` | install latest deps |
| `bun ui` | add shadcn components |
| `bun db:push` | apply db schema changes |
| `bun db:auth` | update auth-related tables |
| `bun db:studio` | open visual db editor |
## polar integration
relivator now integrates with [polar](https://polar.sh) for payment processing and subscription management.
### features
- checkout flow for subscription purchases
- customer portal for managing subscriptions
- webhook handling for subscription events
- automatic customer creation on signup
- integration with better-auth for seamless authentication
### setup instructions
1. create an account on [polar](https://polar.sh)
2. create an organization and get an organization access token
3. configure your environment variables in `.env`:
```
POLAR_ACCESS_TOKEN="your_access_token"
POLAR_WEBHOOK_SECRET="your_webhook_secret"
POLAR_ENVIRONMENT="production" # or "sandbox" for testing
```
4. create products in the polar dashboard
5. update the product IDs in `src/lib/auth.ts` to match your polar products:
```typescript
checkout: {
enabled: true,
products: [
{
productId: "your-product-id", // Replace with actual product ID from Polar Dashboard
slug: "pro" // Custom slug for easy reference in Checkout URL
}
]
}
```
6. run `bun db:push` to create the necessary database tables
7. start the application with `bun dev`
### verification
to verify that the integration is working:
1. sign up for an account
2. navigate to the dashboard billing page (`/dashboard/billing`)
3. try subscribing to a plan
4. check that your subscription appears in the billing dashboard
5. test the customer portal by clicking "manage subscription"
### api routes
the following api routes are available for payment processing:
- `/api/payments/customer-state` - get the current customer state
- `/api/payments/subscriptions` - get user subscriptions
## notes
- relivator 1.4.0+ is ai-ready β optimized for ai-powered ides like cursor, making onboarding effortless even for beginners.
- version 1.3.0 evolved into versator, featuring [clerk](https://clerk.com) authentication and [stripe](https://stripe.com) payments. explore [versator demo](https://versator.relivator.com/en), [repo](https://github.com/blefnk/versator), or [docs](https://docs.reliverse.org/versator).
## stand with ukraine
- π help fund drones, medkits, and victory.
- π every dollar helps stop [russia's war crimes](https://war.ukraine.ua/russia-war-crimes) and saves lives.
- βΌοΈ please, [donate now](https://u24.gov.ua), it matters.
## stand with reliverse
- β [star the repo](https://github.com/blefnk/relivator) to help the reliverse community grow.
- π follow this project's author, [nazar kornienko](https://github.com/blefnk) and his [reliverse](https://github.com/reliverse) ecosystem, to get updates about new projects faster.
- π¦ [become a sponsor](https://github.com/sponsors/blefnk) and power the next wave of tools that _just feel right_.
> every bit of support helps keep the dream alive: dev tools that don't suck.
## license
mit Β© 2025 [nazar kornienko (blefnk)](https://github.com/blefnk), [reliverse](https://github.com/reliverse)