Developer guide
Browse by topic
Explore related documentation through its most useful keyword groups.
166 items
Grouped by Domain
Building inspecting testing and diagnosing Zotonic applications and modules.
Explore this clusterCreating configuring updating starting and stopping Zotonic sites.
Defining site module runtime and service settings.
Installing activating configuring upgrading and removing Zotonic modules.
Recording and observing events errors state health and performance.
Explore this clusterMapping incoming URLs to controllers resources or redirect destinations.
Managing files and media resources throughout their lifecycle.
Defining content types properties relationships and constraints.
Preserving and recovering site data media and configuration.
Documentation not covered by the other keyword groups in this split.
Generate gettext translation template files.
Create and check the database used by a native development installation.
Forward HTTP and WebSocket traffic with a narrow trust boundary.
Use model#rsc for resource access and m_rsc_update for writes. These APIs handle behavior that a direct SQL update would bypass.
Use compilation for changed Erlang source, loading for changed BEAM files, and an index refresh when new templates or application files are not discovered.
Open System → Development and enable live reload. The page also enables separate CSS and JavaScript files when needed.
Use resource IDs, media metadata and consistent responsive-image descriptors.
Reset a site rate limiter.
Find the notification definition and inspect its callers before implementing an observer. The notifier operation determines whether observers collect results
Restart Zotonic and all sites within the current VM.
Restart one site.
Extract repeated markup into a partial and pass its inputs explicitly.
Extract repeated markup into a partial and pass its inputs explicitly.
Call an exported Erlang function on the node.
Use the project's test workflow in a dedicated development or test environment. Two CLI entry points have different scopes:
Run selected core test modules.
Keep runtime data separate from the application's source and static assets.
Use an existing Zotonic task mechanism when it fits the job. Use a supervised worker when the work needs a persistent process with its own lifecycle.
Start a foreground Zotonic process under the host service manager.
Query arguments and terms for searching pages using the search APIs.
Terminate public traffic at a reverse proxy while Zotonic stays unprivileged.
Set a global runtime Zotonic value.
Choose one installation route, start Zotonic, create a site, and make your first visible change.
Connect an Erlang shell to the running node.
Display a site configuration resolved from files.
List configuration files selected for a site.
A site is identified by its application and priv/zotonic_site configuration. Supported formats include Erlang .config, JSON, and YAML; follow the format…
Show a site application directory.
Run site tests using an isolated test schema.
Choose a startup mode for the environment:
Start Zotonic in the foreground without an interactive shell.
Start a selected site on the node.
Start Zotonic in the background.
Use these commands for one named site:
Show node and site state.
Stop one site.
Stop the Zotonic node.
Keep domain logic in small functions that accept explicit inputs. Test expected results, boundary values, and meaningful error cases without starting a full…
Run bin/zotonic connectdb to test a connection using the global Zotonic database configuration. It does not open PostgreSQL’s interactive client and has no…
Choose roles that exercise the operation's permission boundary: anonymous visitor, limited editor, and administrator. Use separate browser sessions or an…
The checkout is an Erlang umbrella project: one build contains many applications.
Open the Development function tracing tool as the admin user. Enter a module, optionally a function, and a small limit on the number of calls.
Open the Development page's dispatch tools. Inspect the list of active rules, then trace the path that produces an unexpected result.
Enable module#mod_server_storage if the Development page says it is needed for database tracing. On the Development page, enable Trace all database queries for…
Open the Development page's Live dependency graph of templates tool. Start a trace for your session, then load the page or path you want to inspect.
Use dispatch inspection to discover why a path selects a particular controller:
Write the source text in English and mark static interface text for translation.
Check actual limits and workload before changing operating-system settings.
Work in small, verifiable steps: change source, compile or reload, reproduce the request, and inspect the result.
The Development page has an option to enable an API for recompiling and rebuilding Zotonic. The model implements actions for recompiling, flushing caches, and…
Compile, load, flush, and rescan the server.
Change a dependency when you can identify the required fix or feature and the affected callers. Read its version constraints and inspect the resulting lockfile…
Version schema changes through the module's installation and upgrade mechanism. Inspect a module using -mod_schema and manage_schema/2 before adding your own…
Upgrade notes
Use the existing Cotonic browser models and Zotonic MQTT bridge when components need to communicate through topics. First identify whether the topic stays…
Start with a working site, reusable templates and the standard media pipeline.
A resource has a numeric ID within its database. Give application-owned resources a stable name when code needs to find them across installations.
A resource has a numeric ID within its database. Give application-owned resources a stable name when code needs to find them across installations.
Enter the supplied OTP 28 development shell, prepare PostgreSQL, and build.
Use semantic form controls with labels and meaningful names. Add Zotonic validators for immediate feedback, then validate the submitted values again at the…
Prepare an isolated copy of the previously released application and database. Add representative edited content, then apply the new code and schema changes.
Define what must be recovered: database, original media, configuration, and security material. Check which parts the selected backup includes before depending…
Wait until the node answers a ping.
A context carries the site and request-related state used by Zotonic APIs. Pass it through your functions instead of storing one context globally.
A media resource has ordinary content properties and information about its associated file. Use model#media to inspect and manipulate media through Zotonic's…
Log the operation and its result with structured fields. Include an identifier that helps connect the message to a resource or job, without logging credentials…