Introduction
Welcome to StartupKit - The startup stack for the AI era
StartupKit is an application accelerator for AI agents. It's built on Next.js, React 19, TypeScript, and Turbo with authentication, analytics, database, and UI components pre-configured—all designed with clear patterns that AI coding tools can understand and extend.
Why StartupKit?
Building an application from scratch means spending weeks on boilerplate:
- Setting up authentication
- Configuring analytics
- Building UI components
- Optimizing for SEO
- Managing a monorepo
StartupKit gives you all of this out of the box, so you can focus on what matters: building your product.
Quick Start
Get started with a single command:
npx startupkit initThis will:
- Clone the complete monorepo template
- Install all dependencies
- Set up workspace packages
Then start the development server:
cd my-project
pnpm devWhat's Included
Packages
StartupKit includes several packages that work together:
- @repo/analytics - Provider-agnostic analytics with plugins for PostHog, Google Analytics, and OpenPanel
- @repo/auth - Authentication wrappers built on Better Auth
- @repo/db - Type-safe database access with Drizzle ORM and PostgreSQL
- @repo/emails - Transactional emails with React Email and Resend
- @repo/seo - SEO utilities including metadata, structured data, and sitemaps
- @repo/ui - Pre-built components with Shadcn UI, Radix, and Tailwind
Project Structure
my-project/
├── apps/
│ └── web/ # Your Next.js application
├── packages/
│ ├── analytics/ # @repo/analytics
│ ├── auth/ # @repo/auth
│ ├── db/ # @repo/db (Drizzle ORM)
│ ├── emails/ # @repo/emails (React Email)
│ ├── ui/ # @repo/ui (Shadcn components)
│ └── utils/ # @repo/utils
├── config/
│ ├── biome/ # @repo/biome
│ ├── nextjs/ # @repo/nextjs
│ └── typescript/ # @repo/tsconfig
├── turbo.json
└── package.jsonArchitecture
StartupKit uses a two-layer package architecture that separates core infrastructure from your customizable code.
@startupkit/* — Core packages
Published npm packages that provide the underlying infrastructure:
import { PostHogPlugin, GoogleAnalyticsPlugin } from "@startupkit/analytics"
import { generateMetadata, generateSitemap } from "@startupkit/seo"These packages provide:
- Plugin systems and adapters
- Utility functions
- Type definitions
- Provider integrations
You don't modify these—they're updated via npm.
@repo/* — Your packages
Local workspace packages in your packages/ directory that you own and customize:
import { useAnalytics, AnalyticsProvider } from "@repo/analytics"
import { useAuth, AuthProvider } from "@repo/auth"
import { db, users } from "@repo/db"
import { Button, Card } from "@repo/ui/components/button"These packages:
- Wrap
@startupkit/*packages with your configuration - Contain your database schema
- Hold your custom components
- Include project-specific logic
Why this design?
| Layer | What it provides | Who maintains it |
|---|---|---|
@startupkit/* | Core infrastructure, plugins, utilities | StartupKit (npm updates) |
@repo/* | Your configuration, schema, customizations | You |
This lets you receive updates to core functionality while keeping full control over your implementation. When we ship improvements to @startupkit/analytics, you get them without losing your custom event types or provider configuration.
See Project Structure for more details.
AI-Ready
StartupKit is designed to work seamlessly with AI coding assistants. Clear patterns, consistent conventions, and well-documented code make it easy for tools like Cursor, GitHub Copilot, and Claude to understand and extend your codebase.
Every project includes an AGENTS.md file that explains your codebase structure to AI tools.
Next Steps
- Installation - Detailed installation guide
- Quickstart - Get up and running in 5 minutes
- CLI - Learn the command-line tools
- Analytics - Set up event tracking
- Auth - Configure authentication
- Database - Work with your data
- Emails - Send transactional emails
- SEO - Optimize for search engines
- UI - Use pre-built components