Loading video player...
Check that your pre-requisites are installed by running the following commands:
Required for TypeScript development
Required for TypeScript development
For local development environment (requires at least 2.5GB memory)
Download →For local development environment (requires at least 2.5GB memory)
Download →Windows works via WSL2
node --versiondocker psWindows works via WSL2
node --versiondocker psMake sure Docker Desktop has at least 2.5GB of memory allocated. To check or change this setting, open Docker Desktop, go to Settings → Resources → Memory, and adjust the slider if needed. Learn more about Docker Desktop settings →
bash -i <(curl -fsSL https://fiveonefour.com/install.sh) mooseYou should see this message: Moose vX.X.X installed successfully! (note that X.X.X is the actual version number)
If you see an error instead, check Troubleshooting below.
This step is required. Your current terminal doesn't know about the moose command yet.
source ~/.zshrcmoose --versionYou should see:
moose X.X.XTry these steps in order:
source command for your shellmoose --version againYou should see the moose version number. Do not proceed to Step 2 until moose --version works.
moose init my-analytics-app typescriptYou should see output like:
✓ Created my-analytics-app✓ Initialized TypeScript projectcd my-analytics-appnpm installWait for installation to complete.
Dependencies installed successfully with no errors.
moose devMoose is:
Do not proceed until you see the "Started Webserver" message.
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. 👈 WAIT FOR THIS 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/ingestKeep this terminal running. This is your Moose development server. You'll open a new terminal for the next step.
Your project includes a complete example pipeline:
Important: While your pipeline objects are defined in the child folders, they must be imported into the root index.ts (TypeScript) or main.py (Python) file for the Moose CLI to discover and use them.
export * from "./ingest/models"; // Data models & pipelinesexport * from "./ingest/transforms"; // Transformation logicexport * from "./apis/bar"; // API endpointsexport * from "./views/barAggregated"; // Materialized viewsexport * from "./workflows/generator"; // Background workflowsKeep your moose dev terminal running. You need a second terminal for the next commands.
In your new terminal window (not the one running moose dev):
cd my-analytics-appYour project comes with a pre-built Workflow called generator that acts as a data simulator:
moose workflow run generatorYou should see:
Workflow 'generator' triggered successfullySwitch to your first terminal (where moose dev is running). You should see new logs streaming:
POST ingest/Foo[POST] Data received at ingest API sink for FooReceived Foo_0_0 -> Bar_0_0 1 message(s)[DB] 17 row(s) successfully written to DB table (Bar)These logs show your pipeline working: Workflow generates data → Ingestion API receives it → Data transforms → Writes to ClickHouse
If you don't see logs after 30 seconds:
moose dev is still running in Terminal 1docker ps to verify containers are runningThe workflow runs in the background, powered by Temporal. You can see workflow status at http://localhost:8080.
Your application has a pre-built API that reads from your database. The API runs on localhost:4000.
In Terminal 2, call the API with curl:
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 }]You should see JSON data with analytics results. Your complete data pipeline is working!
Try query parameters:
curl "http://localhost:4000/api/bar?limit=5&orderBy=totalRows"app/ingest/models.ts (TypeScript) or app/ingest/models.py (Python)/** Analyzed text metrics derived from Foo */export interface Bar { primaryKey: Key<string>; // From Foo.primaryKey utcTimestamp: DateTime; // From Foo.timestamp hasText: boolean; // From Foo.optionalText? textLength: number; // From Foo.optionalText.length newField?: string; // Add this new optional field}Switch to Terminal 1 (where moose dev is running). You should see Moose automatically update your infrastructure:
⠋ Processing Infrastructure changes from file watcher ~ Table Bar: Column changes: + newField: StringYou should see the column change logged. Your API, database schema, and streaming topic all updated automatically!
Try it yourself: Add another field with a different data type and watch the infrastructure update in real-time.
You've built a complete analytical backend with: