MooseStack

Create Project

5-Minute Quickstart

5-Minute Quickstart

5 minute setup
Zero config
Local ClickHouse, Redpanda, and APIs

Viewing:

Prerequisites

Before you start

Node.js 20+

Required for TypeScript development

Download →

Docker Desktop

For local development environment

Download →

macOS/Linux

Windows works via WSL2

Already have ClickHouse running?

Skip the tutorial and add Moose as a layer on top of your existing database


Step 1: Install Moose (30 seconds)

One-line install
bash -i <(curl -fsSL http://fiveonefour.com/install.sh) moose

You should see:

Terminal
Moose vX.X.X installed successfully!
Restart your terminal

After installation, restart your terminal (or run source ~/.bashrc / source ~/.zshrc) to ensure the moose command is available in your PATH.


Step 2: Create Your Project (1 minute)

Initialize your project

Terminal
moose init my-analytics-app typescript
cd my-analytics-app
npm install

Verify Docker is running

Moose uses Docker to run ClickHouse, Redpanda, and Temporal locally.

Verify Docker is running
docker ps # you should see an empty list or existing containers. If you see an error, start Docker Desktop.

Start your development environment

Terminal
moose dev # This will spin up the Moose, ClickHouse, Redpanda, and Temporal containers. It will take a few minutes to start up.
       Created docker compose file
⡗ Starting local infrastructure
  Successfully started containers
     Validated clickhousedb-1 docker container
     Validated redpanda-1 docker container
  Successfully validated red panda cluster
     Validated temporal docker container
  Successfully ran local infrastructure
      Node Id: my-analytics-app::b15efaca-0c23-42b2-9b0c-642105f9c437
      Starting development mode
      Watching "/path/to/my-analytics-app/app"
       Started Webserver.


  Next Steps   

💻 Run the moose 👉 `ls` 👈 command for a bird's eye view of your application and infrastructure

📥 Send Data to Moose
	Your local development server is running at: http://localhost:4000/ingest
Your local analytics stack is running

You can now send data to Moose and query it. See step 4 for more details.

Step 3: Understand Your Project (1 minute)

Your project includes a complete example pipeline:

      • models.ts
      • transform.ts
    • index.ts

Important: While your pipeline objects are defined in the child folders, they must be imported into the root index.ts file for the Moose CLI to discover and use them.

app/index.ts
export * from "./ingest/models";      // Data models & pipelines
export * from "./ingest/transforms";  // Transformation logic  
export * from "./apis/bar";           // API endpoints
export * from "./views/barAggregated"; // Materialized views
export * from "./workflows/generator"; // Background workflows

Step 4: Test Your Pipeline (2 minutes)

Send test data

Open a new terminal window to run these commands

Your project comes with a pre-built Workflow called generator that acts as a data simulator. Trigger the workflow with:

Open a new terminal window
moose workflow run generator

You should see logs like:

POST ingest/Foo
[POST] Data received at ingest API sink for Foo
Received Foo_0_0 -> Bar_0_0 1 message(s)
[DB] 17 row(s) successfully written to DB table (Bar)
View Temporal Dashboard to see workflow status

The workflow runs in the background and is powered by Temporal. When you run the moose workflow run command, you’ll see a message showing the workflow has been triggered and a link to the Temporal UI at http://localhost:8080.

Query your data

You application has a pre-built API that reads from your database. The API is running on a webserver running on localhost:4000. Call the API with curl:

Terminal
curl "http://localhost:4000/api/bar"

You should see JSON data like:

[
  {
    "dayOfMonth": 15,
    "totalRows": 67,
    "rowsWithText": 34,
    "maxTextLength": 142,
    "totalTextLength": 2847
  },
  {
    "dayOfMonth": 14,
    "totalRows": 43,
    "rowsWithText": 21,
    "maxTextLength": 98,
    "totalTextLength": 1923
  }
]

Try query parameters:

Add filters and limits
curl "http://localhost:4000/api/bar?limit=5&orderBy=totalRows"
Port Reference
  • Port 4000: Your Moose application webserver (all APIs are running on this port)
  • Port 8080: Temporal UI dashboard (workflow management)
  • Port 18123: ClickHouse HTTP interface (direct database access)

Step 5: Hot Reload Schema Changes (1 minute)

  1. Open app/ingest/models.ts
  2. Add a new field to your data model:
app/ingest/models.ts
export interface Foo {
  id: Key<string>;
  timestamp: Date;
  data: string;
  newField?: string; // Add this new optional field
}
  1. Save the file and watch your terminal

You should see Moose automatically update your infrastructure:

⠋ Processing Infrastructure changes from file watcher
             ~  Table Foo:
                  Column changes:
                    + newField: String

Schema changes are automatically applied across your stack.

That's it!

Your API, database schema, and streaming topic all updated automatically. Try adding another field with a different data type.

Recap

You’ve built a complete analytical backend with:

What's Working

Type-safe ingestion pipeline with API and stream processing

ClickHouse database with dynamic schema management

Analytics API with filtering

Hot-reload development

Need Help?