RAIQL DOCUMENTATION

Requirements, expressed as code.

RAIQL is a declarative language for describing software systems in a form that remains readable to people while being structured enough for deterministic compilation and application generation.

Current stable language version: 1.0The documentation below describes syntax implemented by the RAIQL compiler included with this release.
Prefer learning by building?Follow the 10-part ServiceDesk tutorial series from first app through multi-tenancy, testing and production deployment.

Start with a complete program

A RAIQL specification typically declares an application, selects its stack, defines domain entities, exposes behavior, declares security intent and ends with delivery actions.

task-board.raiql
CREATE APPLICATION "Task Board";
TYPE WEB;

USE STACK
  FRONTEND NEXTJS,
  BACKEND NEXTJS,
  DATABASE POSTGRESQL;

CREATE ENTITY Task (
  id UUID PRIMARY,
  title STRING REQUIRED,
  completed BOOLEAN REQUIRED,
  ownerId UUID REQUIRED
);

CREATE CRUD Task;
CREATE API Task;
CREATE USER ENTITY User;
ADD AUTHENTICATION EMAIL_PASSWORD, JWT;
ADD ROLE ADMIN, USER;
DEFAULT ROLE USER;
ENVIRONMENT development, staging, production;
SECRET DATABASE_URL, RAIQL_JWT_SECRET;
RELATE Task.ownerId TO User.id;
OWN Task BY ownerId;
ALLOW ADMIN CREATE Task, READ Task, UPDATE Task, DELETE Task;
ALLOW USER CREATE OWN Task, READ OWN Task, UPDATE OWN Task, DELETE OWN Task;
GENERATE OPENAPI;
GENERATE SDK TYPESCRIPT;
GENERATE TESTS;
BUILD;
DEPLOY AWS ECS;

Documentation map

Design principles

Explicit

Important application intent should exist in source rather than be inferred repeatedly.

Validatable

The compiler checks syntax and cross-references before generation begins.

Runnable

WEB and API targets generate runnable Next.js projects; MOBILE targets generate runnable Expo clients. Server targets support zero-setup memory storage or persistent PostgreSQL through Prisma ORM.

Reviewable

A RAIQL file is compact enough to review alongside source code and architecture changes.