Local Development

Structure a realistic local SaaS environment with authentication, billing, database, and PWA foundations.

Starter ProLocal Development

Local environments should feel realLink to section

Starter Pro is designed so local development validates realistic SaaS behavior instead of disconnected demo pages.

The local environment supports:

  • authentication
  • billing
  • protected routes
  • Prisma
  • Stripe
  • PWA behavior
  • production-shaped workflows

Start from a production-shaped local environment.

Validate auth, billing, mobile UX, and product infrastructure before writing domain logic.
Getting started

One-time payment · Instant access after purchase

Core principle

Local development should validate product infrastructure, not only UI composition.

Why this mattersLink to section

Many SaaS products become difficult to scale because local development environments never reflected real production behavior.

That usually creates:

  • inconsistent auth flows
  • billing drift
  • broken onboarding
  • unsafe deployment assumptions
  • mobile UX regressions
  • fragile environment setup

Starter Pro is structured to reduce that operational drift from the start.

local-development-model.txt
Local setup
  ↓
Environment variables
  ↓
Database
  ↓
Auth
  ↓
Billing
  ↓
Protected routes
  ↓
PWA behavior
  ↓
Production confidence

Production insight

A strong local setup is not about convenience only. It is the first release gate for your product infrastructure.

Mental modelLink to section

Infrastructure layer

The infrastructure layer includes environment variables, database access, local services, and development scripts.

EnvironmentPostgreSQLPrisma

Included infrastructureLink to section

Authentication

Credentials auth, OAuth providers, sessions, and protected routing.

Billing

Stripe-ready billing infrastructure and subscription-aware flows.

Database

Prisma-powered PostgreSQL development environment.

PWA

Installable app behavior, offline routing, safe areas, and standalone testing.

Install dependenciesLink to section

pnpm install

Configure environment variablesLink to section

cp .env.example .env.local

Start infrastructureLink to section

pnpm db:up

Seed and migrateLink to section

pnpm app:setup

Start developmentLink to section

pnpm dev

Local development checklistLink to section

Required

Infrastructure validation

Confirm the local environment is ready before customizing product logic.
  • dependencies installed
  • environment variables configured
  • database running
  • Prisma client generated
  • seed completed
Required

Product validation

Confirm that Starter Pro behaves like a real SaaS locally.
  • auth flows work
  • billing routes render
  • settings pages work
  • protected pages redirect correctly
  • PWA fallback works

Validate:

  • authentication flows
  • billing routes
  • protected pages
  • mobile responsiveness
  • PWA installability
  • offline fallback behavior
  • settings surfaces
  • local seed fixtures

Validation principle

Validate real product flows locally before customizing deeply.

Common mistakesLink to section

Demo-only environments

Testing isolated pages without validating real auth or billing behavior.

Skipping mobile validation

Ignoring standalone mode, safe areas, and mobile navigation behavior.

Environment drift

Letting local, staging, and production variables diverge without clear documentation.

Delayed validation

Customizing deeply before confirming the default product flows work.

Explore the isolated demoLink to section

In a demo deployment, /demo offers three guided entry points. All three use the same private, temporary workspace, so switching journeys keeps the visitor’s projects and team changes.

Discover the dashboard

Explore populated charts, create a project and review the resulting workspace activity.

Collaborate with a team

Invite an @example.invalid teammate, simulate joining and manage member roles using the workspace service.

Preview billing

Review, cancel, confirm and restart a clearly labelled plan preview in Billing, without entering payment details.

A plan preview, not a payment test

Free → Pro runs locally in the browser and resets on leaving Billing or reloading. It creates no subscription or paid entitlement and changes no demo permissions or quotas. Public demo checkout, portal and webhook endpoints stay blocked on the server. Verify actual Stripe checkout and webhooks in a separate test environment using the billing guide.

The included DEMO.md documents dedicated database configuration, simulated invitations, visitor expiry and cleanup. Public links depend on a verified demo deployment; they are not enabled by these local instructions alone.

The business recipe walkthroughs give you concrete project, task and comment scenarios to try with fictitious data. Keep their workspace access, archive and reload checks when adapting the interface.

Prefer / avoidLink to section

Prefer

  • validate auth before product customization
  • test billing locally with Stripe test mode
  • use seed fixtures for repeatable states
  • test mobile and standalone behavior
  • keep environment variables documented

Avoid

  • customizing before setup is validated
  • testing only static pages
  • skipping protected routes
  • using production secrets locally
  • ignoring PWA safe-area behavior