Next.jsReactSaaSStarter

nextjs-supabase-starter — Next.js SaaS Template

By MuhammadNiazAli

A full-stack SaaS starter based on Next.js App Router and Supabase, with built-in Supabase authentication, Postgres database, Stripe subscription example, internationalization, and a Storybook component development environment, under the MIT license.

Explore the design

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

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-01View source

What stands out

A quick read of the recorded project description.

01

Supabase Auth email/password sign-in and Google OAuth sign-in

02

Protected dashboard routes and real-time user profile card

03

User profile page supports avatar upload using Supabase Storage

04

Optional Stripe billing example: pricing page, Checkout, and webhook

05

Built-in English and Urdu internationalization and light/dark theme switching

06

Vitest unit tests, Storybook component development, and GitHub Actions CI

Template Details

This is a full-stack starter template for SaaS projects, built with Next.js App Router, TypeScript, Tailwind CSS, and Supabase. The repository includes Supabase authentication (email/password and Google OAuth), a protected dashboard, a user profile page with avatar upload, a password reset flow, light/dark theme switching, and storage configuration based on Supabase Storage. The database schema and row-level security policies are centralized in supabase/schema.sql; running this script creates the required tables, the avatars storage bucket, and RLS policies.

The template also includes an optional Stripe billing example covering a pricing page, Checkout, and webhooks; the app still runs normally when Stripe is not configured. The project includes English and Urdu internationalization, responsive navigation and footer, Vitest and Testing Library unit tests, a Storybook component development environment, and GitHub Actions CI for PR checks.

Before use, you need to set up your own Supabase project and fill in environment variables; Google sign-in requires enabling the corresponding provider in Supabase Auth. Stripe-related features require additional configuration of keys, price IDs, service role key, and webhook signing secret. The repository roadmap still lists GitHub OAuth, API rate limiting, and accessibility audit as incomplete items. The code is under the MIT license and can be used free of charge for personal or commercial projects, but third-party assets such as demo images, fonts, and icons need separate license verification, and external services such as domain, hosting, database, and payment may incur separate charges.

Next.jsSaaSStarter

Is it right for your project?

Use Cases

  • Quickly scaffold a SaaS project skeleton with authentication and database
  • Learn how to integrate Next.js App Router with Supabase
  • Use as a codebase for open-source contribution practice, including good first issue labels
  • Develop and preview UI components in isolation in Storybook
  • Validate internationalization and theme switching approaches for multilingual products

Suitable For

  • SaaS developers who need ready-made authentication and database configuration
  • Beginner contributors who want to participate in open-source projects
  • Engineers looking for a highly readable, clearly structured full-stack starter template
  • Projects that need a reference implementation for Stripe subscription integration

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 and copy .env.example to .env.local

  2. 2

    Create a project on supabase.com and fill the project URL and anon key into .env.local

  3. 3

    Run supabase/schema.sql in the Supabase SQL editor to create tables, the avatars storage bucket, and row-level security policies

  4. 4

    For Google sign-in, enable the Google provider in Supabase Auth settings

  5. 5

    Stripe is optional and requires configuring STRIPE_SECRET_KEY, NEXT_PUBLIC_STRIPE_PRICE_ID, SUPABASE_SERVICE_ROLE_KEY, and STRIPE_WEBHOOK_SECRET

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 the public repository; the free scope is the code of this version and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, commercialize, and distribute the code of this version free of charge.
  • 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

  • Before use, you need to create a Supabase project on supabase.com and fill the project URL and anon key into .env.local; this is an external service dependency.
  • Stripe billing is optional, but enabling it requires registering a Stripe account and creating recurring prices; this is an external paid service dependency.
  • Stripe webhooks require configuring the Supabase service role key, which has high privileges and must be kept secure.
  • Local debugging of Stripe webhooks requires installing and using the Stripe CLI to forward events.
  • Google OAuth sign-in requires manually enabling the Google provider in Supabase Auth settings.
  • Demo images, fonts, icons, and other third-party assets must be checked against 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 separate charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Create a free project at [supabase.com](https://supabase.com)

Original README

Create a [Stripe](https://stripe.com) account and a recurring Price for your plan

Original README

Add `SUPABASE_SERVICE_ROLE_KEY` (Project Settings → API in Supabase) — needed by the webhook to write subscription status

Original README

Forward webhooks locally with the [Stripe CLI](https://stripe.com/docs/stripe-cli)

Original README

If you plan to use Google login enable the Google provider from the Supabase Auth settings

Original README
https://github.com/MuhammadNiazAli/nextjs-supabase-starter/blob/main/LICENSEhttps://github.com/MuhammadNiazAli/nextjs-supabase-starter/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-01. 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 · 88 / 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-09-08
Screenshot last checked
2026-10-01

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.

Automatically checked against source and license rules; no manual editorial review.

Inspect the recorded source material

SHA-256: 2d502f03586c01d9cefad2059eafa735e4d1415befc55b11793db38fdce8d494

2026-10-01T01:01:15.468Z

Source file / repository
# 🚀 Next.js Supabase Starter

A production ready open source starter kit for building modern SaaS apps with Next.js TypeScript Tailwind CSS and Supabase. Built to be simple enough for your first pull request and solid enough to actually ship a real product on top of.

![Next.js](https://img.shields.io/badge/Next.js-14-black)
![TypeScript](https://img.shields.io/badge/TypeScript-5-blue)
![Supabase](https://img.shields.io/badge/Supabase-Backend-3ecf8e)
![License](https://img.shields.io/badge/license-MIT-green)
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)

## Screenshots

| Light Mode | Dark Mode |
|---|---|
| ![Homepage Light](./screenshots/homepage-light.png) | ![Homepage Dark](./screenshots/homepage-dark.png) |

| Login | Sign up |
|---|---|
| ![Login](./screenshots/login.png) | ![Sign up](./screenshots/signup.png) |

## Why this starter

Most starter kits fall into one of two camps. Either they are toy examples that fall apart the moment you try to build something real or they are bloated paid templates locked behind a paywall. This project sits in the middle. It ships with real authentication a real Postgres database and a working dashboard while staying small enough to read through in one sitting.

It is also built with open source contribution in mind. The codebase is intentionally kept clean and well organized so that a beginner writing their first pull request and a senior engineer looking for a weekend project can both work in it comfortably.

## Tech stack

- [Next.js 14](https://nextjs.org/) using the App Router
- [TypeScript](https://www.typescriptlang.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Supabase](https://supabase.com/) for authentication and the Postgres database
- [Stripe](https://stripe.com/) for billing and subscriptions
- [Vitest](https://vitest.dev/) and [Testing Library](https://testing-library.com/) for unit tests
- [Storybook](https://storybook.js.org/) for isolated component development

## Features

- Email and password authentication through Supabase Auth
- Google OAuth login
- Protected dashboard route with a live user profile card
- User profile page with avatar upload (Supabase Storage)
- Stripe billing example (pricing page, Checkout, webhook)
- Password reset flow
- Dark mode toggle with saved preference
- Built in internationalization with English and Urdu support
- Responsive navbar and footer
- Unit test suite covering core components
- Storybook setup for building and previewing UI in isolation
- GitHub Actions CI that lints every pull request
- Clean and predictable folder structure that is easy to extend

## Getting started

Clone the repository and install the dependencies.

```bash
git clone https://github.com/MuhammadNiazAli/nextjs-supabase-starter.git
cd nextjs-supabase-starter
npm install
```

Copy the example environment file and fill in your own Supabase credentials.

```bash
cp .env.example .env.local
```

Start the development server.

```bash
npm run dev
```

The app will be running at [http://localhost:3000](http://localhost:3000).

## Supabase setup

1. Create a free project at [supabase.com](https://supabase.com)
2. Copy your project URL and anon key into `.env.local`
3. Open the Supabase SQL editor and run the contents of `supabase/schema.sql` to create the required tables, the `avatars` storage bucket, and all row level security policies
4. If you plan to use Google login enable the Google provider from the Supabase Auth settings

## Stripe setup (optional)

The pricing page, checkout, and webhook are opt-in — the app runs fine without Stripe configured.

1. Create a [Stripe](https://stripe.com) account and a recurring Price for your plan
2. Add `STRIPE_SECRET_KEY` and `NEXT_PUBLIC_STRIPE_PRICE_ID` to `.env.local`
3. Add `SUPABASE_SERVICE_ROLE_KEY` (Project Settings → API in Supabase) — needed by the webhook to write subscription status
4. Forward webhooks locally with the [Stripe CLI](https://stripe.com/docs/stripe-cli): `stripe listen --forward-to localhost:3000/api/webhooks/stripe`, then copy the printed signing secret into `STRIPE_WEBHOOK_SECRET`
5. In production, add a webhook endpoint in the Stripe Dashboard pointing at `https://your-domain.com/api/webhooks/stripe`, listening for `checkout.session.completed`, `customer.subscription.updated`, and `customer.subscription.deleted`

## Available scripts

| Command | What it does |
|---|---|
| `npm run dev` | Starts the app in development mode |
| `npm run build` | Builds the app for production |
| `npm run start` | Runs the production build |
| `npm run lint` | Lints the codebase |
| `npm run format` | Formats the codebase with Prettier |
| `npm test` | Runs the unit test suite |
| `npm run storybook` | Starts Storybook for component development |

## Project structure

```
src/
  app/            App Router pages including auth dashboard profile pricing and API routes
  components/     Reusable UI components and their tests and stories
  lib/            Supabase client, Supabase admin client, Stripe client, and internationalization logic
  messages/       Translation files for each supported language
  stories/        Storybook design system assets
supabase/
  schema.sql      Database schema, storage policies, and row level security policies
```

## Contributing

This project is built for the community and every contribution is welcome no matter how small. Please read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening a pull request.

If you are new to open source start with an issue labeled [good first issue](../../issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). If you are looking for something more involved check the issues labeled [help wanted](../../issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).

There are many ways to contribute beyond writing code.

- Star the repo so more people can discover it
- Fork it and use it as a base for your own project
- Report bugs through the Issues tab
- Suggest new features
- Review open pull requests
- Improve the documentation

## Roadmap

- [x] Google OAuth login
- [x] Unit tests with Vitest
- [x] i18n support with English and Urdu
- [x] Storybook setup for components
- [x] Stripe billing example
- [x] User profile page with avatar upload
- [ ] GitHub OAuth login
- [ ] Rate limiting on API routes
- [ ] Accessibility audit

Browse the [open issues](../../issues) for the full and up to date list of what is being worked on.

## License

This project is licensed under the MIT License. See [LICENSE](./LICENSE) for details. You are free to use it for personal or commercial projects.

## Maintainer

Built and maintained by [Muhammad Niaz Ali](https://github.com/MuhammadNiazAli) full stack developer working across Next.js React Native Supabase and Python automation with n8n.

If this project saved you time please consider giving it a star. It genuinely helps more contributors find the repo.
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.