Create Your Project
An ARO application is simply a folder containing .aro files and an
openapi.yaml contract. Let's create a Hello World API.
Your project structure will look like this:
Define Your API Contract
ARO uses contract-first development. Your openapi.yaml defines
what endpoints exist. The operationId maps directly to your ARO feature sets.
openapi: 3.0.3 info: title: Hello World API version: 1.0.0 servers: - url: http://localhost:8000 paths: /hello: get: operationId: sayHello # ← This maps to your ARO feature set! summary: Say Hello responses: '200': description: A friendly greeting
The operationId is the bridge between your API and your code.
sayHello in the contract means you need a feature set named sayHello.
Write Your Application Entry Point
Every ARO application needs exactly one Application-Start feature set.
This is where your application begins.
(* Application Entry Point *) (Application-Start: Hello World API) { (* Log a startup message *) <Log> the <startup: message> for the <console> with "Starting server...". (* Start the HTTP server on port 8000 *) <Start> the <http-server> on <port> with 8000. (* Keep the application running to process HTTP requests *) <Keepalive> the <application> for the <events>. (* Return OK to indicate successful startup *) <Return> an <OK: status> for the <startup>. }
Create Your Feature Handler
Now create the feature set that handles your API endpoint.
Remember: the feature set name must match the operationId from your contract.
(* Handler for GET /hello *) (* Feature set name matches operationId from openapi.yaml *) (sayHello: Greeting API) { (* Create our greeting message *) <Create> the <greeting> with "Hello, World!". (* Return it as a successful response *) <Return> an <OK: status> with <greeting>. }
Every statement follows: <Action> the <Result>
preposition the <Object>.
It reads like English because it is English—structured for machines.
Run Your Application
Check your syntax, then run your application:
Test your API:
🎉 That's it! You've built your first ARO application.