Configuration-first backend platform

Build APIs from YAML

Yama reads your config, generates type-safe routes, SDKs, and docs from a single IR, and keeps your handlers clean in TypeScript.

Type-safe IR
Auto-generated SDKs
Zero-boilerplate
yama.yaml
v0.1.0
name: yamajs-demo
version: 0.1.0

schemas:
  Todo:
    type: object
    properties:
      id: { type: string, format: uuid }
      title: { type: string }
      completed: { type: boolean }

endpoints:
  /todos:
    get:
      handler: handlers/listTodos
      response:
        type: array
        items: { $ref: '#/schemas/Todo' }

Why teams choose Yama

Stop maintaining boilerplate. Define your contract once and let Yama handle the rest.

YAML-first, type-safe

Describe schemas, endpoints, and auth in one config. Yama turns it into validated routes, OpenAPI, and types.

IR-powered SDKs

A single intermediate representation powers client SDKs and docs, so every change ships consistently.

Batteries-included runtime

Handlers, plugins, JWT auth, migrations, and platform utilities are ready out of the box—no scaffolding drama.

CLI built for flow

Spin up dev servers, generate code, and migrate with one CLI. Everything stays in sync with your config.

From config to runtime

Configuration defines the contract; TypeScript defines the behavior. The IR keeps SDKs, docs, and runtime aligned.

1

Describe

Capture your API surface in yama.yaml—schemas, entities, endpoints, plugins, and auth rules.

2

Implement

Write TypeScript handlers for the bits that need logic. Yama wires routing, validation, and types.

3

Ship

Generate SDKs and docs from the IR. Publish with confidence knowing contracts and code match.

handlers/todos.ts
import { HandlerContext } from '@betagors/yama-core';

export async function listTodos(ctx: HandlerContext) {
  // Types are automatically inferred from schema
  return ctx.db.select('todos')
    .orderBy('createdAt', 'desc');
}

export async function createTodo(ctx: HandlerContext) {
  // Body is validated before reaching handler
  const todo = await ctx.db.insert('todos', ctx.body);
  return { id: todo.id, ...ctx.body };
}

Ready to build?

Install the CLI, start the dev server, and open the docs to ship your first endpoint in minutes.

npm install -g @betagors/yama-cli