Declarations reference
Look up the FRL file shape and declaration names.
Browse the FRL reference.
Declaration names
The system namespace is reserved for Frontbacked. Theme declarations cannot be named system or start with system_ or system., regardless of capitalization. For example, system_orders, SYSTEM_ALERTS, and system.new_messages are reserved; systematic_check is allowed.
This rule applies to named endpoints, notification channels, rate limits, helper functions, post types, and keys declared through $secret aliases (including nested alias keys). FRL validation reports a reserved-namespace error before the declaration can be used. This rule does not add dotted-name support to declarations that otherwise require a single identifier.
Ordinary schema fields, function parameters, data keys, display labels, and endpoint URL paths are not declaration names and are unaffected. Notification labels New message and New messages are separately reserved to keep the built-in channel recognizable. Existing sign_in and sign_up rate-limit customization remains supported. Built-in declarations carry a gold ★ System badge in fb-admin.
File Shape
Rule input (JSON)
Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.
Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.
Top-Level Declarations
| Declaration | Purpose |
|---|---|
notification name as "Label"; | Define a notification channel for verified email and Telegram recipients. Leading comments provide the admin description. See Notification Channels. |
version 2; | Declare the current FRL grammar and permission semantics. It must be the first statement in the file. |
fn name(params) { ... } | Define a reusable helper function. Helpers can be called from allow rules, hooks, endpoint bodies, and other helpers. |
post name { ... } | Define one post type. Add as "Label" after the name when admin screens should display a friendlier label. |
user { ... } | Define custom user data and run user create, edit, delete, or sign-in hooks. Registration and profile access are controlled by the site admin. |
endpoint.get/post/put/patch/delete name("/path") { ... } | Define a custom guarded JSON endpoint. Add as "Label" after the path to expose endpoint.<name> alias metadata. |
Continue with Names and aliases reference.