Production-grade Next.js starter for modern SaaS applications.
Built for solo founders and small teams who want a fast, maintainable foundation without the enterprise complexity.
Most Next.js starters are either too basic or too complex. next-ship hits the sweet spot:
- Modern stack β Latest stable tools that work well together
- Simplified β Removed enterprise features you don't need as a solo founder
- Fast to ship β Pre-configured auth, payments, database, and analytics
- Easy to maintain β Consolidated tooling, flat URLs
- Production-ready β Type-safe, secure, and scalable
- Next.js 16.2 β React 19, latest features
- TypeScript 5.9 β Strict mode, end-to-end type safety
- Turborepo + pnpm β Monorepo with fast, disk-space efficient installs
- Tailwind CSS 4 β Latest syntax, no configuration needed
| Service | Purpose |
|---|---|
| Clerk | Authentication β simple, secure, works out of the box |
| Drizzle ORM | Database β type-safe, SQL-like, better performance than Prisma |
| Neon PostgreSQL | Database hosting β serverless, scales with you |
| Polar.sh | Payments β modern SaaS billing with strong TypeScript support |
| PostHog | Analytics + Error tracking β one tool instead of three |
| Resend | Transactional email β simple API, great deliverability |
| BaseHub | CMS β type-safe content management |
| Nosecone | Security headers |
- Base UI β shadcn's next-generation component library (replacement for Radix)
- Tailwind CSS v4 β Latest features, no config
- Geist font β Modern, readable typography
- Node.js 20+
- pnpm
# Clone the repository
git clone https://github.com/oscardobsonbrown/next-ship.git
cd next-ship
# Install dependencies
pnpm install
# Set up environment variables
# Copy .env.example files to .env in each app/package and fill in your API keys
# Run database migrations
pnpm --filter @repo/database db:push
# Start development
pnpm devCreate .env files in each app directory:
apps/web/.env:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_WEB_URL=http://localhost:3001
NEXT_PUBLIC_POSTHOG_KEY=phc_...
apps/app/.env:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
CLERK_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_POSTHOG_KEY=phc_...
apps/api/.env:
DATABASE_URL=postgresql://...
CLERK_SECRET_KEY=sk_test_...
CLERK_WEBHOOK_SECRET=whsec_...
POLAR_ACCESS_TOKEN=polar_...
POLAR_WEBHOOK_SECRET=whsec_...
RESEND_TOKEN=re_...
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_WEB_URL=http://localhost:3001
See individual .env.example files for complete lists.
apps/
βββ web/ # Marketing site (port 3001)
β βββ / # Homepage
β βββ /contact # Contact form
β βββ /pricing # Pricing page
β βββ /blog # Blog with CMS integration
βββ app/ # Main application (port 3000)
β βββ /sign-in # Authentication
β βββ /sign-up
β βββ /dashboard # Main app dashboard
βββ api/ # API server (port 3002)
β βββ /webhooks # Payment webhooks, auth callbacks
βββ docs/ # Documentation site
βββ email/ # Email preview server
βββ storybook/ # Component library
All apps are independently deployable.
packages/
βββ auth/ # Clerk configuration
βββ database/ # Drizzle ORM, schema, migrations
βββ design-system/ # Base UI components, Tailwind config
βββ payments/ # Polar.sh integration
βββ analytics/ # PostHog client/server
βββ observability/ # Error handling, logging
βββ security/ # Security headers configuration
βββ cms/ # BaseHub integration
βββ email/ # React Email templates
βββ ai/ # Vercel AI SDK utilities
βββ seo/ # Metadata, sitemaps, JSON-LD
βββ typescript-config/ # Shared TypeScript settings
Clean URL structure without locale prefixes. /contact instead of /en/contact. Simpler routing, faster builds, no configuration needed.
One tool instead of three:
- PostHog for analytics, session replay, and error tracking
- No Sentry (replaced by PostHog error tracking)
- No Logtail (Vercel logs + PostHog capture are sufficient)
Drizzle ORM instead of Prisma:
- Better query performance
- SQL-like syntax (you write actual SQL)
- Smaller bundle size
- Edge runtime compatible
Polar.sh for payments:
- Better developer experience
- Modern TypeScript SDK
- Webhook handling included
- Perfect for SaaS subscriptions
Base UI instead of Radix:
- shadcn's next-generation component library
- Better accessibility
- No
asChildprop complexity - Cleaner composition patterns
Drizzle ORM with Neon PostgreSQL:
// packages/database/src/schema.ts
import { pgTable, serial, varchar } from "drizzle-orm/pg-core";
export const pages = pgTable("pages", {
id: serial("id").primaryKey(),
name: varchar("name", { length: 255 }).notNull(),
});Run migrations:
pnpm --filter @repo/database db:generate # Generate migration files
pnpm --filter @repo/database db:push # Push to database
pnpm --filter @repo/database db:studio # Open Drizzle StudioBase UI components via shadcn CLI:
# Add a component
npx shadcn@latest add button -c packages/design-system
# Use in your app
import { Button } from "@repo/design-system/components/ui/button";Composition pattern (no asChild):
// β
Correct
<Link href="/contact">
<Button>Contact</Button>
</Link>
// β Old pattern (doesn't work with Base UI)
<Button asChild>
<Link href="/contact">Contact</Link>
</Button># Type check all packages
pnpm typecheck
# Run tests
pnpm test
# Build all apps
pnpm build
# Lint and format
pnpm check
pnpm fix
# Update dependencies
pnpm bump-deps
# Update all shadcn components
pnpm bump-uiAfter modifying schema:
- Edit
packages/database/src/schema.ts - Run
pnpm --filter @repo/database db:generate - Run
pnpm --filter @repo/database db:push
- Create directory in
apps/ - Add
package.jsonwith dependencies - Create
next.config.ts - Add to
turbo.jsonpipeline if needed
- Connect your GitHub repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy
The monorepo is configured to deploy all apps independently via Turborepo.
Each app needs specific environment variables:
- Web:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,NEXT_PUBLIC_POSTHOG_KEY, etc. - App: All Clerk variables, PostHog key
- API: Database URL, all service API keys (Polar, Resend, etc.)
Built on lessons learned from next-ship, with simplifications for solo founders:
- Removed complex routing patterns
- Consolidated observability tools
- Updated to latest stack (Drizzle, Base UI, Polar.sh)
- Flattened URL structure
- Simplified codebase
MIT