CORE.md (Contract)
This document describes the core architecture of WebholeInk v0.1.x.
Core principles
- Minimal surface area
- File-based content (no database required)
- Explicit routing (no magic auto-discovery unless explicitly enabled)
- Predictable, testable behavior
- Themes are presentation-only
Runtime flow (high level)
public/index.phpdefinesWEBHOLEINK_ENTRYand loads:app/bootstrap.phpapp/autoload.php
- A
Requestis created from globals. Routerregisters explicit routes.Routerdispatches to a handler.- Handlers return a
Response. Response->send()renders output through the active theme layout.
Core modules
Http/Request— immutable request snapshot from globalsHttp/Router— GET-only routing and fallback routing rulesHttp/Handlers/*— request handlers returning ResponseHttp/Response— status/headers/body; renders through Layout/themeCore/PageResolver— resolves route → content fileCore/Markdown— converts markdown to HTML (Parsedown)Core/ThemeLoader— selects active themeCore/View/Core/PageView— safe template rendering
Non-goals for v0.1.x
- Plugins / extensions system
- Database storage requirements
- Admin UI
- Dynamic route params
- Middleware pipelines
Stability promise
Within v0.1.x:
- Contracts here are treated as stable unless explicitly revised.
- Behavior changes require updating docs first.