Welcome to Radiant

.radiant Files

Schema & Config

CLI Compiler

Lexer & Parser

AST
Types

Bun Runtime

Live APIs & DB

GET/api/users
POST/api/posts

Radiant is a schema-first backend framework that turns a declarative domain-specific language (.radiant files) into a fully functional API server. You describe your data model, security policies, and infrastructure settings in the Radiant DSL; the compiler validates and transforms them into a typed runtime, database schema, and CRUD API endpoints — no boilerplate required.

How It Works

Radiant operates fundamentally differently from traditional frameworks. Instead of manually writing and maintaining complex boilerplate code across your stack, you declare your desired architecture using a custom, highly readable syntax.

The engine then does the heavy lifting, acting as an extremely fast compiler that bridges the gap between your abstract design and a robust, production-ready backend.

  1. You write .radiant files in the radiant/ directory of your project.
  2. The CLI (radiant generate or radiant dev) parses these files into a language-agnostic Universal AST (Abstract Syntax Tree).
  3. The AST lowers into your target language's native runtime (currently Bun, with Go and Python support planned).
  4. The runtime boots up an extremely fast server with auto-generated REST endpoints, authentication, realtime subscriptions, and more.

Design Philosophy

The core of Radiant is built on the idea that infrastructure and data logic should be universally portable. You should never have to rewrite the same access controls, database relationships, and API configurations just because you switched languages or platforms.

By separating the "what" from the "how", Radiant ensures your backend remains clean, scalable, and entirely focused on business value.

  • Language-Agnostic Core. The Radiant DSL is universally portable. It describes the "what" (schemas, access rules, infrastructure), while the underlying engine handles the "how" in native code.
  • Schema as source of truth. Your .radiant files are the canonical definition. Everything else — database DDL, API routes, and native types — is derived. You never edit generated files by hand.
  • No migration files. Radiant syncs the database directly from the compiled schema using radiant db:sync. No versioned migration files to manage.
  • Configuration as code. Security policies, rate limits, CORS, monitoring — all declared in the DSL, validated at compile time, and wired into the runtime automatically.

What Radiant Gives You

FeatureHow
CRUD APIEvery collection gets GET, POST, PUT, DELETE routes automatically.
AuthenticationJWT, session, or API key strategies — declared in the DSL, enforced by the runtime.
Access ControlPer-collection read/create/update/delete rules written in TypeScript.
HooksbeforeCreate, afterCreate, beforeUpdate, afterUpdate, beforeDelete, afterDelete — lifecycle hooks in TypeScript.
RealtimeWebSocket and Server-Sent Events subscriptions on collection changes.
CachingPer-collection TTL and stale-while-revalidate strategies.
Rate LimitingConfigurable per-action (write, login) limits with time windows.
OpenAPI DocsAuto-generated Swagger/OpenAPI spec at /api/docs.
Admin UIOptional admin dashboard driven by your collection schema.
Database Syncradiant db:sync diffs the compiled schema against your database and applies changes safely.
Editor SupportVS Code extension + LSP with diagnostics, autocompletion, and formatting.

Quick Example

Here is a complete Radiant project in two files:

// radiant/config.radiant

config {
  core: {
    api: {
      prefix: "/api"
    }
  }

  security: {
    auth: {
      strategies: ["jwt"]
      jwt: {
        accessTokenExpiry: "15m"
        refreshTokenExpiry: "7d"
      }
    }
  }

  monitoring: {
    healthCheck: {
      enabled: true
      path: "/health"
    }
  }
}
// radiant/collections.radiant

collection users {
  auth: true
  fields: {
    name: text
    email: email @unique
    password: password
    role: text @default("user")
  }
}

collection todos {
  fields: {
    title: text
    completed: boolean @default(false)
    author: relationship("users")
  }
}

Run radiant generate and the engine automatically provisions your backend:

Compiled Assets

Output FileDescription
radiant/schema.jsonThe compiled Universal AST schema
radiant/gen.tsThe high-performance native entry point
radiant-types.tsStrictly-typed interfaces for all collections

Runtime Capabilities

FeatureDetails
REST EndpointsAuto-generated GET, POST, PUT, and DELETE endpoints for todos, users, etc.
AuthenticationJWT auth securely wired into the users collection out-of-the-box.
MonitoringA built-in health check accessible at /health.
DocumentationAn auto-generated OpenAPI (Swagger) spec available at /api/docs.

Next Steps