Core Docs

Logic

Logic



Logic modules live under core.assets/assets/logic/ and are structured by module and area.

Layout



core.assets/assets/logic/
├── backend/
│ └── project-init/
│ ├── initializer.php
│ └── init-test.php
├── datetime/
│ ├── frontend/
│ │ └── v1.js
│ └── backend/
│ └── v1.php
├── suite/
│ └── check.php
└── ui/
└── ui.js


Requesting logic files



Path-style (recommended)



GET /logic/backend/project-init


Serves the latest file by modification time. If only one file exists, it serves that file directly.

Query-string style



GET /logic?name=backend-project-init


Specific file



GET /logic/backend/project-init?version=initializer.php
GET /logic?name=backend-project-init&version=initializer.php


Listing available files



GET /logic/backend/project-init?list


Returns a JSON array with all files, sizes, and modification times.

Version resolution



RequestBehavior





?version=stableIf stable.md exists → serve that file; otherwise → serve latest
?version=latestServe newest file by modification time
?version=<name>Serve exact file match (by name, basename, or hashed prefix)
(no param)Serve latest file by modification time

Logic files are typically not versioned in the alias sense (v1, v2 are treated as concrete filenames), but the same resolver logic applies.

Adding a new logic module



  1. Create a module folder: core.assets/assets/logic/<module>/.

  2. Create an area subfolder: core.assets/assets/logic/<module>/<area>/.

  3. Place the files (.js, .php, etc.) inside.

  4. The resolver picks up new files automatically — no build step needed.