Yama JS
Build APIs Faster
Configuration-first backend platform that turns YAML into fully functional APIs, SDKs, and documentation
npx @betagors/yama-cli create my-api
Why Yama?
Yama separates structure from logic:
- Structure lives in YAML (schemas, endpoints, auth rules, behaviors)
- Logic lives in TypeScript handlers
- Platform handles everything else (routing, validation, generation, docs, consistency)
This approach dramatically reduces boilerplate, prevents AI hallucinations, and enables teams to build apps faster and safer.
โจ Features
YAML-First Configuration
Define your entire API structure in yama.yaml
Type-Safe TypeScript
Auto-generated types and SDKs from your config
Plugin System
Extensible architecture with database and HTTP adapters
Auto-Generated Docs
OpenAPI documentation generated from your config
Powerful CLI
Development server, code generation, and migration tools
Built-in Auth
JWT authentication and authorization rules
Database Support
PostgreSQL and PGLite adapters with migrations
Fast Development
Hot reload, watch mode, and instant feedback
๐ Quick Start
Install the Yama CLI globally:
npm install -g @betagors/yama-cliCreate a new project:
yama create my-api
cd my-api
npm installStart the development server:
yama devYour API will be running at http://localhost:4000 ๐
Quick Example
Define your API structure in yama.yaml:
name: my-api
version: 1.0.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"Write your business logic in TypeScript:
import { HandlerContext } from '@betagors/yama-core';
export async function listTodos(context: HandlerContext) {
return [
{ id: '1', title: 'Learn Yama', completed: false },
{ id: '2', title: 'Build an API', completed: true },
];
}Thatโs it! Yama handles routing, validation, type generation, and documentation automatically.
๐ Documentation
Getting Started
Learn the basics of Yama and build your first API
Core Concepts
Understand schemas, entities, endpoints, and handlers
API Reference
Complete reference for all CLI commands and configuration
Guides
Step-by-step guides for common tasks
Examples
See Yama in action with real-world examples
Plugins
Extend Yama with plugins and adapters
๐ก Philosophy
Yamaโs core philosophy:
- YAML defines the contract - Structure is explicit and version-controlled
- Code defines custom behavior - Business logic stays in TypeScript
- Yama guarantees correctness - Type safety, validation, and consistency
Made with โค๏ธ by Betagors Labs