For AI agents

This page is for coding agents and automation that read these docs to build or change a Siberian module, layout, template or integration. Humans are welcome too.

Start here

  1. Read Getting started for what Siberian is and how it is built.
  2. Read Modules and Basic usage: structure, package.json, schema, feature.json, translations, packaging.
  3. Open the reference module below and copy its shape instead of inventing one.
  4. Check every signature you use against the Siberian code on trunk. When the code and these docs disagree, the code wins: fix the docs and open an issue.

Machine readable entry points:

What Where
Index of every page, one line each llms.txt
All pages in one plain text file llms-full.txt
Raw Markdown of any page https://raw.githubusercontent.com/Xtraball/SiberianCMS-Doc/master/docs/<page>.md
Siberian source github.com/Xtraball/Siberian, branch trunk

Reference modules

Start from the first one, then read the others when you need more.

Module Use it for Layout
module-skeleton: start here The smallest complete feature: one table, one editor form that saves, one mobile page that loads it, a tools/pack.sh that builds the zip. Copy it and rename it Current: init.php, features/<code>/feature.json
Job, in the core: siberian/app/sae/modules/Job on trunk A full-sized feature that is always in sync with the core: several tables, forms, lists, an API, several mobile screens, .po translations Current
siberian-module-skeleton The Job module as a standalone package, with email templates and an uninstall script Older: bootstrap.php, assets registered from resources/var/apps, .csv translations. It still installs, but do not copy its layout

For anything new, use the layout of module-skeleton and the Job module in the core, and the Modules page.

Where each part of a feature lives

Paths are relative to the module folder, in module-skeleton (the file names are the same in Job, with more files).

You are building Read the docs Look at
Database tables and default data Modules: schema and data resources/db/schema/module_skeleton.php, resources/db/data/
Models Modules Model/Skeleton.php, Model/Db/Table/Skeleton.php
Editor page (the desktop screen where an app owner sets the feature up) Forms, Modules: layout files controllers/ApplicationController.php, Form/Skeleton.php, resources/design/desktop/flat/layout/*.xml and .../template/.../edit.phtml
Mobile app screens Modules: feature.json, Ionic tools, Utilities, Offline mode features/module_skeleton/feature.json, js/controllers/, js/factory/, assets/templates/l1/
JSON the app loads Modules controllers/Mobile/ListController.php
Public API (for other systems) API controllers/Api/ in the Job module
Backoffice screens and menus Menus, Admin hooks siberian/app/sae/modules/Backoffice in the core
Reacting to events Hooks init.php
Push notifications Push
Customer account fields My account
Texts and translations Translations in Modules resources/translations/default/*.po in the Job module
Icons Icons features/<code>/icons/

The flow of module-skeleton, end to end: the editor form (Form/Skeleton.php) posts to ApplicationController::saveAction, which saves a row; the app route in feature.json opens the Angular controller, whose factory calls ListController::loadContentAction through $pwaRequest; the template shows the result.

Rules that save you a rejected change

Package and install

  1. Build the zip with ./tools/pack.sh (in module-skeleton), or zip the contents of the module folder yourself so that package.json is at the root of the zip. A "Download ZIP" from GitHub puts everything in a sub folder and will not install.
  2. Upload the zip in the backoffice module installer (Installer_Backoffice_ModuleController::uploadAction in the core), or in a development tree copy the folder into siberian/app/local/modules/<Name>.
  3. In package.json, set dependencies.system.version to the oldest Siberian your module supports (the docs assume 5.1.0 and later).

When something is missing or wrong

Open an issue on github.com/Xtraball/Siberian/issues with your Siberian version, what you did, what you expected and what happened.