@astrake/lumora-webserver
v0.2.0
Published
Headless PHP 8.2+ Enterprise Website Micro-Kernel, Tailwind CSS v4 Brand Layer Compiler, Zero-Dependency cPanel/aaPanel dist/ Bundler, and 12-Gate Automated Compliance Verifier.
Maintainers
Readme
@astrake/lumora-webserver
Headless PHP 8.2+ Enterprise Website Micro-Kernel, Tailwind CSS v4 Brand Layer Compiler, Zero-Dependency dist/ Bundler, and 12-Gate Automated Compliance Verifier.
Part of the Lumora Ecosystem (@astrake/lumora-server, @astrake/lumora-webserver, @astrake/lumora-ui).
1. Quick Start (Consumer Websites)
mkdir my-brand-website && cd my-brand-website
bun init -y
bun add -D @astrake/lumora-webserver
# 1. Scaffold a new website
bunx lumora-web init \
--brand-id "acme" \
--brand-name "Acme Studio" \
--prefix "ACM" \
--domain "acme.example.com"
# 2. Start local PHP 8.2+ dev server with live Tailwind v4 + SRI watcher
bunx lumora-web dev --port 8080
# 3. Build zero-dependency dist/ bundle and run all 12 compliance gates
bunx lumora-web build
bunx lumora-web verifyUpgrading Existing Websites (0.1.x → 0.2.0)
bun add -D @astrake/lumora-webserver@^0.2.0
# Core-only upgrade (admin panel stays disabled):
bunx lumora-web sync --force-stubs --with-agents
# OR enable the new Admin Console & Hybrid SQLite CMS in-place:
bunx lumora-web sync --with-admin --force-stubs --with-agents
bunx lumora-web css && bunx lumora-web build && bunx lumora-web verifySee Upgrading Existing Websites (docs/user/UPGRADING.md) for the full agentic upgrade playbook.
2. Documentation Index
User & Site Operator Guides
- Getting Started (
docs/user/GETTING_STARTED.md): Scaffolding a project, authoring templates and components, adding docs/blog content, and running the CLI. - Upgrading Existing Websites (
docs/user/UPGRADING.md): Upgrading from0.1.xto0.2.0, enabling--with-admin, Hybrid SQLite CMS precedence, and copy-pasteable AI coding agent upgrade prompts. - Configuration Reference (
docs/user/CONFIGURATION.md): Complete schema reference forlumora.config.php,content/routes.php,content/channels.php,content/legal/{slug}.php, and environment variables. - Production Deployment (
docs/user/DEPLOYMENT.md): Deployingdist/to Apache/cPanel/LiteSpeed, Nginx/aaPanel, Cloudflare/reverse proxies, and configuring Edge SMTP/WhatsApp or Central Hub sync.
Architecture & Framework Developer Guides
- Project Overview (
docs/PROJECT.md): Ecosystem positioning, architectural principles, and compliance posture (OWASP ASVS v4.0 L2, configurable privacy/retention controls, WCAG 2.2 AA). - System Architecture (
docs/ARCHITECTURE.md): Request lifecycle, physical zero-rewrite route stubs, CGNAT-safe stateless v2 CSRF, SQLite3 WAL + JSONL persistence, and CSS/SRI compilation. - Contributing Guide (
docs/developer/CONTRIBUTING.md): Monorepo structure, PHP 8.2+ & TypeScript coding conventions, and release workflow. - Testing & 12-Gate Verifier (
docs/developer/TESTING.md): Test suite breakdown and troubleshooting guide for all 12 compliance gates.
AI & LLM Context Specifications
- AI Agent Operating Guide (
AGENTS.md): Mandatory invariants, PHP global helper signatures, template context variables, andlumora-core.jsDOM data attributes. - LLM Index (
llms.txt): Concise machine-readable index of modules, documentation, and CLI commands. - Full LLM Specification (
llms-full.txt): Single-file complete API, schema, wire-protocol, and 12-Gate specification for zero-hallucination agentic coding.
3. Core Capabilities
Zero-Dependency PHP 8.2+ Headless Micro-Kernel (
Lumora\Core, with legacyAstrake\Lumora\Coreclass alias):Security (
security.php): Emits 8 mandatory OWASP ASVS v4.0 Level 2 HTTP headers, per-request 128-bit CSPRNG CSP nonces, HMAC-derived local storage vaults (storage/vault-<hmac>/), and CGNAT-resilient stateless v2 HMAC-SHA256 CSRF tokens ({tsHex}.{nonceHex}.{mac}). Supports opt-insecurity.compat_constants.Routing & Discovery (
router.php,discovery.php): Enforces canonical trailing slashes (301), subfolder base-path resolution, and configurable discovery endpoints (/health,/robots.txt,/sitemap.xml,/llms.txtwithBlogEnginepost indexing &content/llms.phpoverrides,/llms-full.txt,/.well-known/security.txt,/site.webmanifest, andPOST /_lumora/outbox/flush).SEO & Schema.org (
render.php,schema-graph.php): Deterministic Schema.org JSON-LD@graphbuilder (Organization,Person,LocalBusiness, optionalBrand/SoftwareApplication,WebSite,BreadcrumbList,ContactPage,TechArticle,BlogPosting,WebPage,FAQPage, plus per-routeschema_nodes) and automatic SHA-384 Subresource Integrity (SRI) +?v=<hash8>cache-busting fromlumora-lock.json.Declarative Inquiry Engine & SQLite WAL Vault (
inquiry-engine.php,inquiry-db.php,hub-client.php): Pre-CSRF rate limiting (5 / 900s), honeypot (rejectorfake_receipt),<2stiming guard, app-owned channels (content/channels.php) without core alias injection, first-party UTM & CTA attribution capture (initFirstPartyAttribution()),<1msSQLite3 WAL + atomic JSONL persistence, configurable PII/log retention pruning ([REDACTED],0disables pruning), standalone Edge notifications (native SMTP + self-hosted WAHA/Evolution/Webhook WhatsApp), and optional HMAC-SHA256 webhook outbox sync (schema_version1.0/1.1).App-Driven Legal Registry (
legal-registry.php): Globally neutral defaults ('GLOBAL',['privacy', 'terms']) with opt-in regional compliance templates (IN,EU,UK,US), customcontent/legal/{slug}.phpdocuments, configurablelegal.slugs, andfeatures.legal_registry = falsetoggle.Content & Release Engines (
docs-engine.php,blog-engine.php,release-server.php): Manifest-jailed Markdown documentation engine (withdist/manifest inlining), file-based blog engine with localhost draft gating and Atom 1.0 feed, and RFC 9110Range(206 Partial Content) binary artifact server withX-Checksum-Sha256.Opt-In Admin Console & Hybrid SQLite CMS (
admin-db.php,admin-auth.php,admin-sanitizer.php,admin-controller.php,packages/admin): Opt-in (features.admin_panel) Vue 3 +shadcn-vue(reka-ui) +lucide-vue-nextSPA with Argon2id auth, RFC 6238 TOTP 2FA, RBAC (owner/editor/viewer), OpenSSLaes-256-gcmsettings vault, zero-write public GET fast-path (AdminDb::connectExisting()), stealthadmin.path+ minimaladmin.branding, andlumora-web adminCLI.
Tailwind CSS v4 + Brand Design Layer (
runtime/css/lumora-base.css):- Compiles
lumora-base.css+css/brand-theme.css+css/brand.cssinto an SRI-locked stylesheet (public/assets/css/lumora.min.css).
- Compiles
Zero-Dependency
dist/Packaging & 12-Gate Verifier (lumora-webCLI):lumora-web init: Scaffolds a new website project (--with-adminenables the opt-in Admin Console & Hybrid SQLite CMS).lumora-web sync: Syncs the locked 17-module PHP/JS/admin runtime and computes SHA-256 + SHA-384 SRI hashes inlumora-lock.json(--force-stubs,--with-agents,--with-admin).lumora-web css: Compiles Tailwind v4 + brand CSS layers.lumora-web dev: Runsphp -Sdev server with live CSS/SRI watcher.lumora-web build: Produces a 100% standalonedist/bundle with physical<route>/index.phpstubs,.htaccess, andnginx.lumora.conf.lumora-web verify: Runs all 12 compliance gates (source, SQLite WAL smoke, live HTTP headers, and zero-rewritedist/server).lumora-web flush: Replays pending SQLite WAL outbox inquiries to a configured webhook/hub endpoint.lumora-web admin: Manages admin users, passwords, 2FA, and active sessions in the site's SQLite vault (create-user,list-users,reset-password,disable-2fa,revoke-sessions,hash-password).
4. Monorepo Commands
bun install
bun run validate # Runs typecheck, tests, build, 12-Gate verifier on apps/starter, and version sync
bun test # Runs Bun + PHP integration tests
bun run dev # Starts local dev server for apps/starter