Getting Started

Learn how to create your first project with Create RX Stack

Interactive Demo

Try out the Create RX Stack CLI in this interactive demo:

Terminal
Welcome to Create RX Stack CLI Demo!
Type 'help' to see available commands.
$

Type create-rx-stack my-app to see how the CLI works, or help to see all available commands.

Creating a New Project

To create a new project, run the following command:

npx create-rx-stack my-app

Replace my-app with your desired project name.

Interactive Setup

Create RX Stack will guide you through an interactive setup process:

  1. Project Name: If you didn't specify a project name in the command, you'll be prompted to enter one.
  2. Package Manager: Choose between npm, yarn, or pnpm.
    ? Select your package manager: › - Use arrow-keys. Return to submit. ❯ npm yarn pnpm
  3. Directory Structure: Choose whether to use a src/ directory.
    ? Do you want to use a src/ directory? › (Y/n)
  4. UI Components: Choose whether to include shadcn/ui components.
    ? Do you want to include shadcn/ui components? › (Y/n)

Project Structure

After the setup is complete, your project will have the following structure:

my-app/ ├── .gitignore ├── next.config.js ├── package.json ├── postcss.config.js ├── README.md ├── tailwind.config.js ├── tsconfig.json └── src/ (if selected) ├── app/ │   ├── api/ │   │   └── trpc/ │   │       └── [trpc]/ │   │           └── route.ts │   ├── globals.css │   ├── layout.tsx │   └── page.tsx ├── components/ (if shadcn/ui selected) │   └── ui/ │       ├── button.tsx │       └── card.tsx ├── lib/ │   └── utils.ts ├── server/ │   └── api/ │       ├── root.ts │       ├── routers/ │       │   └── example.ts │       └── trpc.ts └── utils/ └── trpc.tsx

Running Your Project

Once the project is created, you can start it with the following commands:

cd my-app npm run dev

Or if you're using yarn or pnpm:

cd my-app yarn dev
cd my-app pnpm dev

Your application will be available at http://localhost:3000.