Tutorial
Building Your First Heratio Plugin
Johan Pieterse
May 8, 2026
474 views
A step-by-step guide to creating your first Heratio plugin with proper structure and conventions.
Want to extend Heratio with custom functionality? This guide walks you through creating your first plugin.
Plugin Structure
ahgMyPlugin/
config/
extension.json
database/
install.sql
lib/
Repositories/
Services/
modules/
mymodule/
actions/
config/
templates/Step 1: Create the Plugin Directory
Create your plugin under atom-ahg-plugins/ahgMyPlugin/.
Step 2: Define extension.json
This file describes your plugin metadata, dependencies, and version.
Step 3: Create Database Schema
Add your tables in database/install.sql. Always use CREATE TABLE IF NOT EXISTS and never insert into atom_plugin.
Step 4: Build Services
Use Laravel Query Builder via Illuminate\Database\Capsule\Manager for all database operations.
Step 5: Create Templates
Templates use PHP with CSP nonce support. Remember to include the nonce in all script and style tags.
Tags:
development
plugin
tutorial
getting-started