Welcome to Moose

5 minute setup
Pre-integrated ClickHouse, Redpanda, Temporal
Hot-reload development

Get Started

Install Moose
bash -i <(curl -fsSL https://fiveonefour.com/install.sh) moose

What is Moose?

Open source TypeScript/Python framework for building analytical backends—streaming, storage, and APIs in TypeScript or Python.

Complete Analytical Backend in 1 TS file
import { Key, OlapTable, Stream, IngestApi, ConsumptionApi } from "@514labs/moose-lib";
 
interface DataModel {
  primaryKey: Key<string>;
  name: string;
}
// Create a ClickHouse table
export const clickhouseTable = new OlapTable<DataModel>("TableName");
 
// Create a Redpanda streaming topic
export const redpandaTopic = new Stream<DataModel>("TopicName", {
  destination: clickhouseTable,
});
 
// Create an ingest API endpoint
export const ingestApi = new IngestApi<DataModel>("post-api-route", {
  destination: redpandaTopic,
});
 
// Create consumption API endpoint
interface QueryParams {
  limit?: number;
}
export const consumptionApi = new ConsumptionApi<QueryParams, DataModel>("get-api-route", {
  async handler({limit = 10}: QueryParams, {client, sql}): {
    const result = await client.query.execute(sql`SELECT * FROM ${clickhouseTable} LIMIT ${limit}`);
    return await result.json();
  }
});

Why Devs Choose Moose

Define everything in code

Data models, pipelines, and insights are all in a single codebase.

Integrated analytics infrastructure

Get ClickHouse tables, Kafka/Redpanda streams, and HTTP APIs, all auto-wired and type-safe.

Fast setup and local-first development

Zero boilerplate, instant feedback, and no context switching.


Why Moose Exists & Who It’s For

Moose is for developers who want to move fast and treat analytics as real software—not a patchwork of YAML, SQL, and fragile connectors.

Analytics DX: Slow & Fragmented

Web DX: Fast & Integrated

No frameworks

Manual tool integration

Frameworks out of the box

Next, Django, Rails

Separate database setup

Manual ClickHouse configuration

Integrated database

Postgres/MySQL built-in

Custom API boilerplate

FastAPI/Express from scratch

Built-in HTTP APIs

Routing & endpoints included

Manual schema management

Write DDL scripts by hand

Type-safe data models

ORMs and dev time validation

No hot-reload dev

Wait for deploys to see errors

Hot-reload local development

Instant feedback on changes

Multiple codebases and deployments

5+ separate systems to manage

One codebase, one deployment

Get to production in minutes

Without Moose vs. With Moose

Moose gives you a unified, code-first experience to build, test, and ship analytics features with the same speed and confidence as web apps.

Kafka Config     (300 lines of YAML)
+ ClickHouse     (Manual schema management)  
+ dbt            (SQL-only transformations)
+ Airflow        (Workflow orchestration)
+ Custom APIs    (Boilerplate code)
+ ...

Manual config & integration = constant context switching

Does my Database table use snake_case or camelCase?

Did I add the new field to both the model AND the table?

Which database field was nullable again?


Core Capabilities

Type-Safe Data Models

Define your schema once, get validation everywhere—catch errors at dev time, not in production.
interface Event {
  id: Key<string>;
  name: string;
  createdAt: Date;
}
 
interface AggregatedEvent {
  count: number;
  name: string;
}

HTTP APIs

Expose data ingestion and analytics endpoints-get type-safe validation and auto-generated docs for free.
const postEvent = new IngestApi<Event>("post-event", {
  destination: stream,
});
 
const getEvents = new ConsumptionApi<Params, Event>("get-events", {
async handler({limit = 10}, {client, sql}) {
  // query database and return results
}
});

Real-Time Streaming

Process events as they arrive with built-in Kafka/Redpanda—no separate streaming infrastructure to manage.
const stream = new Stream<Event>("events", {
  destination: table,
});
 
stream.addConsumer((event) => {
  console.log(event);
});

Analytical Database

Store and query data with ClickHouse's columnar engine—100x faster than traditional databases for analytics.
const table = new OlapTable<Event>("events");
 
const mv = new MaterializedView<AggregatedEvent>({
  selectStatement: sql`
    SELECT count(*) as count, name
    FROM ${table}
    GROUP BY name
  `,
  selectTables: [table],
  //...
});

Workflow Orchestration

Schedule or trigger background jobs to move data between your analytical database and other source or destination systems.
const etl = new Workflow("my_etl", {
  startingTask: startEtl,
  schedule: "@every 1h",
  retries: 3,
})

Zero-Config Local Development

Spin up an exact replica of your production stack on your laptop with one command (you don’t need to configure anything, it’s all pre-configured):

$ moose dev
 
 
 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

Hot-Reload

Moose automatically reloads your application on save, just like web frameworks. Add a field to your data model, and all dependent components update instantly:

interface Event {
  id: Key<string>;
  name: string;
  createdAt: Date;
  status: string; // New field
}
⢹ Processing Infrastructure changes from file watcher
             ~ Topic: events - Version: 0.0 - Retention Period: 604800s - Partition Count: 1
             ~ Table events with column changes: [Added(Column { name: "status", data_type: String, required: true, unique: false, primary_key: false, default: None })] and order by changes: OrderByChange { before: [], after: [] }
             ~ Topic to Table Sync Process: events_0_0 -> events
             ~ API Endpoint: events - Version: 0.0 - Path: ingest/events - Method: POST - Format: Some(Json)

Learn more in the 5-minute tutorial.


Common Use Cases

User-Facing Analytics

Embed real-time dashboards and metrics in your product. Moose handles event ingestion, streaming, aggregation, and exposes APIs for your frontend.

Operational Data Warehouse

Centralize business data from SaaS, databases, and apps. Moose orchestrates ingestion, transformation, and storage in ClickHouse for BI tools.

Observability

Monitor application and infrastructure metrics/logs at scale. Moose ingests telemetry, processes streams, and exposes data for monitoring platforms.

Community & Support