Developer toolkit for building real-time analytical backends in Typescript and Python — MooseStack modules offer type‑safe, code‑first abstractions for popular open source analytical infrastructure, including ClickHouse, Kafka, Redpanda, Temporal, and Redis.
MooseStack is designed to bring the best of the modern web-development experience to any developer building an application that needs to integrate an analytics stack.
- 5‑minute setup: Install the CLI and bootstrap a backend.
- Pre‑integrated components: ClickHouse (storage), Redpanda (streaming), Temporal (orchestration).
- Hot‑reload development: Run everything locally with live schema migrations.
- Code‑first infrastructure: Declare tables, streams, workflows, and APIs in TS/Python -> MooseStack wires it all up.
- Modular design: Only enable the modules you need. Each module is independent and can be adopted incrementally.
- Built for speed: ClickHouse is a columnar database that is roughly 100× faster than traditional databases for analytical queries.
- Moose OLAP: Manage ClickHouse tables, materialized views, and migrations in code.
- Moose Streaming: Real‑time pipelines with Kafka/Redpanda and transformation functions.
- Moose Workflows: ETL pipelines and tasks with Temporal.
- Moose APIs: Type‑safe ingestion and query endpoints with auto‑generated OpenAPI docs.
- Moose Tooling: Moose Deploy, Moose Migrate, Moose Observability
Also available in the Docs: 5-minute Quickstart
Already running Clickhouse: Getting Started with Existing Clickhouse
bash -i <(curl -fsSL https://fiveonefour.com/install.sh) moose# typescript
moose init my-project --from-remote <YOUR_CLICKHOUSE_CONNECTION_STRING> --language typescript
# python
moose init my-project --from-remote <YOUR_CLICKHOUSE_CONNECTION_STRING> --language pythoncd my-project
moose devMooseStack will start ClickHouse, Redpanda, Temporal, and Redis; the CLI validates each component.
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 ({limit = 10}: QueryParams, {client, sql}) => {
const result = await client.query.execute(sql`SELECT * FROM ${clickhouseTable} LIMIT ${limit}`);
return await result.json();
}
);from moose_lib import Key, OlapTable, Stream, StreamConfig, IngestApi, IngestApiConfig, ConsumptionApi
from pydantic import BaseModel
class DataModel(BaseModel):
primary_key: Key[str]
name: str
# Create a ClickHouse table
clickhouse_table = OlapTable[DataModel]("TableName")
# Create a Redpanda streaming topic
redpanda_topic = Stream[DataModel]("TopicName", StreamConfig(
destination=clickhouse_table,
))
# Create an ingest API endpoint
ingest_api = IngestApi[DataModel]("post-api-route", IngestApiConfig(
destination=redpanda_topic,
))
# Create a consumption API endpoint
class QueryParams(BaseModel):
limit: int = 10
def handler(client, params: QueryParams):
return client.query.execute("SELECT * FROM {table: Identifier} LIMIT {limit: Int32}", {
"table": clickhouse_table.name,
"limit": params.limit,
})
consumption_api = ConsumptionApi[RequestParams, DataModel]("get-api-route", query_function=handler)- ClickHouse (OLAP storage)
- Redpanda (streaming)
- Temporal (workflow orchestration)
- Redis (internal state)
Moose is beta software and under active development. Multiple public companies are using Moose in production. If you’re evaluating production use, consider Boreal Cloud or review the documentation for self-hosting. You can also reach us at [email protected] or join the slack community.
Join us on Slack: https://join.slack.com/t/moose-community/shared_invite/zt-2fjh5n3wz-cnOmM9Xe9DYAgQrNu8xKxg
We welcome contributions! See the contribution guidelines.
MooseStack is open source software and MIT licensed.