TARGETS

API & mobile targets

RAIQL 0.18 promotes TYPE API and TYPE MOBILE from contract-only declarations into executable generator targets.

Runnable API service

CREATE APPLICATION "Payments API" TYPE API;
USE STACK BACKEND NEXTJS, DATABASE POSTGRESQL;
CREATE API Payment;
GENERATE OPENAPI;
BUILD;

TYPE API uses the same Next.js route, PostgreSQL, security, tenancy, events and observability adapters as the server side of the WEB target, without generating CRUD workspace pages.

API runtime

Supported API stacks are BACKEND NEXTJS with DATABASE MEMORY or DATABASE POSTGRESQL. OpenAPI can also be served at /api/openapi when requested.

Runnable Expo mobile client

CREATE APPLICATION "Field Service" TYPE MOBILE;
USE STACK FRONTEND EXPO, BACKEND REMOTE;
CREATE API WorkOrder;
BUILD;

The generated Expo SDK 57 application consumes a remote RAIQL-compatible API through EXPO_PUBLIC_RAIQL_API_URL. It includes generated domain contracts, API client code and starter list/create screens for declared API entities.

Mobile authentication

JWT and email/password declarations are reflected in the client surface. The generated starter can sign in against /api/auth/login and attach bearer/tenant headers. In 0.18 JWT state is kept in memory; production secure-storage behavior is intentionally left to the application.

Generate target projects

terminal
raiql init payments --template api
raiql init field-service --template mobile

cd payments && raiql dev
cd ../field-service && raiql dev
Continue exploring RAIQLOpen the playground →