DocsDeveloper guide
Developer guide
How to extend OptiraPOS: build an add-on (manifest, menus, tables, routes, pages, settings, rights, translations, a signed package), call the API with an API key, and receive provider webhooks. Every statement points at the file and line it comes from, and one worked add-on, Hello Notes, takes you from an empty folder to a running app.
From an empty folder to a running add-on
Build an add-on
The parts of an add-on and where the system picks each one up
How add-ons workAn add-on is a folder under app/Addons/<Name> with an addon.php manifest.2 min readFolder layoutWhat goes where inside app/Addons/<Name>, and which file the system reads for each part.1 min readThe manifest, addon.phpThe manifest returns one PHP array.1 min readMenusTwo ways to appear in the menu: a new app of your own (menu), or rows added to an app that already exists (menu_patches).1 min readTables and modelsYour add-on owns its tables: its migrations run with core's migrate, and an uninstall rolls back exactly those.1 min readRoutes and controllersSigned-in pages go in routes.php, public pages in public_routes.php.1 min readPages (Vue)Your screens are Vue components in a browser bundle you ship as dist/addon.js.1 min readA settings pageGive your add-on its own settings screen under its own URL, and store small values as configuration parameters.1 min readRightsWho may see and change your add-on is set by your rights group, your URL segments and checks in your controllers.1 min readTranslationsOptiraPOS translates by exact English text.1 min readPayment, shipping and SMS driversA provider add-on registers a driver class.1 min read
Worked example
Hello Notes, from an empty folder to a running app
Hello Notes, step by stepOne small app that touches every part: a manifest, a table, signed-in routes, two Vue pages, a settings value, its own rights and menu.1 min readPackage and signA buyer installs an add-on from one zip: its folder, a manifest of every file's hash, and a signature over that manifest.1 min readInstall and activateUpload puts the files in place.1 min read
API and webhooks
Calling the system from outside, and receiving provider notifications