Files
BarangaySystem/config/modules.php
Jonathan Sykes 19fec0933b
Some checks failed
tests / PHP 8.2 (swoole-5.1.6) (push) Has been cancelled
tests / PHP 8.3 (swoole-5.1.6) (push) Has been cancelled
tests / PHP 8.4 (swoole-6.0) (push) Has been cancelled
feat: Phase 1 bootstrap — adapt BukidBountyApp as BarangaySystem
- Replace UserTypes with barangay roles (super_admin, punong_barangay,
  kagawad, secretary, treasurer, sk_chairperson, sk_councilor, tanod,
  bhw, daycare_worker, staff, resident, audit)
- Replace UserActions with barangay-specific permissions (residents,
  households, blotters, documents, fee payments, projects, budget)
- Replace modules config with barangay modules (residents, households,
  blotters, documents, certificates, projects, budget, announcements,
  accounting, chapters, qr_payment, subscriptions, landing_pages)
- Update app name, seeders, and landing page to barangay defaults
- Add new enums: DocumentStatus, BlotterStatus, PaymentStatus
- Add 6 new migrations: residents, households, blotters, document
  requests, projects, budget
- Add RequestTypeSeeder with default certificate fee schedule
- Update README with BarangaySystem stack, roles, and remotes
2026-06-06 18:47:20 +08:00

170 lines
6.1 KiB
PHP

<?php
declare(strict_types=1);
/**
* Module Configuration
*
* Each module can be enabled or disabled via environment variables.
* All modules default to true (enabled) when the env variable is not set.
*
* Usage:
* - Set MODULE_<NAME>_ENABLED=false in .env to disable a module.
* - The middleware 'module:<key>' can be applied to route groups.
* - Use App\Support\ModuleHelper::isEnabled('key') in code.
*/
return [
/*
|--------------------------------------------------------------------------
| Master System Toggle
|--------------------------------------------------------------------------
*/
'system_enabled' => (bool) env('MODULES_SYSTEM_ENABLED', true),
/*
|--------------------------------------------------------------------------
| Residents
|--------------------------------------------------------------------------
*/
'residents' => [
'enabled' => (bool) env('MODULE_RESIDENTS_ENABLED', true),
'label' => 'Resident Management',
'description' => 'Resident registration, profiles, and search.',
],
/*
|--------------------------------------------------------------------------
| Households
|--------------------------------------------------------------------------
*/
'households' => [
'enabled' => (bool) env('MODULE_HOUSEHOLDS_ENABLED', true),
'label' => 'Household Management',
'description' => 'Household registration and member management.',
],
/*
|--------------------------------------------------------------------------
| Blotters / Incidents
|--------------------------------------------------------------------------
*/
'blotters' => [
'enabled' => (bool) env('MODULE_BLOTTERS_ENABLED', true),
'label' => 'Blotter & Incident System',
'description' => 'Incident filing, hearings, and resolution tracking.',
],
/*
|--------------------------------------------------------------------------
| Documents / Certificates
|--------------------------------------------------------------------------
*/
'documents' => [
'enabled' => (bool) env('MODULE_DOCUMENTS_ENABLED', true),
'label' => 'Document Management',
'description' => 'Document storage, retrieval, and version control.',
],
/*
|--------------------------------------------------------------------------
| Certificate Requests
|--------------------------------------------------------------------------
*/
'certificates' => [
'enabled' => (bool) env('MODULE_CERTIFICATES_ENABLED', true),
'label' => 'Certificate Request & Printing',
'description' => 'End-to-end certificate request, payment, and printing workflow.',
],
/*
|--------------------------------------------------------------------------
| Barangay Projects
|--------------------------------------------------------------------------
*/
'projects' => [
'enabled' => (bool) env('MODULE_PROJECTS_ENABLED', true),
'label' => 'Barangay Projects',
'description' => 'Project tracking, budgets, and status updates.',
],
/*
|--------------------------------------------------------------------------
| Budget & Finance
|--------------------------------------------------------------------------
*/
'budget' => [
'enabled' => (bool) env('MODULE_BUDGET_ENABLED', true),
'label' => 'Budget & Finance',
'description' => 'Annual budget, income/expense recording, and reports.',
],
/*
|--------------------------------------------------------------------------
| Announcements
|--------------------------------------------------------------------------
*/
'announcements' => [
'enabled' => (bool) env('MODULE_ANNOUNCEMENTS_ENABLED', true),
'label' => 'Announcements',
'description' => 'Barangay bulletins and public announcements.',
],
/*
|--------------------------------------------------------------------------
| Accounting
|--------------------------------------------------------------------------
*/
'accounting' => [
'enabled' => (bool) env('MODULE_ACCOUNTING_ENABLED', true),
'label' => 'Accounting',
'description' => 'Chart of accounts, journal entries, and financial reports.',
],
/*
|--------------------------------------------------------------------------
| Geography / Chapter Hierarchy
|--------------------------------------------------------------------------
*/
'chapters' => [
'enabled' => (bool) env('MODULE_CHAPTERS_ENABLED', true),
'label' => 'Geography Hierarchy',
'description' => 'Region → Province → City/Municipality → Barangay → Purok structure.',
],
/*
|--------------------------------------------------------------------------
| QR PH Payment
|--------------------------------------------------------------------------
*/
'qr_payment' => [
'enabled' => (bool) env('MODULE_QR_PAYMENT_ENABLED', true),
'label' => 'QR PH Payment',
'description' => 'InstaPay/QR PH payment for document fees.',
],
/*
|--------------------------------------------------------------------------
| Fee Plans / Subscriptions
|--------------------------------------------------------------------------
*/
'subscriptions' => [
'enabled' => (bool) env('MODULE_SUBSCRIPTIONS_ENABLED', true),
'label' => 'Fee Plans',
'description' => 'Fee schedules for certificate types and barangay services.',
],
/*
|--------------------------------------------------------------------------
| Landing Pages
|--------------------------------------------------------------------------
*/
'landing_pages' => [
'enabled' => (bool) env('MODULE_LANDING_PAGES_ENABLED', true),
'label' => 'Landing Pages',
'description' => 'Custom landing page creation and management.',
],
];