Core Docs

Asset System

Asset System



How core.assets provides CDN-like shared utilities, stylesheets, branding, and frontend logic.

Overview



Asset retrieval is filesystem-based — the router (core.assets/public/assets.php) resolves requests directly against the core.assets/assets/ directory tree at runtime via AssetRouter. No pre-built maps or manifests are needed.

core.assets is a public CDN: anonymous direct access (CORS *), not routed through core.console, no API keys or project scoping. It serves static reusable content only — user data (e.g. avatars) lives in S3 via core.storage.

Asset Types



TypeVersionedStorageExample Request






BrandingYes (global + regional)assets/branding/GET /branding/global/universal/vector_logo
IconographyNoassets/iconography/GET /iconography/checkmark
TypographyNoassets/typography/GET /typography/serif/TimesNewRoman
DesignYesassets/design/GET /design/ui
LogicNoassets/logic/GET /logic/datetime/frontend

Version Resolution



Versioned asset folders carry an info.md file pinning versions in YAML-style frontmatter:

---
latest: v3.svg
stable: v2.svg
---

Universal vector logo.



RequestBehavior





?version=stableRead stable: pin from info.md → serve that file (legacy stable.md honored as fallback)
?version=latestRead latest: pin from info.md → serve that file; if no pin, newest by modification time
?version=<name>Serve exact file match
(no param)Same as latest

Caching & ETag



  • SHA1 ETag computed per file (supports 304 Not Modified)

  • Explicit version requests → Cache-Control: public, max-age=31536000, immutable

  • Alias requests (latest/stable, or no version) → Cache-Control: public, max-age=60, must-revalidate

  • CORS headers set automatically for cross-origin usage

Branding



The Branding module centralizes versioned branding assets (global + regional) with latest, stable, or explicit version resolution via info.md pins.

See: Branding Module for detailed usage.




See core.assets Code Reference for implementation details.