StartupKitstartupkit

Adding Apps

How to add new applications to your StartupKit workspace

The add command scaffolds new applications into your monorepo's apps/ directory.

Basic Usage

npx startupkit add

This launches an interactive menu to select your app type:

? Which app would you like to add?
❯ Next.js
  Vite
  ---- coming soon ----
  Expo (disabled)
  Capacitor Mobile (disabled)
  Electron (disabled)

Supported App Types

TypeCommandDescription
Next.jsstartupkit add nextFull-stack React with App Router
Vitestartupkit add viteFast React SPA

Coming Soon

Vote for the features you want to see next!

TypeDescriptionVote
ExpoReact Native mobile appsπŸ‘ Vote
CapacitorCross-platform mobile appsπŸ‘ Vote
ElectronDesktop applicationsπŸ‘ Vote
TauriLightweight desktop appsπŸ‘ Vote
AstroContent-focused websitesπŸ‘ Vote
HonoEdge-first API serverπŸ‘ Vote
PlasmoBrowser extensionsπŸ‘ Vote

Have another idea? Request a template β†’

Command Options

npx startupkit add [type] [options]
OptionDescription
typeApp type: next or vite
--name <name>App name (skips prompt)
--repo <repo>Custom template repository

Examples

Add a Next.js App

npx startupkit add next --name web

Creates apps/web/ with a Next.js application.

Add a Vite App

npx startupkit add vite --name marketing

Creates apps/marketing/ with a Vite SPA.

Non-Interactive Mode

npx startupkit add next --name dashboard

Automatic Dependency Resolution

When you add an app, the CLI automatically:

  1. Checks template dependencies - Reads startupkit.config.ts from the template
  2. Detects missing packages - Scans your workspace for required @repo/* packages
  3. Prompts to install - Offers to install any missing dependencies

Example output:

πŸ” Checking template dependencies...

⚠️  This template requires 3 workspace dependencies that are not installed:

  Packages:
    - @repo/auth
    - @repo/db
    - @repo/ui

? Would you like to install these dependencies now? (Y/n)

If you decline, the command exitsβ€”apps require their dependencies to function.

What Gets Created

A Next.js app includes:

apps/web/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ layout.tsx
β”‚   β”‚   β”œβ”€β”€ page.tsx
β”‚   β”‚   └── providers.tsx
β”‚   β”œβ”€β”€ components/
β”‚   └── lib/
β”œβ”€β”€ public/
β”œβ”€β”€ next.config.ts
β”œβ”€β”€ tailwind.config.ts
β”œβ”€β”€ tsconfig.json
└── package.json

The app is pre-configured with:

  • @repo/ui - Shadcn components
  • @repo/auth - Authentication hooks
  • @repo/analytics - Analytics tracking
  • @repo/tsconfig - Shared TypeScript config
  • @repo/biome - Linting and formatting

Template Configuration

Each app template includes a startupkit.config.ts that declares dependencies:

import type { StartupKitConfig } from "startupkit"

export default {
  type: "app",
  dependencies: {
    packages: ["auth", "db", "ui", "analytics"],
    config: ["tsconfig", "nextjs", "biome"]
  }
} satisfies StartupKitConfig

Running Multiple Apps

After adding apps, run them all:

pnpm dev

Or run specific apps:

pnpm dev --filter web
pnpm dev --filter dashboard

Turbo handles caching and parallel execution automatically.

Custom Templates

Use your own templates with --repo:

npx startupkit add next --repo myorg/my-next-template

Your template should:

  • Include a startupkit.config.ts declaring dependencies
  • Use PROJECT_NEXT as the placeholder name (for Next.js templates)
  • Use PROJECT_VITE as the placeholder name (for Vite templates)

App Naming

The app name you provide is converted to a URL-safe slug:

InputSlug
My Dashboardmy-dashboard
Admin_Paneladmin-panel
Web App 2.0web-app-20

The slug becomes:

  • Directory name: apps/my-dashboard/
  • Package name in package.json

Troubleshooting

"Directory already exists"

Choose a different name or remove the existing directory:

rm -rf apps/web
npx startupkit add next --name web

Missing Dependencies Error

If the CLI reports missing @repo/* packages, accept the prompt to install them, or manually install:

# Clone missing package manually
npx degit ian/startupkit/templates/packages/auth packages/auth
pnpm install

pnpm Catalog Errors

If you see ERR_PNPM_CATALOG errors:

pnpm install --no-frozen-lockfile

See Troubleshooting for more solutions.

On this page