Modules
Overview
Modules are the composable building blocks of an Oblax application. Each module provides a specific backend capability — storing structured data, managing user references, executing scripts, rendering templates, or controlling API access. You pick the modules you need, define them locally in your /app directory, and push them to the platform to get a fully hosted, scalable API.
Every module declares exactly one identity strategy that determines how its resources are identified, stored on disk, and accessed via the CLI and API. Understanding these strategies is key to working effectively with modules.
Available Modules
| Module | Purpose | Identity Strategy |
|---|---|---|
| Forms | ID-based CRUD collections for structured data | ID-based |
| Bookmarks | ID-based CRUD collections for user references | ID-based |
| Flux Scripts | Key-based semantic singletons for workflow automation | Key-based |
| Templates | Key-based semantic singletons for dynamic content | Key-based |
| ACL | HTTP-key-based route maps for API permissions | HTTP-key-based |
Identity Strategies
Oblax uses three identity strategies. Each module maps to exactly one.
ID-Based Identity
Used by Forms and Bookmarks. Resources are identified by a platform-generated unique ID. Multiple entries exist per module, forming a collection.
/app/forms/
frm_abc123def456.json
frm_ghi789jkl012.jsonCLI example:
obx app forms get frm_abc123def456Key-Based Identity
Used by Flux Scripts and Templates. Resources are identified by a human-readable key that you define. Each key maps to a single resource — a semantic singleton.
/app/flux/
flux_on_user_created.json
flux_on_order_placed.jsonCLI example:
obx app flux:scripts push user.createdHTTP-Key-Based Identity
Used by ACL. Resources are identified by an HTTP method and route pair. Each pair maps to one access rule.
/app/acl/
post_api_v1_users.json
get_api_v1_users.jsonCLI example:
obx app acl push post@/api/v1/usersFilesystem Mapping
Each identity strategy maps to a deterministic filesystem layout. Your local /app directory mirrors the platform’s resource store:
| Strategy | File Pattern | Example |
|---|---|---|
| ID-based | /app/<module>/<id>.json | /app/forms/frm_abc123def456.json |
| Key-based | /app/<module>/<key>.json | /app/flux/flux_on_user_created.json |
| HTTP-key-based | /app/<module>/<method>_<route>.json | /app/acl/post_api_v1_users.json |
Module Composition
Modules are designed to work together. A typical application combines multiple modules to build a complete backend:
User Input → Forms → Flux Scripts → Storage / Notifications
↑
Templates- Forms collect structured data from users
- Flux Scripts trigger automation when events occur
- Templates render dynamic content for notifications or emails
- ACL controls which tokens can access which endpoints
- Bookmarks let users save references to records
Module Registry
Every module registers itself with the platform using a declarative configuration:
{
"name": "forms",
"domain": "app",
"identity": "id",
"storage": "collection",
"filesystem": {
"type": "directory",
"path": "/app/forms"
},
"actions": ["list", "get", "init", "push", "pull", "del"]
}The registry tells the CLI how to map commands to filesystem operations and API calls. You do not need to edit this configuration — it is managed by the platform.
Where to next
| Section | Description |
|---|---|
| Flux Events and Scripts | Deep dive into event-driven script execution |
| ACL and Permissions | Control API access with route-based rules |
| Storage | Handle file uploads and generated content |