START HERE

Getting started

A valid RAIQL program begins with application intent and grows by adding only the requirements the system needs.

1. Declare the application

Every specification needs a named application. Application type may be declared inline or as a separate statement.

CREATE APPLICATION "Inventory Hub";
TYPE WEB;

Supported application types are WEB, MOBILE and API.

2. Select the stack

USE STACK records implementation targets without mixing framework-specific code into the domain model.

USE STACK
  FRONTEND NEXTJS,
  BACKEND SPRING_BOOT,
  DATABASE POSTGRESQL,
  CACHE REDIS;

Recognized stack categories are FRONTEND, BACKEND, DATABASE, CACHE, QUEUE and CLOUD.

3. Model an entity

CREATE ENTITY Product (
  id UUID PRIMARY,
  sku STRING REQUIRED UNIQUE,
  name STRING REQUIRED,
  price DECIMAL REQUIRED,
  active BOOLEAN
);

Fields consist of a name, a data type and optional modifiers. The compiler preserves these declarations in the IR.

4. Add application behavior

CREATE CRUD Product;
CREATE API Product;
ADD AUTHENTICATION JWT;
GENERATE TESTS;
BUILD;

CRUD and API declarations are validated against known entities. Referencing an entity that does not exist produces a compiler error.

5. Compile in the playground

Open the Playground, edit the source and inspect the generated IR and scaffold. Compilation happens in the browser for the deterministic language core.

Continue exploring RAIQLOpen the playground →