Skip to content

Welcome to Stack

Build reusable TypeScript packages—not just apps.

Stack is an attempt to create a predictable opinionated software system. It can create backends, frontends, desktop apps, mobile apps, CLI apps and reusable packages that they can share. Stack comes fully ejected — you always own your build and configuration. Stack helps scaffold and link packages!

  • Not all environments are supported yet.

Stack comes pre-configured with a modern, high-performance stack so you can focus on code, not config.

Build with tsup

All packages are bundled using tsup, powered by esbuild for blazing fast compilation.

Test with Vitest

Unit testing is pre-configured out of the box with vitest for every new package.

React & Vite

Generate shared React component libraries or full-stack Vite frontend applications instantly.

Backend & CLI

Native support for Fastify APIs and robust CLI tools powered by Commander.


Follow these steps to get your first Stack workspace up and running in minutes.

  1. Install the CLI

    Manage your workspace by installing the global runner:

    Terminal window
    npm install -g @stack-dev/cli
  2. Create a New Workspace

    Scaffold your entire monorepo structure:

    Terminal window
    stack create my-new-project
    cd my-new-project
  3. Generate Your First Package

    Terminal window
    # Create a shared utility library
    stack g my-utils --type library
  4. Generate Your First App

    Terminal window
    # Create a vite React app
    stack g frontend --type vite
  5. Link to Your Package

    Terminal window
    cd apps/frontend
    stack l @my-new-project/my-utils

Use stack g <name> --type <type> to generate different architecture patterns:

TypeDescription
LibraryVanilla TypeScript package with tsup & vitest
ReactComponent libraries with optional Styled Components support
ViteFull React frontend static applications
FastifyHigh-performance Node.js backend API scaffolding
CLICommand-line applications powered by Commander

CommandAliasDescription
stack create <name>Initialize a new workspace
stack g <name>Generate a new package (Library, React, Vite, Fastify, or CLI)
stack link [name]lLink a local workspace package
stack unlink [name]uRemove a local package link

Stack leverages pnpm workspaces for maximum efficiency.

  • packages/* — Shared libraries and configuration packages
  • apps/* — Deployment targets (Vite apps, Fastify APIs, CLIs)
  • tooling/* — Shared ESLint, Prettier, and TypeScript configs
Terminal window
# Build the entire workspace
pnpm run build
# Run in watch mode for development
pnpm run build --watch
# Smart link a package as a devDependency
stack link @stack-dev/core --dev