JS-Stack CLI

Getting Started

Learn how to get started with JS-Stack CLI - Create production-ready JavaScript full-stack applications in minutes

Getting Started with JS-Stack CLI

JS-Stack CLI is a powerful, opinionated tool for scaffolding production-ready JavaScript full-stack applications. Get started in minutes, not hours.

What is JS-Stack?

JS-Stack is a comprehensive CLI tool that generates complete, production-ready JavaScript projects with:

  • 🚀 Modern Stack: Latest versions of popular frameworks
  • 🛡️ Best Practices: Security, performance, and code quality built-in
  • 📦 Complete Setup: Everything from dependencies to deployment configs
  • Fast: Generate projects in seconds
  • 🎯 Flexible: Choose your stack or use presets

Installation

No installation required! Use npx to run JS-Stack CLI directly:

npx create-js-stack@latest my-app

The CLI will download and run automatically. No global installation needed!

Quick Start

The easiest way to get started is using the interactive mode:

npx create-js-stack@latest my-app

This will guide you through:

  • Frontend framework selection (React, Next.js, Vue, Nuxt, Svelte, etc.)
  • Backend framework selection (Express, Fastify, Hono, NestJS, etc.)
  • Runtime selection (Node.js, Bun, Deno, Cloudflare Workers)
  • Database and ORM setup
  • API style selection (tRPC, ORPC, GraphQL, REST)
  • Authentication configuration
  • Additional addons (Docker, Testing, Biome, Turborepo, PWA, etc.)
  • Package manager choice
  • Git initialization
  • Dependency installation

Option 2: Command-Line Flags

For CI/CD or automated setups, use flags:

npx create-js-stack@latest my-app \
  --frontend next \
  --backend express \
  --runtime node \
  --database postgres \
  --orm prisma \
  --api trpc \
  --auth better-auth \
  --addons docker,testing,biome \
  --package-manager pnpm \
  --git \
  --install

Option 3: Quick Start with Defaults

Use the --yes flag to skip prompts and use defaults:

npx create-js-stack@latest my-app --yes

You can combine --yes with specific options:

npx create-js-stack@latest my-app --frontend next --yes

Option 4: Interactive Builder

Use our interactive web builder to visually select your stack and get the exact command to run. The builder shows all available options and generates the exact CLI command for you.

What Gets Generated

JS-Stack CLI generates a complete, production-ready project structure:

Project Structure

my-app/
├── src/                    # Source code
│   ├── app/               # Application code
│   ├── components/        # Reusable components
│   ├── lib/               # Utilities
│   └── ...
├── public/                # Static assets
├── tests/                 # Test files (if testing addon)
├── docker-compose.yml     # Docker config (if docker addon)
├── Dockerfile             # Dockerfile (if docker addon)
├── .env.example           # Environment variables template
├── .gitignore             # Git ignore rules
├── package.json           # Dependencies and scripts
├── tsconfig.json          # TypeScript config (if TypeScript)
└── README.md              # Project documentation

Features Included

  • Production-ready configuration
  • Best practices built-in (security, performance, SEO)
  • TypeScript support (optional)
  • Testing setup (Jest/Vitest with Testing Library)
  • Docker configuration (optional)
  • CI/CD templates (optional)
  • Linting & Formatting (ESLint/Prettier or Biome)
  • Monorepo support (Turborepo, optional)
  • Complete documentation

First Steps After Generation

  1. Navigate to your project:

    cd my-app
  2. Install dependencies (if not auto-installed):

    npm install
    # or
    pnpm install
    # or
    yarn install
  3. Set up environment variables:

    cp .env.example .env
    # Edit .env with your configuration
  4. Set up database (if using a database):

    # For PostgreSQL
    createdb my-app
    npx prisma migrate dev  # if using Prisma
    
    # For MongoDB
    # Make sure MongoDB is running
  5. Start development server:

    npm run dev
    # or
    pnpm dev

Common Workflows

Full-Stack Next.js Application

npx create-js-stack@latest my-app \
  --frontend next \
  --database postgres \
  --orm prisma \
  --api trpc \
  --auth better-auth \
  --addons testing,biome,docker \
  --package-manager pnpm \
  --git \
  --install

React with Express API

npx create-js-stack@latest my-app \
  --frontend react-router \
  --backend express \
  --runtime node \
  --database postgres \
  --orm prisma \
  --api trpc \
  --auth better-auth \
  --addons testing,docker \
  --package-manager pnpm \
  --git \
  --install

API-Only Backend

npx create-js-stack@latest my-api \
  --frontend none \
  --backend nest \
  --runtime node \
  --database postgres \
  --orm typeorm \
  --api rest \
  --auth lucia \
  --addons testing,docker \
  --package-manager pnpm \
  --git \
  --install

Next Steps

Need Help?