Skip to content

Category: Docs

Guides and reference for setting up and running a Basehim site.

21 articles

Contributing and running the tests

Set up a development checkout, run the dependency-free test suite with and without a database, write unit and integration tests, follow the code conventions, and send a pull request.

Asif Mughal

Security for developers

Roles and capabilities, per-user permissions, filtered HTML, CSRF, escaping, SQL, uploads, rate limits and tokens - what Basehim does for you, what your theme or app must still do, and how to report a vulnerability.

Asif Mughal

AI discovery: llms.txt, robots.txt and WebMCP

What Basehim publishes so AI crawlers and agents can find and use a site - robots.txt rules per crawler class, llms.txt, the agent resource catalog and in-browser WebMCP tools - and how themes and apps extend each one.

Asif Mughal

MCP and AI agents

Basehim's built-in Model Context Protocol server - how assistants connect over OAuth 2.1 or with an API key, what each tool does and which scope it needs, how roles limit agents, raw JSON-RPC examples, and how apps add tools.

Asif Mughal

Content types, blocks and widgets

Register your own content types with full admin screens, add custom blocks to the editor with a PHP renderer for the public site, and provide widgets for widget areas, the editor and the dashboard.

Asif Mughal

App permissions

How an app declares what it will touch, how site owners approve it, what happens when a call isn't allowed, the full permission catalogue, logs and the static scanner - and what the model does not protect against.

Asif Mughal

AJAX actions

Register browser actions with $this->ajax() and call them with Basehim.ajax. Core checks the session, CSRF token, capability, input schema and rate limit before your handler runs. Includes the full option and error reference.

Asif Mughal

Admin screens, routes and UI components

Add pages to the admin with adminGet() and adminPost(), control who can open them, handle forms safely with CSRF tokens and flash messages, use the admin's buttons, cards, dialogs and toasts, and register public routes.

Asif Mughal

Hooks and filters

How actions and filters work in Basehim, with the complete list of core hooks - content, users, comments, media, mail, admin, editor, SEO, MCP and routing - and the arguments each one passes.

Asif Mughal