Plugin Development

A complete guide to building Pubvana plugins. Plugins are PHP packages that integrate with the Pubvana admin panel and can provide public-facing routes, admin UI, database tables, and more.

What You Can Build

  • Documentation systems (like PvDocs itself)
  • E-commerce or digital product stores
  • Membership and paywall systems
  • Comment systems with moderation queues
  • Analytics dashboards
  • Social media integrations
  • Import/export tools
  • REST APIs for mobile apps

Prerequisites

  • PHP 8.1+
  • Familiarity with CodeIgniter 4 MVC conventions
  • A running Pubvana 2.2.3+ installation with filesystem access to the plugins/ directory

What This Section Covers

  • Getting Started — minimum viable plugin in 5 minutes
  • Plugin Structure — full directory layout and conventions
  • PluginInterface — the 7 methods every Plugin.php must implement
  • plugin_info.json — manifest schema reference
  • Installer — up()/down() hooks for activation and uninstall
  • Routes — defining public, admin, and API routes
  • Controllers — admin and public controller conventions
  • Models & Migrations — database access patterns
  • Services — business logic separation
  • Views — admin PHP views and public .tpl templates
  • Internationalization — 6 required locales
  • CSRF Exemptions — webhook and API route handling
  • API Controllers — REST endpoint conventions
  • Plugin Lifecycle — discovery through deactivation