Next.jsReactAdmin dashboardSaaSStarter

nextjs-saas-starter — Next.js Admin dashboard Template

By Viprasol-Tech

A SaaS starter based on Next.js App Router, including a marketing landing page, pricing and per-seat billing logic, an auth-ready dashboard shell, usage statistics, and dark mode.

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

What stands out

A quick read of the recorded project description.

01

Marketing landing page includes feature highlights, testimonials, FAQ accordion, and pricing cards

02

lib/pricing.ts provides per-seat totals, annual savings, and prorated billing calculations for mid-cycle seat additions or plan changes

03

Dashboard shell includes stat cards, usage progress bars, and a recent activity feed

04

lib/session.ts provides session creation and expiration, role hierarchy, and permission checks, and can be replaced with your own authentication provider

05

Dark mode is implemented via a no-flash bootstrap script and a persistable ThemeToggle

06

Includes 123 Vitest unit and component rendering tests covering each lib module

Template Details

This is a starter template for SaaS products, built with Next.js App Router and TypeScript strict mode. The project provides a marketing landing page (with feature highlights, testimonials, FAQ accordion, and a functional pricing display), a dashboard shell at /dashboard, and billing and settings pages.

The template extracts reusable business logic into pure function modules: lib/pricing.ts handles annual savings, per-seat totals, and prorated billing for mid-cycle seat additions or plan changes; lib/usage.ts calculates usage ratios, tiers, remaining quota, and metrics requiring attention; lib/activity.ts generates relative timestamps and an activity feed sorted by recency; lib/session.ts provides session creation/expiration, role hierarchy, and permission checks; lib/theme.ts handles theme resolution and toggling. The component layer includes PricingCard, StatCard, UsageBar, ActivityFeed, DashboardNav, ThemeToggle, Faq, and Testimonials.

It is important to note: the template itself does not include a database, a real authentication provider, a payment gateway, or email flows. The README roadmap lists Stripe checkout adapter, database adapter examples, email and invitation flows, and end-to-end tests as to-dos. Therefore, it provides an interface shell and testable business logic; integrating real services requires replacing interfaces such as getCurrentUser. The repository is under the MIT license, and the free scope is limited to this version of the code; third-party assets such as demo images, fonts, and icons, as well as external services, require separate license and cost verification.

Next.jsAdminSaaSStarter

Is it right for your project?

Use Cases

  • Need a SaaS frontend starting point with a pricing page and dashboard shell, then integrate your own database and authentication
  • Want to reuse per-seat billing and prorated calculation logic for mid-cycle plan changes
  • Need usage metering display (ratios, tiers, remaining quota, metrics requiring attention) and activity feed components
  • Set up a (dashboard) route group with sidebar and dark mode for an admin interface

Suitable For

  • Frontend or full-stack developers using Next.js App Router and TypeScript
  • SaaS projects planning to integrate their own database, authentication, and payment services
  • Teams needing unit-testable billing and usage logic as a reference implementation

Getting started & customization

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

  1. 1

    Run npm install, then npm run dev, and visit http://localhost:3000; the dashboard is at /dashboard

  2. 2

    Use npm run typecheck for strict type checking, and npm test to run Vitest tests

  3. 3

    The template does not include real authentication or a database; replace getCurrentUser in lib/session.ts and integrate your own identity provider

  4. 4

    Stripe checkout, database adapter, email and invitation flows, and Playwright end-to-end tests are not yet implemented and are on the roadmap

  5. 5

    The MIT license covers only this version of the code; demo images, fonts, icons, and external services require separate license and cost verification

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This listing covers the free version of the public repository under the MIT license; the free scope is limited to this version of the code 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 of this version of the code are permitted.
  • When distributing copies or substantial portions of the code, retain the original 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

  • The template does not include a database or a real authentication provider; you must integrate your own database and identity provider before using it in a real product.
  • The session flow is an auth-ready placeholder implementation; you must replace getCurrentUser to integrate your own identity provider, otherwise there is no real login capability.
  • The Stripe payment checkout adapter is not yet implemented and is listed as a to-do on the roadmap; integrating real payments requires your own development.
  • Database adapter examples are not yet provided; you need to write your own data persistence layer.
  • Email and invitation flows are not yet implemented; related features require your own development.
  • End-to-end tests are not yet provided; only Vitest unit and component rendering tests are available.
  • Demo images, fonts, icons, and other third-party assets must be verified under 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 additional charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Bring your own database and auth provider and you are ready to ship.

Original README

Replace `getCurrentUser` in `lib/session.ts` with a read from your identity provider

Original README

- [ ] Stripe checkout adapter

Original README

- [ ] Database adapter (Drizzle/Prisma) examples

Original README

- [ ] Email + invite flows

Original README

- [ ] End-to-end tests (Playwright)

Original README
https://github.com/Viprasol-Tech/nextjs-saas-starter/blob/main/LICENSEhttps://github.com/Viprasol-Tech/nextjs-saas-starter/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-02. 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
Admin dashboard · 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-01
Screenshot last checked
2026-10-02

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: 9d09396b8487a47509ea16b2d366f00aeb1394db5722b8524a7a70ef69c883b0

2026-10-02T14:04:19.311Z

Source file / repository
<div align="center">
  <img src="docs/assets/logo.png" alt="Viprasol Tech" width="120" />

  <h1>Next.js SaaS Starter</h1>

  <p><strong>Pricing &amp; billing math, a real dashboard, usage metering, an auth-ready session flow, and dark mode — start shipping features, not boilerplate.</strong></p>

  <p>Built and maintained by Viprasol Tech</p>

  <p>
    <a href="https://github.com/Viprasol-Tech/nextjs-saas-starter/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT" /></a>
    <a href="https://github.com/Viprasol-Tech/nextjs-saas-starter"><img src="https://img.shields.io/badge/Next.js-14-black.svg?logo=next.js" alt="Next.js 14" /></a>
    <a href="https://github.com/Viprasol-Tech/nextjs-saas-starter"><img src="https://img.shields.io/badge/TypeScript-strict-3178c6.svg?logo=typescript&logoColor=white" alt="TypeScript strict" /></a>
    <a href="https://github.com/Viprasol-Tech/nextjs-saas-starter"><img src="https://img.shields.io/badge/tests-123%20passing-brightgreen.svg" alt="123 tests passing" /></a>
    <a href="https://github.com/Viprasol-Tech/nextjs-saas-starter"><img src="https://img.shields.io/badge/version-0.2.0-blueviolet.svg" alt="version 0.2.0" /></a>
  </p>
</div>

---

A lightweight, opinionated starting point for a SaaS product built on the Next.js App Router and TypeScript (strict mode). It ships a marketing landing page with working pricing, an authenticated dashboard with stat widgets and a usage/activity view, billing pages with real proration math, and well-tested logic modules — so you can drop in your own database and auth provider with confidence.

## ✨ Features

- 🧱 **App Router (Next.js 14)** — clean root layout with a `(dashboard)` route group.
- 💳 **Billing math** in `lib/pricing.ts` — annual savings, per-seat totals, and prorated charges for mid-cycle seat adds and plan changes.
- 📊 **Dashboard** — stat widgets, usage progress bars, and a recent-activity feed.
- 📈 **Usage metering** in `lib/usage.ts` — ratios, severity levels, remaining allowance, and attention filtering.
- 🕑 **Activity feed** helpers in `lib/activity.ts` — relative timestamps and recency sorting.
- 🔐 **Auth-ready session flow** in `lib/session.ts` — session creation/expiry, role hierarchy, and permission checks.
- 🌙 **Dark mode** — a no-flash bootstrap script and a persistent `<ThemeToggle>`.
- 💬 **Marketing sections** — feature highlights, testimonials, and an FAQ accordion.
- 🎨 **Tailwind CSS** preconfigured with a brand palette and `class`-based dark mode.
- ✅ **Fully tested** — 123 Vitest tests covering every lib module plus component render tests under jsdom.

## 🚀 Quickstart

```bash
npm install
npm run dev
```

Open [http://localhost:3000](http://localhost:3000). The dashboard lives at `/dashboard`.

```bash
npm run typecheck   # tsc --noEmit (strict, zero errors)
npm test            # vitest run (123 tests)
```

## 📦 What's included

| Area | Module | Highlights |
| --- | --- | --- |
| Pricing & billing | `lib/pricing.ts` | `seatTotal`, `prorateUpgrade`, `proratePlanChange`, `computeAnnualSavings`, `formatPrice` |
| Usage metering | `lib/usage.ts` | `usageRatio`, `usageLevel`, `usageRemaining`, `metricsNeedingAttention` |
| Activity | `lib/activity.ts` | `relativeTime`, `recentActivity`, `sortByRecency`, `countByKind` |
| Sessions & roles | `lib/session.ts` | `createSession`, `isSessionExpired`, `hasRole`, `canManageBilling` |
| Theme | `lib/theme.ts` | `resolveInitialTheme`, `toggleTheme`, `themeBootstrapScript` |
| Components | `components/` | `PricingCard`, `StatCard`, `UsageBar`, `ActivityFeed`, `DashboardNav`, `ThemeToggle`, `Faq`, `Testimonials` |
| Pages | `app/` | Landing, dashboard overview, billing, settings |

### Project structure

```
app/
  layout.tsx                  # root layout + dark-mode bootstrap
  page.tsx                    # landing: hero, pricing, testimonials, FAQ
  globals.css
  (dashboard)/
    layout.tsx                # auth-gated shell with sidebar
    dashboard/
      page.tsx                # stat widgets, usage bars, activity feed
      billing/page.tsx        # seat + proration math
      settings/page.tsx       # profile, permissions, danger zone
components/                   # presentational + client components
lib/                          # pure, unit-tested logic
tests/                        # vitest unit + render tests (jsdom)
```

## 🧮 Billing math example

```ts
import { getPlan, prorateUpgrade, proratePlanChange } from "@/lib/pricing";

const pro = getPlan("pro")!;
const scale = getPlan("scale")!;

// Add 2 seats with 15 of 30 days left in the period:
prorateUpgrade(pro, "monthly", { addedSeats: 2, daysRemaining: 15 });

// Upgrade 5 seats from Pro to Scale mid-cycle (positive = owed):
proratePlanChange(pro, scale, "monthly", { daysRemaining: 15, seats: 5 });
```

## 🗺️ Roadmap

- [x] Pricing logic with annual savings
- [x] Seat-based and prorated billing math
- [x] Dashboard with stat widgets, usage bars, and activity feed
- [x] Billing and settings pages
- [x] Auth-ready session flow with role checks
- [x] Dark mode with a persistent toggle
- [ ] Stripe checkout adapter
- [ ] Database adapter (Drizzle/Prisma) examples
- [ ] Email + invite flows
- [ ] End-to-end tests (Playwright)

## ❓ FAQ

**Is this production ready?** The pricing, billing, usage, and session logic are fully typed and unit tested. Bring your own database and auth provider and you are ready to ship.

**How do I plug in real auth?** Replace `getCurrentUser` in `lib/session.ts` with a read from your identity provider; the rest of the role and permission helpers keep working.

**Does it support annual billing and proration?** Yes — see `lib/pricing.ts` and the billing page for seat totals and mid-cycle proration.

**Can I use it commercially?** Yes, it is MIT licensed.

## 🤝 Contributing

Contributions are welcome! Please open an issue to discuss substantial changes first. Before sending a PR, make sure both checks are green:

```bash
npm run typecheck
npm test
```

See [CONTRIBUTING.md](CONTRIBUTING.md) and our [Code of Conduct](CODE_OF_CONDUCT.md).

## Contact — Viprasol Tech Private Limited

- Website: [viprasol.com](https://viprasol.com)
- Email: [[email protected]](mailto:[email protected])
- Telegram: [t.me/viprasol_help](https://t.me/viprasol_help) | WhatsApp: +91 96336 52112
- GitHub: [@Viprasol-Tech](https://github.com/Viprasol-Tech) | [LinkedIn](https://www.linkedin.com/in/viprasol/) | X [@viprasol](https://twitter.com/viprasol)

## License

[MIT](LICENSE) (c) 2025 Viprasol Tech Private Limited
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.