StackKit LogoStackKit
Getting Started

Quick Start

Create your first StackKit project in under two minutes. Follow these steps to get a fully configured full-stack application up and running.

This guide walks you through creating a new project from scratch. By the end, you'll have a fully configured, running application on your machine.

Before you start — Make sure you have Node.js 20 or higher installed. Run node --version to check.

Create your project

Run the create command with your preferred package manager. StackKit will walk you through an interactive setup — no flags required.

bash npx stackkit@latest create my-app
bash pnpm dlx stackkit@latest create my-app
bash yarn dlx stackkit@latest create my-app
bash bun x stackkit@latest create my-app

Replace my-app with whatever you'd like to name your project.

Answer the prompts

StackKit will ask you a series of questions to configure your project. Each one has a sensible default, so you can press Enter to skip if you're unsure.

PromptOptionsNotes
FrameworkNext.js, Express, ReactPick the foundation for your app
DatabasePrisma, Mongoose, NoneSkip if you don't need a database yet
Database ProviderPostgreSQL, MySQL, SQLite, MongoDBOnly shown when Prisma is selected
AuthenticationBetter Auth, NoneRequires a database on Express
UI LibraryShadcn UI, NoneAvailable for Next.js and React
StorageCloudinary, NoneAvailable for Express only
LanguageTypeScript, JavaScriptTypeScript is recommended
Package Managerpnpm, npm, yarn, bunAuto-detected from your environment
Initialize GitYes, NoCreates a git repo with an initial commit

Once you confirm, StackKit generates your files and installs dependencies automatically.

Set up your environment

Every generated project includes a .env.example file listing all the environment variables your app needs. Copy it to .env and fill in your values.

cd my-app
cp .env.example .env

Open .env in your editor and replace the placeholder values. If you added Better Auth, you'll need a secret key — generate one with:

openssl rand -base64 32

Never commit your .env file to version control. A .gitignore entry is already included, but double-check before pushing.

Start the development server

npm run dev

Your application should now be running locally:

Verify your setup

Run the doctor command to check that your project is configured correctly. It will flag missing environment variables, uninstalled dependencies, or any misconfigured files.

npx stackkit doctor

A clean output means you're ready to build.

What was generated?

The generated files depend on the modules you chose, but every project includes:

  • package.json — Dependencies and npm scripts
  • tsconfig.json — TypeScript configuration (strict mode enabled)
  • .env.example — Environment variable template with comments
  • README.md — Project-specific setup notes and commands
  • .gitignore — Sensible defaults for your framework

Development commands

npm run dev      # Start the development server with hot reload
npm run build    # Build an optimized production bundle
npm start        # Serve the production build
npm run lint     # Check for code style issues

Some modules add extra scripts — check your package.json or README.md for details.

Add more features later

You don't need to add everything upfront. If you decide you need a database or authentication after the project is created, just run:

npx stackkit add

StackKit will detect your framework and show you the modules that are compatible with your setup.

Troubleshooting

The port is already in use:

# Next.js
lsof -ti:3000 | xargs kill -9

# Express
lsof -ti:5000 | xargs kill -9

# React (Vite)
lsof -ti:5173 | xargs kill -9

Something looks broken after adding a module:

npx stackkit doctor

Dependencies are in a weird state:

rm -rf node_modules && npm install

Further Reading

On this page