Blueprint Best Practices

Give each blueprint one job, name things so the canvas explains itself, share logic through public functions, bound every search and move slow work out of the request.

A free-form canvas can grow into an unnavigable tangle as easily as into a clean component. These are the conventions we recommend for teams building serious systems. Each one links to the feature it builds on.

Split a blueprint when it does more than one job

Dedicate each blueprint to one component: a page, an API endpoint, or a set of related functions. Resist adding "just one more flow" to an existing canvas.

Signs a blueprint has grown too big:

  • You rely on the minimap and Ctrl + F block search for every move, because scrolling no longer works.
  • It mixes unrelated responsibilities: a page, its API and three scheduled jobs side by side.
  • New team members cannot tell what the blueprint is from the overview, even with tags.

When you create a new blueprint, pick the matching blueprint type so the canvas starts with the right block.

Splitting does not mean duplicating logic. Create a trigger_custom_function block in a dedicated function blueprint and call it from anywhere with function_custom_execute. See Block Execution for how calls execute.

Names are your primary documentation

A system with no code files is read through its names. Adopt conventions early and apply them everywhere:

Artifact Convention Example
Blueprint Name it after the single component it implements. Task list page, Tasks API
Namespace Set one namespace per function blueprint; it prefixes all functions, public and private. tasks → tasks.list_tasks
Function event snake_case verb + noun describing the action. list_tasks, send_invoice_email
Storage Lowercase plural noun: field names are stored lowercase and searches are case-sensitive, so lowercase avoids a whole class of bugs. tasks, messages
  • Use the built-in namespace feature (click the blueprint title at the top) instead of prefixing each function by hand. The origin of every function is then obvious wherever it is referenced.
  • Rename blocks with Modify name in the block options.
  • Use the context menu's comment, marker and warning blocks to explain non-obvious flows and warn collaborators away from fragile areas.
best namespace function
A public function block displayed with its blueprint namespace prefix
A public function block displayed with its blueprint namespace prefix

Functions are the unit of reuse

Create them anywhere with the context menu's Add function, collect shared ones in a function blueprint under a namespace, and call them with function_custom_execute.

  • Private by default. Public functions are your API surface: changing one affects every caller. Keep a function private until another blueprint needs it.
  • Pass minimal data. Hand a function a guid instead of an entire object. Calls stay cheap and the contract stays explicit.
  • Return through out-pins. Expose results as named out-pins, and order them with Edit pin sorting when a function grows several outputs.

Do not extract a function for logic used once, or when extraction would force you to pass half the flow's state as parameters. A titled group around the blocks often documents the flow better.

best grouped blocks
A large blueprint with a titled group drawn around related blocks
A large blueprint with a titled group drawn around related blocks
Remember: function calls wait The function_custom_execute block waits for the function to complete before the flow continues. If the work does not need to finish before the user gets a response, offload it to the queue instead.

Most slowness has three causes

Repeated storage queries, unbounded searches, and heavy work blocking user-facing flows. The fixes:

Technique When to apply it
Reuse a data block for an expensive value When the value is costly to compute: a data block runs once per run however many blocks read it, while each copy runs separately. For a cheap constant, choose what keeps the canvas readable.
Cache in Redis Search results requested far more often than the underlying data changes. Set a TTL and invalidate through storage events.
Cache aggregated statistics in Redis Counts and rollups: update them with repeating events instead of running aggregation queries on heavily populated storages.
Offload to the queue Computationally intensive or deferrable work like PDF generation or sending email. Never keep a user waiting for it.
Bound every search Always set a limit, prefer query_bool_filter (no scoring), return only needed fields with query_source_by_field, and stream large sets with function_search_stream.
  • Cache keys identify the exact query, parameters included, so an entry is never served for a different request.
  • Get by guid when you have one. function_get_document with _meta.guid is the fastest retrieval method and the easiest to cache.
  • The math behind caching. A single search is cheap. The same query run by 300 simultaneous page visits in one minute is not. Check the cache first and hit storage only when necessary.
  • The first run after a save costs more. It loads and prepares the blueprint, once per node. See Precompiled Data.
Real-time data is the exception Searches do not wait for the latest inserts by default, and that is fine for most reads. Reserve the disable cache query option for flows that truly cannot tolerate stale results: on high-insert storages it can slow every search. See Common Pitfalls.

Some blueprints stay big: keep them workable

A complex page can have dozens of blocks. The built-in organization tools:

  • Groups: draw groups with custom titles around blocks that form a logical step. They are the table of contents of your canvas.
  • Block search: Ctrl + F jumps straight to any block or value. The fastest way into an unfamiliar blueprint.
  • Minimap: keep the resizable minimap open to stay oriented while you pan.
  • Markers: drop a marker from the context menu to flag a position for collaborators.
  • Tags: tag blueprints from the top bar so their purpose is visible in the overview.
  • Explorer: find all blocks of a type, for example every API block, in one list.
  • Audit log: every modification is logged automatically. A block's Revisions option shows the history of just that block.
  • Copy, don't rebuild: when a flow exists in another blueprint, copy the blocks over. If that copy is the second one, extract a shared function.

If you need several of these just to stay oriented, the canvas holds more than one component: split it.

best tags
The tags popup in the blueprint top bar
The tags popup in the blueprint top bar

A shared canvas needs team habits

  • A save goes live. On core 15 there is no separate deploy step, so an active blueprint runs what you saved. Review the changes list in the bottom bar first. On core 14 and earlier, saved changes stay in development until you deploy them from the Deployment menu, where compare shows the difference with what is live.
  • Preview before you save. Append ?staging to a state page's URL to see your unsaved changes in action. Web pages run the saved blueprint. See Staging and saving.
  • Review history, not memory. The audit log records every change like git commits. Check a block's Revisions before "fixing" something a teammate may have changed on purpose.
  • Communicate on the canvas. Warnings and comments travel with the blueprint; chat messages disappear.
  • Debug with care on real data. Production mode in the play options runs the flow as if it were live, on real stores and with real side effects. This permission can be restricted per user in User Access Management.

Next steps

Tips and Tricks The full productivity reference: searching, selecting, staging, namespaces and the minimap. Block Execution Execution order, precompiled data, error handling and async patterns. Common Pitfalls Cache usage, real-time search and aggregation misuse to avoid.

Frequently asked

When should I split a RUAL blueprint into multiple blueprints?

Dedicate each blueprint to a single component: a page, a modal, an API endpoint or a set of related functions. Signs a blueprint has grown too big: you need the minimap and Ctrl + F for every navigation, it mixes unrelated responsibilities, or new team members cannot tell what it is from the overview.

How do I share logic between RUAL blueprints?

With public functions. Create a trigger_custom_function block in a dedicated function blueprint under a namespace and call it from anywhere else with function_custom_execute. Functions are private by default, so make them public only when another blueprint genuinely needs them.

How do I make RUAL storage searches faster?

Always set a limit, prefer query_bool_filter because it does no scoring, return only the fields you need with query_source_by_field, and stream large sets with function_search_stream. For results requested far more often than the data changes, cache in Redis and invalidate through storage events.

Does a RUAL function call block the rest of the flow?

Yes. function_custom_execute waits for the function to complete before the flow continues, so work that does not need to finish before the user gets a response belongs on the queue instead.