# Add a business module without duplicating shell code

1. **Copy** the `modules/Example/` folder into `modules/<YourName>/`.
2. Change `Modules\\Example` namespaces to `Modules\\YourName`.
3. Change route path in `Config/Routes.php`, and register its file in `app/Config/Hive/ModuleRoutes.php`.
4. Add route visibility to `app/Config/Hive/Navigation.php` (eventually filtered by permissions).
5. Views: `<?= $this->extend('layouts/tenant') ?>` + `<?= $this->section('content') ?>` only. No header / sidebar / footer markup.
6. Before designing a page, look up its corresponding screen in `resources/standard-template/hive-ui-step-06-v1.6.1/assets/js/routes.js`; inspect the original browser prototype and its standard forms/tables.
7. Backend: validate requests, enforce tenant/company ownership, roles, module entitlement and branch data scope, database transactions and audit logs.
8. Test permission boundaries and mobile presentation before shipping.

UI source of truth: `resources/standard-template/hive-ui-step-06-v1.6.1/`. Runtime source of truth: CI4 controllers/views/services. Do not run mock business logic in production.
