Skip to content
Documentation

Memeh Web Engine (PHP MVVM)

The Web Engine is the runtime behind MemehCMS starter themes. It renders content from MemehCMS headless APIs using a stable MVVM request flow.

Developer program

Become a Memeh Web Engine & Theme Engineer

Learn the Web Engine, build production-ready themes, and join our vetted pool of developers available for government and enterprise tenants.

Overview

The Web Engine renders pages using Mustache views and ViewModels created by Controllers. It is designed to stay stable across deployments and to be safe-by-default.

Headless-first
Consumes MemehCMS APIs (zones, tenants, pages, news) and renders output.
Theme-friendly
Themes are real HTML/CSS/JS with Mustache partials and clean ViewModels.

Request flow (MVVM)

GET /services

routes/web.php
  → ServicesController@index

ServicesController
  → $vm = ServicesViewModel::fromApi(...)
  → View::render('services.mustache', $vm)

Mustache layout.mustache
  → <?php echo e(> services.mustache); ?>

Folder layout

app/
  Controllers/
  Models/
  ViewModels/
  Services/
resources/
  views/
    layouts/
    pages/
    partials/
routes/
  web.php
public/
  index.php

Themes

Starter themes are built on the Web Engine. A theme typically includes layouts, pages, partials, and assets—plus ViewModels to map API content into templates.

Tip: keep ViewModels explicit and stable—your templates should never depend on raw API responses.

Fetching content from MemehCMS

ViewModels pull from MemehCMS headless APIs (zone-scoped endpoints), then output a safe array for Mustache.

GET /api/zones/{zone}/v1/pages/{slug}
GET /api/zones/{zone}/v1/news?limit=25

Security model

  • • Mustache escapes output by default.
  • • Static export removes runtime CMS attack surface.
  • • Signed feeds provide provenance and verification.

Want to become a certified Memeh developer?

Contact us to join the pool for hire (Web Engine + Themes). We match developers with zones and tenants.