The In-Browser Editor
App Code is the in-browser editor where extension code is written, checked and tried out. It opens full screen, keeps every save as a version, and stores the code in the platform's database rather than in files on the server, so nothing has to be deployed by hand.
Where to find it
Architect Panel → Layout & Pages:
- App Code — the editor for extensions, opened in a full-screen window
Architect Panel → Automation:
- Extensions — where a version is approved, put live, rolled back or switched off
Who can use it
Any administrator can open App Code, create extensions, write and save code, run the checker and do a dry run. Only an architect can approve a version, publish it, roll back or put an extension live. Anyone else who tries sees "Only an architect may" followed by the action, and a reminder that they can write and check code and ask an architect to put it live. Because every administrator can reach it, treat access to the administration screens as access to App Code.
What it edits
The tree on the left has sections for Extensions, Snippets, Document Templates, E-mail Templates and Legacy Custom PHP. Today only Extensions can be edited. Opening an item in another section says "Editing ... is not wired up yet." Legacy Custom PHP, where it is shown, is read-only. Use the Filter… box to find an item in the tree.
The screen
- Top bar: New, Save, Check, Dry run and Publish, plus the command palette (Ctrl+K).
- Editor: the open file. With nothing open it reads "Nothing open".
- Side tabs: Assistant (AI help writing code), Versions (every saved version, with publish and roll-back buttons for architects), Data (the datastores and fields the code can use) and Activity.
- Keys: Ctrl+S saves, Ctrl+Enter checks, Ctrl+R does a dry run, Ctrl+W closes the file and Ctrl+K opens the palette.
Creating an extension
- Click New. Answer What should it do? by choosing the hook, then give it a Name and a Key. The key must start with a letter and use lowercase letters, numbers and underscores, 3 to 64 characters.
- Write the code, or describe what it should do in the Assistant tab and click Write it. The assistant's code is saved as a draft for you to review.
- Click Save (Ctrl+S). Each save that changes the code creates a new version; nothing goes live.
- Click Check. Findings appear beside the lines they concern, with a summary of how many there are. A version that fails is still saved, but cannot be approved.
- Click Dry run to run it once without writing or sending anything.
- An architect sets the extension's binding (see Extensions), then clicks Publish, which approves the version, publishes it and makes it live in one step.
There is no autosave and no checking as you type: save and check deliberately.
What goes wrong and how to tell
- "This page has been open a long time and its security token expired.": reload and save again.
- "No AI provider is configured for writing code on this installation": the assistant needs an AI provider. See AI Gateway.
- "This hook needs the extension runner, which is not available on this system, so it cannot be dry run here.": the hook runs outside the platform and this system has no runner.
- The assistant's code fails the checker: it sometimes suggests things extensions cannot do. Read the findings and correct it, or ask again more specifically.
Worked example
A developer opens App Code from Layout & Pages, clicks New, chooses the workflow step hook and names it "Check credit limit" with the key check_credit_limit. They write the code, save, and click Check: one finding about a function extensions may not call. They fix it, save again (version 2), check clean and run a dry run. They are not an architect, so Publish is refused; they ask the architect, who reviews version 2, sets the Bound Key to match the workflow step and clicks Publish.
Recommendations
- Save and check little and often; versions are free.
- Review assistant output line by line before saving it as your own.
- Keep publishing with architects, and keep the architect group small.
- Remember App Code edits extensions only; templates are edited in their own screens.