Skip to content

Gate Framework

Understand the framework that composes and runs Aster product runtimes.

Gate is Aster’s product runtime framework. It lives in packages/gate and is published as @aster/gate.

Distro uses Gate to assemble the default Aster product. Custom products can use the same framework shape to compose identity, services, routes, runtime capabilities, spaces, installables, database modules, marketplace sources, analytics, and observability.

What Gate owns

  • product identity and module definitions
  • graph validation and module ordering
  • runtime planning and scoped startup/shutdown
  • Effect service layers for runtime services
  • route and HTTP server integration
  • runtime socket contracts
  • database, marketplace, analytics, and observability contracts
  • SDK generation metadata
  • test helpers for product runtimes

Gate is intentionally framework-level. It defines how product modules fit together; it does not own the default Aster product itself. That product lives in packages/distro.

Main entrypoints

EntrypointUse it for
@aster/gateGateway.make(), Gateway.module.define(), product contracts, runtime planning, and shared types.
@aster/gate/nodeStarting a GatewayInstance as a local HTTP/runtime process.
@aster/gate/httpHTTP server helpers and auth utilities.
@aster/gate/contractsContract schemas and service interfaces shared by routes and SDK generation.
@aster/gate/generateSDK and OpenAPI generation support.
@aster/gate/databaseGateway state-store contracts.
@aster/gate/marketplaceMarketplace source contracts.
@aster/gate/testingTest helpers for framework and product-runtime work.

Product modules

Gate modules describe what a product contributes:

import { Gateway } from "@aster/gate"
const module = Gateway.module.define({
id: "example",
displayName: "Example Module",
routes: [
{
id: "route:example",
scope: "internal",
mountPath: "/gateway/v1/internal/example",
},
],
})

Distro composes many modules into a product runtime:

import { Gateway } from "@aster/gate"
export function exampleProduct() {
return Gateway.make({
identity: {
id: "example",
name: "Example",
description: "An Aster product runtime.",
},
modules: [
// database, auth, routes, runtime services, spaces, plugins, apps...
],
})
}

Where to work

  • Change the default product in packages/distro.
  • Change framework contracts, planning, validation, or HTTP/runtime plumbing in packages/gate.
  • Change concrete providers in packages/gate-adapters.
  • Change programmable per-space behavior in packages/spaces or the relevant capability/plugin package.

packages/seed is deprecated and excluded from the active workspace.