Skip to content

Static content

Part of the Server API — not a stable public interface yet; see the note there.

The server also serves files, which is how the web client and its media reach the browser.

Path Serves
/, /index.html The landing page
/client/ The installed web client
/icon.png The app icon
/modules/, /campaigns/ Imported content — maps, images, handouts
/systems/ Game system assets — fonts, icons, images
/_app/ The app’s own view resources, among them the sheet SDK: /_app/js/ep.js, ep-ui.js, ep-schema.js
/others/ Temporary images generated during play
/sheets/{sheet}/ A sheet of the loaded system; see GET /sheets/{sheet}/

Files are served like any web server’s: no sign-in, guest code or not — the guest code applies to the API, the WebSocket and MCP. Anyone who can reach the port and knows a path can download the file.

What the server renders is checked: pages, tables and entities at GET /{reference} answer 404 to a client that may not see them — hidden from players, by themselves or by what they sit in (visibility), or any of it for a client without a credential while guests need the guest code — as they do for one that doesn’t exist, and so do the reference addresses that redirect to a page. A browser’s page loads are signed in by the sign-in cookie.

Treat a file’s path as public once it’s known: a hidden page’s images, and a hidden entity’s, are still at their files’ addresses.

A page renders at an address inside its container’s folder, /{modules|campaigns|systems}/{folder-id}/{page} — the page’s slug, or its id when the slug isn’t unique there — so its relative links and images resolve as they do in the app. A file of that name in the folder always wins. The app’s link forms, /module/{slug}/page/{slug} (and campaign, system) and /page/{slug}, redirect (302) there.

A path of two or three parts that is a reference — /monster/goblin, /table/wild-magic — is answered with that entity or table rendered as HTML: the same markup the app shows, from the system’s view templates and theme, when the system renders that type as HTML. Invalid references return 400, unknown ones 404, and so does an entity the client may not see. An entity whose type opens as a sheet redirects (302) to its sheet, and a page reference to its page.

A sheet is a static web app in the system’s sheets/{sheet}/ folder, opened for an entity at /sheets/{sheet}/?id={entity-id} — the same address the app uses in its own views, so a sheet’s relative URLs resolve the same way in both. The address serves the sheet’s index.html; paths below it serve the folder’s files, and /sheets/{sheet} redirects to the address with the trailing slash. Sheet files are sent with Cache-Control: no-cache and an ETag, so a browser asks before using its copy and an unchanged file is an empty 304. Code and markup under /systems/, /modules/, /campaigns/ and /client/ — html, js, mjs, css, json — are sent the same way; media can be kept for a year.

A sheet built with its own tooling (a package.json, sources, node_modules) names the folder of its build output in a sheet.json beside them, {"root": "dist"}: only that folder is served, so the address serves dist/index.html and nothing outside dist/ is reached through it. The system’s folder is served as well, at /systems/{system}/, so nothing in it is private. Its other keys are api, the protocol version the sheet was written for, and entities, the entity kinds it can show; all three are optional. A sheet serves nothing when its api is one this app doesn’t speak, its root isn’t a folder inside the sheet, or a value has the wrong type.

The sheet follows the entity through entity subscriptions. Entity views get the address of their type’s sheet as env.sheetURL. Writing a sheet is covered in Character Sheets.