Skip to content
Developer Documentation

Build with MemehCMS quickly and safely

A practical guide for developers, implementation partners, and marketplace sellers building public websites, Web Engine themes, service portals, and integrations on MemehCMS.

Start here

Choose the build path that matches the project

Path Use when What you build
Direct API frontend Your team uses Laravel, React, Vue, Next, Astro, or another stack. A custom website that calls MemehCMS public APIs.
PHP Web Engine starter The site must run on shared hosting, cPanel, or simple VPS PHP. A commented PHP/HTML website using the starter package.
Website Builder export A tenant admin wants to assemble and download deployable files. A generated ZIP from the CMS dashboard.
Marketplace seller You provide websites, themes, cyber work, design, DevOps, or training. Public gigs and package tiers listed on Memeh Marketplace.
Local CMS setup

Commands for working on MemehCMS itself

composer install
npm install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm run build
php artisan test

Before handing work back, run php artisan test, npm run build, npm audit --omit=dev, and composer audit when network access is available.

Core concepts

Know the platform language

Tenant

One institution, agency, department, company, branch, or managed website owner.

Super admin

Platform operator for tenants, marketplace moderation, implementation requests, and audit logs.

Tenant admin

Institution-level admin for content, menus, media, pages, services, and users.

Public API

Read-only published content. Public websites must always stay tenant-scoped.

Public API rules

Always query published tenant content

GET /api/articles?tenant_id={tenant_uuid}&per_page=10
GET /api/services?tenant_id={tenant_uuid}
GET /api/sliders?tenant_id={tenant_uuid}&placement=home
GET /api/menus/by-location/primary?tenant_id={tenant_uuid}
Public modules

Articles, pages, categories, departments, services, sliders, emergency alerts, locations, forms, FAQs, leadership, publications, menus, media, and accessibility settings.

Admin-only records

Request cases, complaints, FOI, implementation help, support messages, audit logs, and admin notes must stay inside MemehCMS.

Web Engine starter files

The files developers edit first

File Purpose
content/site.phpOrganization name, logo, contacts, fallback menus, footer, copyright.
content/home.phpHomepage hero, copy, fallback sections.
content/services.phpService/product catalogue with fees and CTA links.
resources/views/*.htmlActual page templates.
app/ViewModels/*.phpData contracts between APIs/local content and templates.
app/config/config.phpAPI base URL, tenant ID, menu locations, security settings.
Services and CTAs

Services are for transactions, departments are for structure

Use Services for applications, public service portals, paid items, appointment links, and product-style listings. Use Departments for directorates, police divisions, immigration units, commands, and regional offices.

[
    'title' => 'Passport Application',
    'description' => 'Start or renew an official passport application.',
    'fee' => 'Contact for current fee',
    'about' => '<p>Applicants must provide valid supporting documents.</p>',
    'cta_label' => 'Apply online',
    'cta_href' => 'https://portal.example.gov.sl/passport',
]
Developer Pool and Marketplace

Keep verification and public selling connected

Developer Pool:
Apply -> Super admin review -> Verified provider -> Eligible for marketplace

Marketplace:
Approved seller -> Published gig -> Starter/Standard/Premium packages -> Buyer enquiry
WordPress migration

Move WordPress content and media into MemehCMS

  1. 1. Export from WordPress. Open Tools -> Export and download the XML file.
  2. 2. Prepare media. Keep the old site online so MemehCMS can download public media URLs from the XML, or ZIP wp-content/uploads from hosting when media is private. Heavy libraries can be split into year/month archives.
  3. 3. Import into MemehCMS. Open WordPress Import, upload the XML file, keep XML URL download enabled for public media, and optionally upload the full media ZIP or a year/month ZIP.
  4. 4. Review content. Posts become Articles and pages become Pages.
  5. 5. Review media. Downloaded or ZIP-imported WordPress media is stored in the MemehCMS Media Library. Repeat imports reuse previously copied media; unreachable files keep their original URLs for manual review.
Production checklist

What must be true before deployment

HTTPS is enabled for CMS and public websites.
APP_ENV is production and APP_DEBUG is false.
Tenant IDs are configured for every public website.
Security headers and restricted CORS origins are enabled.
Admin-only request and case records are not exposed publicly.
Media upload works from Article editor and Media Library.
Header and footer menus are created in MemehCMS.
Services/products have correct CTA labels and destinations.
Accessibility settings are reviewed.
php artisan test and npm run build pass.