5-Minute Quickstart
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
Before you start
Python 3.12+
Required for Python 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)
bash -i <(curl -fsSL https://fiveonefour.com/install.sh) moose
Moose vX.X.X installed successfully!
Step 2: Create Your Project (1 minute)
Initialize your project
moose init my-analytics-app typescript
cd my-analytics-app
npm install
moose init my-analytics-app python
cd my-analytics-app
# Create virtual environment (recommended)
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
Start your development environment
moose dev
Step 3: Understand Your Project (1 minute)
Your project includes a complete example pipeline:
- main.py
- models.py
- transform.py
- index.ts
- models.ts
- transform.ts
Browse your project files
Review the files located within your /app
directory to see start understanding how data flows from ingestion to analytics APIs.
Step 4: Test Your Pipeline (2 minutes)
Send test data
moose workflow run generator
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)
Query your data
curl "http://localhost:4000/consumption/bar"
You should see JSON data with your processed events.
curl "http://localhost:4000/consumption/bar?limit=5"
Explore with OpenAPI UI
- Install the OpenAPI (Swagger) Viewer extension in your IDE
- Open
.moose/openapi.yaml
in your IDE - Click the “Preview” icon to launch the interactive API explorer
- Test the
POST /ingest/Foo
andGET /consumption/bar
endpoints
Step 5: Hot Reload Schema Changes (1 minute)
- Open
app/ingest/models.ts
app/ingest/models.py
- Add a new field to your data model:
export interface Foo {
id: Key<string>;
timestamp: Date;
data: string;
newField: string; // Add this line
}
class Foo(BaseModel):
id: Key[str]
timestamp: datetime
data: str
new_field: str // Add this line
- Save the file and watch your terminal
You should see Moose automatically update your infrastructure:
~ Table Foo with column changes: [Added(Column { name: "newField", data_type: String })]
~ API Endpoint: Foo - Updated validation schema
~ Topic: Foo - Schema updated
Schema changes are automatically applied across your stack.
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: