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 addThis 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
| Type | Command | Description |
|---|---|---|
| Next.js | startupkit add next | Full-stack React with App Router |
| Vite | startupkit add vite | Fast React SPA |
Coming Soon
Vote for the features you want to see next!
| Type | Description | Vote |
|---|---|---|
| Expo | React Native mobile apps | π Vote |
| Capacitor | Cross-platform mobile apps | π Vote |
| Electron | Desktop applications | π Vote |
| Tauri | Lightweight desktop apps | π Vote |
| Astro | Content-focused websites | π Vote |
| Hono | Edge-first API server | π Vote |
| Plasmo | Browser extensions | π Vote |
Have another idea? Request a template β
Command Options
npx startupkit add [type] [options]| Option | Description |
|---|---|
type | App 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 webCreates apps/web/ with a Next.js application.
Add a Vite App
npx startupkit add vite --name marketingCreates apps/marketing/ with a Vite SPA.
Non-Interactive Mode
npx startupkit add next --name dashboardAutomatic Dependency Resolution
When you add an app, the CLI automatically:
- Checks template dependencies - Reads
startupkit.config.tsfrom the template - Detects missing packages - Scans your workspace for required
@repo/*packages - 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.jsonThe 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 StartupKitConfigRunning Multiple Apps
After adding apps, run them all:
pnpm devOr run specific apps:
pnpm dev --filter web
pnpm dev --filter dashboardTurbo handles caching and parallel execution automatically.
Custom Templates
Use your own templates with --repo:
npx startupkit add next --repo myorg/my-next-templateYour template should:
- Include a
startupkit.config.tsdeclaring dependencies - Use
PROJECT_NEXTas the placeholder name (for Next.js templates) - Use
PROJECT_VITEas the placeholder name (for Vite templates)
App Naming
The app name you provide is converted to a URL-safe slug:
| Input | Slug |
|---|---|
My Dashboard | my-dashboard |
Admin_Panel | admin-panel |
Web App 2.0 | web-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 webMissing 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 installpnpm Catalog Errors
If you see ERR_PNPM_CATALOG errors:
pnpm install --no-frozen-lockfileSee Troubleshooting for more solutions.