Next.jsReactSaaSStarter

blc-starter-next-b2b — Next.js SaaS Template

By BlackcurrantLabs

A Next.js starter template for B2B multi-tenant scenarios, integrating Prisma, BetterAuth, and Tailwind, with built-in organization member management, admin dashboard and blog, contact form, and AI coding agent rule files.

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-03View source

What stands out

A quick read of the recorded project description.

01

Multi-tenant organization architecture: supports self-registration, creating a new organization, or joining an existing one via invitation, with member and role management

02

BetterAuth authentication: email/password, magic links, and admin roles, extensible with OAuth providers

03

Preset layouts: dedicated layout components for the landing page, user account, organization, and admin dashboard

04

Content and communication modules: admins can write public blog posts in multiple categories; contact form submissions go to an admin inbox and support email replies

05

AI coding assistance: includes AGENTS.md and .agent/rules, stating compatibility with opencode, claude code, and antigravity

06

Test scripts: Vitest for unit/integration tests, Playwright for end-to-end tests

Template Details

This is a boilerplate for starting new B2B projects. The author positions it as an opinionated technology stack and notes that it may not suit every scenario. The template centers on multi-tenant SaaS: it supports organization creation, member invitations, and role permissions; provides preset layouts for users, organizations, and super admins; and includes a public blog and contact form (customer submissions go to an admin inbox, where they can be replied to and trigger email). Authentication is handled by BetterAuth, covering email/password, magic links, and admin roles. For developer experience, it uses pnpm and Prisma, defaults to SQLite during development, and includes Vitest and Playwright test scripts. The repository also contains AGENTS.md and .agent/rules, stating compatibility with AI coding tools such as opencode, claude code, and antigravity.

Limitations and notes: The author explicitly states that this template reflects choices for their general scenarios and may not be suitable for all projects; if an organization-free B2C mode is needed, the author suggests using the B2C template from the same organization instead. The framework version numbers in the README (such as Next.js 16+, React 19+, Prisma 7+) were not checked against the dependency manifest and are not repeated item by item here. Production deployment requires preparing a proper database (such as PostgreSQL) and configuring environment variables; the development SQLite is only for quick validation. Licensing of demo images and third-party assets must be verified separately.

Next.jsSaaSStarter

Is it right for your project?

Use Cases

  • Quickly building a multi-tenant B2B SaaS prototype with organizations and membership
  • Starting from ready-made authentication, admin layouts, and database models, then extending the Prisma schema per business needs
  • Needing a public blog and contact form, with admins centrally handling customer messages
  • Teams using AI coding agents for collaboration who want coding rules and architecture documentation included in the project
  • Using SQLite for quick validation during development, then switching to a production database for deployment

Suitable For

  • Developers or small teams familiar with Next.js App Router and Prisma
  • B2B product starter projects that need multi-tenant organizations, role permissions, and an admin dashboard
  • Teams willing to accept the author's established technology choices and customize on top of them
  • Engineering teams that want test scaffolding and AI agent rule files included in the project

Getting started & customization

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

  1. 1

    Prerequisites: Node.js LTS (recommended via nvm, run nvm use in the project root) and pnpm

  2. 2

    After installing dependencies, copy .env.example to .env and fill in variables such as DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL, NEXT_PUBLIC_SITE_NAME, and RESEND_KEY

  3. 3

    Run npx prisma migrate dev --name init to initialize the database, then run pnpm dev to start the development server

  4. 4

    Development defaults to SQLite; for production, it is recommended to switch to a proper database with connection pooling (such as PostgreSQL or Neon). After changing the Prisma configuration, regenerate the client

  5. 5

    Deploying to Vercel requires configuring all environment variables in the project settings; other Node.js platforms can use pnpm build and pnpm start

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version in the public repository under the Apache-2.0 license; the free scope is the code of that 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 are permitted; when distributing, include the Apache-2.0 license.
  • Modified files must carry prominent notices of changes, and relevant copyright, patent, trademark, and attribution notices must be retained.
  • If the original project includes a NOTICE file, applicable attribution notices must be retained when distributing derivative works.
  • The license includes an applicable contributor patent grant; initiating patent litigation as described in the license terminates that patent grant, and no trademark rights are granted.
  • 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 checked under their respective licenses; they cannot be judged solely by the code's Apache-2.0 license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
  • This template targets B2B multi-tenant (with organizations) scenarios; if an organization-free B2C mode is needed, the author suggests using the other B2C template repository from the same organization instead of this template.
  • The email feature depends on the third-party Resend service; you must apply for and configure a RESEND_KEY API key, which is an external service and account requirement.
  • Development/POC defaults to SQLite; for production, the author recommends switching to a proper database such as AWS or Neon with connection pooling, requiring you to prepare an external database service.
  • The author explicitly states that this template is an established technology choice for their general scenarios and may not be suitable for all use cases.
View Original Text Basis

no-charge, royalty-free, irrevocable copyright license

Original License Text

If you need B2C (No Orgs, just end users), start from other repo at [B2C Starter](https://github.com/BlackcurrantLabs/blc-starter-next-b2c)

Original README

| `RESEND_KEY` | API key for Resend email service. |

Original README

This project is setup with sqlite for easy dev / poc. Highly recommended to setup with a proper production ready database from AWS / Neon with connection pooling.

Original README

This may not fit every use case.

Original README
https://github.com/BlackcurrantLabs/blc-starter-next-b2b/blob/main/LICENSEhttps://github.com/BlackcurrantLabs/blc-starter-next-b2b/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-04. 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 · 85 / 100
Technologies
Next.js · React
Website type
SaaS · Starter
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
2026-01-30
Screenshot last checked
2026-10-04

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-04

Inspect the recorded source material

SHA-256: d100fb9e3a1a9223f051ee4a2699d535daf9297369f31316373aa1b487dfca8c

2026-10-04T07:36:04.595Z

Source file / repository
# Blackcurrant Stack Starter Next B2B

This is a boilerplate for starting new projects. 
Multi-tenant B2B SaaS starter template built with Next.js 15+, Prisma, BetterAuth, and Tailwind 4.
It's an opionated set of frameworks and tools hand picked for our general use cases.
This may not fit every use case.

*Vibe code* friendly, includes `AGENTS.md` and `.agent/rules` 
compatible with opencode, claude code, antigravity.

Has Superadmin control with orgs and members with self signup, users can create new orgs or be invited to existing ones.
If you need B2C (No Orgs, just end users), start from other repo at [B2C Starter](https://github.com/BlackcurrantLabs/blc-starter-next-b2c)

## Features

- **Multi-tenant Architecture**: Robust organization support with membership management and role-based access control.
- **Comprehensive Authentication**: Secure auth via BetterAuth, including email/password, magic links, and admin roles.
- **Pre-built Layouts**: Context-aware layouts for Landing pages, User Accounts, Organizations, and Admin dashboards.
- **Modern UI Stack**: Built with Tailwind CSS 4, Shadcn UI components, and Radix UI primitives.
- **Developer Experience**: Optimized for speed with Prisma (SQLite for dev), pnpm, and structured AI agent guidance.
- **Blog**: Admin can write blog in many categories available for public use without signup.
- **Contact Us Page**: Customers can send requests which come to admin inbox, you can reply from there which triggers a mail to customer.

## Getting Started

### Prerequisites

- [Node.js](https://nodejs.org/) LTS nvm recommended. Do `nvm use` in project root.
- [pnpm](https://pnpm.io/) (Recommended package manager)

### Installation

1. **Clone the repository:**
   ```bash
   git clone <repository-url>
   cd blc-stack-b2b
   ```

2. **Install dependencies:**
   ```bash
   pnpm install
   ```

3. **Set up environment variables:**
   ```bash
   cp .env.example .env
   ```
   Fill in the required values in `.env` (see [Environment Variables](#environment-variables) section).

4. **Initialize the database:**
   ```bash
   npx prisma migrate dev --name init
   ```

5. **Start the development server:**
   ```bash
   pnpm dev
   ```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Customization Guide

When forking this template, follow these steps to make it your own:

1. **Branding**:
   - Update `NEXT_PUBLIC_SITE_NAME` in `.env`.
   - Replace logos in `public/` and update site metadata in `app/layout.tsx`.
   - Customize theme colors in `app/globals.css`.

2. **Authentication**:
   - Configure additional OAuth providers in `lib/auth.ts`.
   - Update `BETTER_AUTH_URL` and `TRUSTED_ORIGINS` for your environment.

3. **Database Schema**:
   - Modify `prisma/schema.prisma` to add your business-specific models.
   - Run `npx prisma migrate dev` to apply changes.

4. **Navigation & Layouts**:
   - Customize sidebar and navbar items in the respective layout components.
   - Extend the organization or admin dashboards as needed.

## Environment Variables

The application requires several environment variables to function correctly. Refer to `.env.example` for the full list.

| Variable | Description |
| :--- | :--- |
| `DATABASE_URL` | Prisma database connection string. |
| `BETTER_AUTH_SECRET` | Secret for auth encryption. |
| `BETTER_AUTH_URL` | Base URL for authentication callbacks. |
| `NEXT_PUBLIC_SITE_NAME` | The application's display name. |
| `RESEND_KEY` | API key for Resend email service. |

## Tech Stack

| Technology | Version | Description |
| :--- | :--- | :--- |
| **Next.js** | 16+ | React Framework (App Router) |
| **React** | 19+ | UI Library |
| **Prisma** | 7+ | ORM for Database Management |
| **BetterAuth** | 1+ | Authentication & Session Management |
| **Tailwind CSS** | 4 | Utility-first CSS Framework |
| **Shadcn UI** | Latest | Reusable Component Library |
| **TanStack Table** | 8+ | Headless UI for building powerful tables |

## Testing

The project includes a comprehensive testing suite using Vitest for unit/integration tests and Playwright for end-to-end tests.

```bash
# Run unit and integration tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run end-to-end tests
pnpm test:e2e
```

For more details on our testing patterns and utilities, see the [Testing Guide](.agent/rules/testing-guide.md).

## Documentation

- **AI Agent Guidance**: See `AGENTS.md` for coding patterns, rules, and architecture details.
- **Detailed Guides**: Explore `.agent/rules/` for deep dives into specific project domains (Prisma, Auth, Styling, etc.).

## Deployment

### Vercel
The easiest way to deploy is using the [Vercel Platform](https://vercel.com/new).
Ensure you set all environment variables in the Vercel project settings.

### Railway / Other
This project is compatible with any platform supporting Node.js. Use `pnpm build` and `pnpm start`. Remember to configure a production database (e.g., PostgreSQL).

## Database
This project is setup with sqlite for easy dev / poc. 
Highly recommended to setup with a proper production ready database from AWS / Neon with connection pooling.
Edit prisma config, regenerate client after change.
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.