TUTORIAL 01 · BEGINNER

Build Your First RAIQL App

Create a small ServiceDesk application, validate the specification, generate code and run it locally.

RAIQL 1.015 minProject: ServiceDesk
By the end of this tutorial
  • Initialize a RAIQL project
  • Define an application and Ticket entity
  • Generate a runnable web app
  • Understand source → IR → generated project

Create the project

Start with the memory template so the first run needs no database. RAIQL creates app.raiql, raiql.config.json and the generated output directory contract.

terminal
raiql init servicedesk --template memory
cd servicedesk
raiql --version

Write the application contract

Replace app.raiql with the specification below. The Ticket entity is the first domain object in the ServiceDesk application.

app.raiql
CREATE APPLICATION "RAIQL ServiceDesk";
TYPE WEB;

USE STACK
  FRONTEND NEXTJS,
  BACKEND NEXTJS,
  DATABASE MEMORY;

CREATE ENTITY Ticket (
  id UUID PRIMARY,
  title STRING REQUIRED,
  description STRING,
  status STRING REQUIRED
);

CREATE CRUD Ticket;
CREATE API Ticket;

BUILD;

Validate before generation

Validation checks syntax and cross-references without generating the application. Treat this as the first gate in every RAIQL workflow.

terminal
raiql validate
raiql compatibility

Generate and run

Generate the application and start the development server. The memory adapter is intentionally zero-setup for this first tutorial.

terminal
raiql generate
raiql dev

What RAIQL generated

  • A Next.js application shell
  • Ticket domain types
  • CRUD/API routes
  • RAIQL IR metadata
  • Build and runtime configuration
RAIQL ruleThe RAIQL source remains the application requirement contract. Generated code is an implementation artifact, not a replacement for that contract.