Technical reference · pages, publishing, and APIs
Trace a request, locate where HTML is generated, and verify an outcome through the management API.
Trace an Admin screen to a real endpoint
Admin reads site settings through GET /_/admin/cms-site/read on the public site. The browser page at /cms/sites belongs to Admin. Use the first URL for data and the second to open the interface.
| Code to locate | Entry point and responsibility |
|---|---|
| Admin client | cmsSiteApi.read() in apps/admin/src/api/modules/cms-site.ts reads the settings |
| Service route | packages/service/features/cms/site/route.ts maps GET admin.cms-site.read to readSite |
| Service controller | packages/service/features/cms/site/controller.ts obtains database and config capabilities, calls the site operation, and puts the record in JSON data |
| Write rules | PATCH /_/admin/cms-site/update validates the body and updates the site. Revision conflicts return cms_site_conflict |
Change inputs and form feedback in Admin, write rules in Service, and homepage rendering in Theme. Use the same client–route–controller path to trace other requests from the browser network panel. Admin forms · Service controllers · Theme references
Which component handles a request?
Sitenera has two application entry points. The public site serves visitors and the Service API. The admin runs separately and sends management requests to that API. The theme receives public page data and turns it into HTML through layouts, templates, and sections.
| Change | Where to check the result | First thing to verify |
|---|---|---|
| An announcement title or cover | Entry editor and public detail page | The entry is enabled and the template uses the field |
| The structure of all announcement pages | Shared template | The section is in the rendered slot and the site uses the published theme |
| Content for one language | Translations and the locale URL | The resolved locale, source revision, and translation status |
| Domain, redirect, or indexing settings | Public response, page source, and sitemap | The actual hostname and status code |
Static publication and delivery
For a URL in static publication, check the saved entry and published HTML separately. A background job generates the artifact and switches the public release pointer. The previous release can serve while the replacement is being generated. The recommended VPS deployment uses a local publication directory. Existing Workers deployments can use R2.
| Request or state | Runtime behavior |
|---|---|
| An eligible public URL with a published release | Node.js serves the published file and marks it FILE. Existing Workers deployments can also serve from the edge cache or R2 |
| A configured URL waiting for its initial generation | The normal visitor path can use an applicable cache or fall back to SSR |
| An editor preview with a valid ticket | Preview rendering can show unsaved edits |
| A page request with a query string | The page’s rules apply. Configured list pagination or supported tracking parameters can reuse static artifacts |
| A published release points to an unreadable artifact | The normal visitor path takes over. With FALLBACK and no-store, check the release pointer and file on the VPS, or the R2 object on an existing Workers deployment. |
See deployment for eligible URLs and the publication directory. See delivery and performance to measure requests and confirm freshness.
Management API address, authentication, and responses
Use the public Service origin as the API base URL, normally http://localhost:3000 in development. The admin itself defaults to port 3001. A signed-in browser uses its admin session. An external client can use an Agent token from the credentials page as a Bearer credential for authorized routes.
Use existing, securely configured SITENERA_ORIGIN and AGENT_TOKEN variables to read site settings. Use a local or test environment you are authorized to access.
curl -sS -i \
-H "Authorization: Bearer ${AGENT_TOKEN}" \
"${SITENERA_ORIGIN}/_/admin/cms-site/read"
A successful JSON response carries data, error: null, and meta. On failure, inspect the HTTP status, error.code, and meta.requestId. An HTML login screen is a reason to check whether the request went to the admin UI rather than the API origin.
| Status | Where to look |
|---|---|
| 400 | Inputs, query or body placement, and any expected revision for an update |
| 401 | Admin session or Agent token |
| 403 | Account permissions and, for browser requests, the allowed origin |
| 404 or 405 | Service origin, path, and HTTP method |
| 500 | Request ID and the corresponding Service log |
Use the Admin assistant for operations that need current page context. After automated writes, re-read the stored record and check the public URL when applicable.