Create your first application
Overview
An Oblax application consists of modules (forms, bookmarks, flux scripts, templates, ACL rules) that define CRUD operations, filesystem storage under /app, CLI management, SDK integration, and auto-generated REST endpoints.
Application development follows a modular approach where you initialize each module, push resources to the platform, and manage them through deterministic CLI commands.
Installation
Application development requires the Oblax CLI installed and a project initialized.
Verify Prerequisites
obx version
obx loginProject Structure
Ensure you have a project with the standard /app structure:
my-project/
├── oblax.json
└── app/
├── forms/
├── bookmarks/
├── flux/
├── templates/
└── acl/Configuration
Step 1: Scaffold Your First Module — Forms
The most common starting point is the Forms module — it lets you collect structured data from users.
Initialize Forms
obx app forms initWhat this does:
- Creates
./app/forms/init.jsonwith an empty form schema - The file contains the structure with empty fields, ready for you to populate
- Success message is displayed
Output:
| SUCCESS: Role file initialized
| Edit the initialized role file ./app/forms/init.jsonEdit the Initialized File
code ./app/forms/init.jsonAdd your form fields. Example minimal form:
{
"name": "contact_form",
"fields": [{ "name": "email", "type": "string", "required": true }]
}Push Forms to the Platform
obx app forms push initThis creates the form on the platform and assigns it a platform-generated ID.
Output:
| SUCCESS: Role created
| The role 'contact_form' has been successfully created on the platform.
|
| Local copy of the record is saved in ./app/forms/f2837hfd17q3phc3.jsonFrom now on, refer to this record by its ID f2837hfd17q3phc3 — not by the name init.
Step 2: Scaffold Your Second Module — Bookmarks
Bookmarks are another ID-based module, useful for saving user references.
Initialize Bookmarks
obx app bookmarks initPush Bookmarks to Platform
obx app bookmarks pushStep 3: Add a Flux Script (Key-Based Module)
Flux scripts are key-based semantic singletons. They trigger workflows based on platform events.
Initialize a Flux Script
obx app flux:scripts init user.createdKey validation: The CLI validates whether user.created is a valid key. If not, an error is shown:
| ERROR: Flux handler initialization failed
| The key "user.created" is not a valid flux handler script key.If valid, a local file ./app/flux-scripts/flux_on_user_created.js is created with a stub function.
Output:
| SUCCESS: Flux handler initialized
| A new flux handler script with a stub function has been initialized.
|
| Edit the initialized flux handler file
| - ./app/flux-scripts/flux_on_user_created.jsPush the Flux Script
obx app flux:scripts push user.createdThis pushes the script to the platform.
Step 4: Add a Template (Key-Based Module)
Templates are key-based and user-identified by name or format.
Initialize a Template
obx app templates init 'My First Template' --format htmlWhat this creates:
./app/templates/a_very_new_template_html.html— the template file./app/templates/a_very_new_template_html.json— meta file with resource type
Output:
| SUCCESS: Template initialized
| A new template file with an accompanying meta file have been initialized.
|
| Edit the initialized template files
| - ./app/templates/a_very_new_template_html.html
| - ./app/templates/a_very_new_template_html.jsonPush the Template
obx app templates push a_very_new_template_htmlStep 5: Configure ACL (HTTP-Key-Based Module)
ACL modules define API permissions using HTTP method + route patterns.
Initialize ACL Rules
obx app acl initPush ACL Rules
obx app acl push post@/api/v1/usersThis maps to the filesystem file post_api_v1_users.json.
Usage
Running Your First App Locally
Oblax includes a local development server. From your project root:
obx runWhat this starts:
- Local Oblax development server (
$PORTdefaults to8080) - Your initialized modules (forms, bookmarks, etc.)
- Live reload as you edit
/appfiles - API endpoints at
http://localhost:8080/api/v1/...
Try it:
- Ensure you have at least one module initialized (e.g., forms)
- Run
obx run - Visit
http://localhost:8080in your browser - You should see the Oblax welcome page or your module’s entry point
Application Checklist
| Item | Status |
|---|---|
oblax.json at project root | ✓ Created during obx project create |
| Forms module initialized | obx app forms init ✓ |
| Form pushed to platform | obx app forms push init ✓ |
| Bookmarks module initialized | obx app bookmarks init (optional) |
| Flux script initialized (optional) | obx app flux:scripts init user.created |
| Template initialized (optional) | obx app templates init 'Name' --format html |
| ACL rules configured (optional) | obx app acl init |
| Local server running | obx run ✓ |
Next Steps
Your application is scaffolded and running. Now:
- Make your first API call — authenticate and interact with your forms data
- Run your first CLI command — practice CRUD workflows
- Make your first SDK call — integrate from a web or mobile front-end