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
| Type | Versioned | Storage | Example Request |
| Branding | Yes (global + regional) | assets/branding/ | GET /branding/global/universal/vector_logo |
| Iconography | No | assets/iconography/ | GET /iconography/checkmark |
| Typography | No | assets/typography/ | GET /typography/serif/TimesNewRoman |
| Design | Yes | assets/design/ | GET /design/ui |
| Logic | No | assets/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.| Request | Behavior |
?version=stable | Read stable: pin from info.md → serve that file (legacy stable.md honored as fallback) |
?version=latest | Read 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
ETagcomputed per file (supports304 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.