RAIQL COMPILER
Playground
Edit a RAIQL specification and inspect the normalized intermediate representation, compiler diagnostics and generated application.
Valid specification
{
"language": "RAIQL",
"version": "1.0",
"application": {
"name": "Commerce Core",
"type": "WEB"
},
"stack": {
"frontend": "NEXTJS",
"backend": "NEXTJS",
"database": "POSTGRESQL"
},
"entities": [
{
"name": "Customer",
"fields": [
{
"name": "id",
"type": "UUID",
"modifiers": [
"PRIMARY"
]
},
{
"name": "email",
"type": "STRING",
"modifiers": [
"REQUIRED",
"UNIQUE"
]
}
]
},
{
"name": "Order",
"fields": [
{
"name": "id",
"type": "UUID",
"modifiers": [
"PRIMARY"
]
},
{
"name": "customerId",
"type": "UUID",
"modifiers": [
"REQUIRED"
]
},
{
"name": "total",
"type": "DECIMAL",
"modifiers": [
"REQUIRED"
]
},
{
"name": "tenantId",
"type": "UUID",
"modifiers": [
"REQUIRED"
]
}
]
},
{
"name": "Tenant",
"fields": [
{
"name": "id",
"type": "UUID",
"modifiers": [
"PRIMARY"
]
},
{
"name": "name",
"type": "STRING",
"modifiers": [
"REQUIRED",
"UNIQUE"
]
}
]
},
{
"name": "User",
"fields": [
{
"name": "id",
"type": "UUID",
"modifiers": [
"PRIMARY"
]
},
{
"name": "email",
"type": "STRING",
"modifiers": [
"REQUIRED",
"UNIQUE"
]
},
{
"name": "passwordHash",
"type": "STRING",
"modifiers": [
"REQUIRED"
]
},
{
"name": "role",
"type": "STRING",
"modifiers": [
"REQUIRED"
]
}
]
}
],
"relationships": [
{
"fromEntity": "Order",
"fromField": "customerId",
"toEntity": "Customer",
"toField": "id"
},
{
"fromEntity": "Order",
"fromField": "tenantId",
"toEntity": "Tenant",
"toField": "id"
}
],
"crud": [
"Customer",
"Order"
],
"apis": [
"Order"
],
"authentication": [
"EMAIL_PASSWORD",
"JWT"
],
"roles": [
"ADMIN",
"USER"
],
"permissions": [
{
"role": "ADMIN",
"action": "CREATE",
"target": "Order",
"scope": "ANY"
},
{
"role": "ADMIN",
"action": "READ",
"target": "Order",
"scope": "ANY"
},
{
"role": "ADMIN",
"action": "UPDATE",
"target": "Order",
"scope": "ANY"
},
{
"role": "ADMIN",
"action": "DELETE",
"target": "Order",
"scope": "ANY"
},
{
"role": "USER",
"action": "READ",
"target": "Order",
"scope": "ANY"
}
],
"ownership": [],
"tenancy": [
{
"entity": "Order",
"field": "tenantId"
}
],
"tenantEntity": "Tenant",
"events": [
{
"name": "OrderCreated",
"entity": "Order"
}
],
"jobs": [
{
"name": "AuditOrder",
"event": "OrderCreated"
}
],
"observability": [
"HEALTH",
"LOGS",
"METRICS",
"TRACES"
],
"userEntity": "User",
"defaultRole": "USER",
"environments": [],
"secrets": [],
"actions": [
"GENERATE_OPENAPI",
"GENERATE_SDK_TYPESCRIPT",
"GENERATE_TESTS",
"BUILD",
"DEPLOY_DOCKER",
"DEPLOY_DOCKER_COMPOSE",
"DEPLOY_KUBERNETES"
]
}