Skip to content

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

ModulePurposeIdentity Strategy
FormsID-based CRUD collections for structured dataID-based
BookmarksID-based CRUD collections for user referencesID-based
Flux ScriptsKey-based semantic singletons for workflow automationKey-based
TemplatesKey-based semantic singletons for dynamic contentKey-based
ACLHTTP-key-based route maps for API permissionsHTTP-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.json

CLI example:

obx app forms get frm_abc123def456

Key-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.json

CLI example:

obx app flux:scripts push user.created

HTTP-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.json

CLI example:

obx app acl push post@/api/v1/users

Filesystem Mapping

Each identity strategy maps to a deterministic filesystem layout. Your local /app directory mirrors the platform’s resource store:

StrategyFile PatternExample
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

SectionDescription
Flux Events and ScriptsDeep dive into event-driven script execution
ACL and PermissionsControl API access with route-based rules
StorageHandle file uploads and generated content