Production-Ready Next.js SaaS Starter Kit – v1

Launch your SaaS faster with v1 next.js starter kit. Includes authentication, database, billing, and analytics in a ready-to-deploy monorepo.

v1 is an open-source starter kit for building production-ready SaaS applications using the Next.js framework.

It originates from the development of the Midday platform and encapsulates the best practices learned during its creation.

v1 organizes code within a monorepo structure to promote code reuse and maintainability. This setup is suitable for projects that are expected to scale and grow over time.

You can use this starter kit to build a variety of applications that require user authentication, database interactions, background jobs, and email services.

Features

๐Ÿš€ Next.js framework with App Router for modern React development.

๐Ÿ“ฆ Turborepo monorepo setup for code sharing and build optimization.

๐ŸŽจ TailwindCSS with Shadcn UI components for consistent design systems.

๐Ÿ”’ Supabase integration for authentication, database, and file storage.

โšก Upstash Redis for caching and rate limiting functionality.

๐Ÿ“ง React Email templates with Resend delivery service.

๐ŸŒ Built-in internationalization support with next-international.

๐Ÿ“Š OpenPanel analytics integration for user behavior tracking.

๐Ÿ› Sentry error monitoring and performance tracking.

๐Ÿ”— Dub integration for creating shareable links.

โš™๏ธ Trigger.dev for handling background jobs and workflows.

๐Ÿ›ก๏ธ Type-safe server actions with react-safe-action validation.

๐Ÿ” Type-safe URL search parameters with nuqs state manager.

๐ŸŒ™ Theme management with next-themes for dark/light mode support.

๐Ÿงน Biome for consistent code linting and formatting.

Preview

saas-starter-kit-v1

Use Cases

  • Build SaaS platforms that require user subscriptions and multi-tenant architecture.
  • Create productivity applications with real-time collaboration features.
  • Develop e-commerce platforms with integrated payment processing and inventory management.
  • Launch content management systems with user-generated content and moderation tools.
  • Build analytics dashboards with data visualization and reporting capabilities.

How to Use It

1. To get started, make sure you have Bun and Docker installed on your local machine. You will also need accounts for Supabase, Upstash, Resend, Sentry, Trigger.dev, Dub, and OpenPanel to use the integrated features.

2. Clone the starter kit using degit.

bunx degit midday-ai/v1 your-project-name

3. Navigate into your new project directory and use Bun to install all the necessary dependencies for the monorepo workspaces.

cd your-project-name
bun install

4. The project requires environment variables for connecting to various services. You must create a .env file for each application within the apps directory. Copy the example files to get started.

cp apps/api/.env.example apps/api/.env
cp apps/app/.env.example apps/app/.env
cp apps/web/.env.example apps/web/.env

After copying the files, open each .env file and fill in the API keys and secrets from the services you set up in the prerequisites step.

5. Start all development servers simultaneously (marketing site, main app, API, and email previews).

bun dev

6. To run a specific application:

bun dev:web  # Starts only the marketing website
bun dev:app  # Starts only the main product application

7. The starter kit uses Supabase for the database. You can manage migrations and seeding through Bun scripts.

  • Apply any new database migrations:
bun migrate
  • Populate your database with initial data:
bun seed

8. The monorepo structure separates concerns into distinct applications and shared packages. The apps directory contains your main applications: the marketing website, the SaaS application, and the API layer. Shared packages include UI components, analytics tracking, email templates, background jobs, and database queries.

9. Customize the UI components by modifying the packages/ui directory, which contains Shadcn components that can be used across all applications. The theming system supports both light and dark modes out of the box.

10. Configure authentication flows through the Supabase dashboard. The starter kit includes pre-built authentication pages and middleware for protecting routes. You can customize the authentication experience by modifying the components in the apps/app/components/auth directory.

11. Set up your database schema by editing the migration files in apps/api/supabase/migrations. The included schema provides tables for users, organizations, and basic SaaS functionality. You can extend this schema based on your specific requirements.

12. You can also use this deploy link to deploy your application to Vercel. This will guide you through creating accounts for all required services. The deployment process automatically configures environment variables and sets up continuous deployment from your Git repository.

Related Resources

  • Next.js Documentation – Complete guide to the React framework used as the foundation of Create v1.
  • Supabase Docs – Backend-as-a-service platform providing authentication, database, and storage solutions.
  • Shadcn UI – Modern UI component library built on Radix UI and Tailwind CSS.
  • Turborepo Guide – Monorepo build system for managing multiple applications and packages.

FAQs

Q: What makes v1 different from other SaaS starter kits?
A: v1 is based on the production architecture of Midday, a real SaaS application. This means every included tool and pattern has been tested in a live environment serving actual users, rather than being theoretical best practices.

Q: Can I use v1 with a different database provider?
A: While the starter kit is optimized for Supabase, you can replace it with other PostgreSQL databases. You would need to update the database client configuration and authentication middleware to work with your chosen provider.

Q: Can I customize the tech stack?
A: Yes. While the starter kit provides a pre-selected stack, its monorepo structure allows you to swap out components. For example, you could replace Supabase with a different database provider or use an alternative email delivery service instead of Resend by updating the relevant packages and configurations.

Midday

Midday

Run your business smarter.

Leave a Reply

Your email address will not be published. Required fields are marked *