feat: Phase 1 bootstrap — adapt BukidBountyApp as BarangaySystem
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

- 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
This commit is contained in:
Jonathan Sykes
2026-06-06 18:47:20 +08:00
parent eb4a5731fb
commit 19fec0933b
19 changed files with 797 additions and 1096 deletions

View File

@@ -18,7 +18,7 @@ return [
|
*/
'name' => env('APP_NAME', 'BukidBountyApp'),
'name' => env('APP_NAME', 'BarangaySystem'),
/*
|--------------------------------------------------------------------------

View File

@@ -4,10 +4,10 @@ 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.
@@ -20,191 +20,150 @@ return [
|--------------------------------------------------------------------------
| Master System Toggle
|--------------------------------------------------------------------------
| If set to false, all module-specific middleware checks will be bypassed.
| Useful for development or full-feature environments.
*/
'system_enabled' => (bool) env('MODULES_SYSTEM_ENABLED', true),
/*
|--------------------------------------------------------------------------
| POS (Point of Sale)
| Residents
|--------------------------------------------------------------------------
| Includes: POS terminal, sessions, item management, stats, access keys
*/
'pos' => [
'enabled' => (bool) env('MODULE_POS_ENABLED', true),
'label' => 'Point of Sale (POS)',
'description' => 'POS terminal operations, sessions, sales, and access keys.',
'residents' => [
'enabled' => (bool) env('MODULE_RESIDENTS_ENABLED', true),
'label' => 'Resident Management',
'description' => 'Resident registration, profiles, and search.',
],
/*
|--------------------------------------------------------------------------
| Products
| Households
|--------------------------------------------------------------------------
| Includes: Product CRUD, categories, store assignments, batch add
*/
'products' => [
'enabled' => (bool) env('MODULE_PRODUCTS_ENABLED', true),
'label' => 'Product Management',
'description' => 'Product creation, editing, categories, and store assignments.',
'households' => [
'enabled' => (bool) env('MODULE_HOUSEHOLDS_ENABLED', true),
'label' => 'Household Management',
'description' => 'Household registration and member management.',
],
/*
|--------------------------------------------------------------------------
| Stores
| Blotters / Incidents
|--------------------------------------------------------------------------
| Includes: Store CRUD, management, product removal from store
*/
'stores' => [
'enabled' => (bool) env('MODULE_STORES_ENABLED', true),
'label' => 'Store Management',
'description' => 'Store creation, editing, and product-store relationships.',
'blotters' => [
'enabled' => (bool) env('MODULE_BLOTTERS_ENABLED', true),
'label' => 'Blotter & Incident System',
'description' => 'Incident filing, hearings, and resolution tracking.',
],
/*
|--------------------------------------------------------------------------
| Shipments
| Documents / Certificates
|--------------------------------------------------------------------------
| Includes: Shipment tracking, couriers, status updates
*/
'shipments' => [
'enabled' => (bool) env('MODULE_SHIPMENTS_ENABLED', true),
'label' => 'Shipments & Logistics',
'description' => 'Shipment tracking, courier management, and delivery status.',
'documents' => [
'enabled' => (bool) env('MODULE_DOCUMENTS_ENABLED', true),
'label' => 'Document Management',
'description' => 'Document storage, retrieval, and version control.',
],
/*
|--------------------------------------------------------------------------
| Farmers
| Certificate Requests
|--------------------------------------------------------------------------
| Includes: Farmer registration, listing, verification, organizations
*/
'farmers' => [
'enabled' => (bool) env('MODULE_FARMERS_ENABLED', true),
'label' => 'Farmer Management',
'description' => 'Farmer registration, profile management, and verification.',
'certificates' => [
'enabled' => (bool) env('MODULE_CERTIFICATES_ENABLED', true),
'label' => 'Certificate Request & Printing',
'description' => 'End-to-end certificate request, payment, and printing workflow.',
],
/*
|--------------------------------------------------------------------------
| Cooperatives
| Barangay Projects
|--------------------------------------------------------------------------
| Includes: Cooperative CRUD, members, documents, governance, chapters
*/
'cooperatives' => [
'enabled' => (bool) env('MODULE_COOPERATIVES_ENABLED', true),
'label' => 'Cooperatives & Organizations',
'description' => 'Cooperative management, membership, documents, and governance.',
'projects' => [
'enabled' => (bool) env('MODULE_PROJECTS_ENABLED', true),
'label' => 'Barangay Projects',
'description' => 'Project tracking, budgets, and status updates.',
],
/*
|--------------------------------------------------------------------------
| Accounting
| Budget & Finance
|--------------------------------------------------------------------------
| Includes: Account trees, transactions, daily entries, reports
*/
'accounting' => [
'enabled' => (bool) env('MODULE_ACCOUNTING_ENABLED', true),
'label' => 'Accounting & Finance',
'description' => 'Chart of accounts, transaction records, and financial reports.',
],
/*
|--------------------------------------------------------------------------
| Store-Level Accounting
|--------------------------------------------------------------------------
| Controls whether Store Owner / Store Manager can access the Accounting
| Dashboard and Manage Accounts pages. Big 3 are never affected by this.
| Toggle via UltimateConsole → Module Controls at runtime.
*/
'accounting_store' => [
'enabled' => (bool) env('MODULE_ACCOUNTING_STORE_ENABLED', true),
'label' => 'Store Accounting Access',
'description' => 'Grants Store Owner and Store Manager access to the Accounting Dashboard and their store\'s Chart of Accounts. Disable to hide accounting from store-level users.',
],
/*
|--------------------------------------------------------------------------
| Transactions
|--------------------------------------------------------------------------
| Includes: Global transaction listing, creation, types
*/
'transactions' => [
'enabled' => (bool) env('MODULE_TRANSACTIONS_ENABLED', true),
'label' => 'Global Transactions',
'description' => 'System-wide transaction recording and listing.',
],
/*
|--------------------------------------------------------------------------
| Properties
|--------------------------------------------------------------------------
| Includes: Property listing, referrals
*/
'properties' => [
'enabled' => (bool) env('MODULE_PROPERTIES_ENABLED', true),
'label' => 'Property Management',
'description' => 'Property listings, referrals, and lead management.',
],
/*
|--------------------------------------------------------------------------
| Cart
|--------------------------------------------------------------------------
| Includes: Shopping cart operations
*/
'cart' => [
'enabled' => (bool) env('MODULE_CART_ENABLED', true),
'label' => 'Shopping Cart',
'description' => 'Cart operations for the marketplace.',
],
/*
|--------------------------------------------------------------------------
| Credits / Wallet
|--------------------------------------------------------------------------
| Includes: Top-up, transfer credit, wallet data
*/
'credits' => [
'enabled' => (bool) env('MODULE_CREDITS_ENABLED', true),
'label' => 'Credits & Wallet',
'description' => 'Credit top-up, transfers, and wallet management.',
],
/*
|--------------------------------------------------------------------------
| Landing Pages
|--------------------------------------------------------------------------
| Includes: Landing page editor, public rendering
*/
'landing_pages' => [
'enabled' => (bool) env('MODULE_LANDING_PAGES_ENABLED', true),
'label' => 'Landing Pages',
'description' => 'Custom landing page creation and management.',
'budget' => [
'enabled' => (bool) env('MODULE_BUDGET_ENABLED', true),
'label' => 'Budget & Finance',
'description' => 'Annual budget, income/expense recording, and reports.',
],
/*
|--------------------------------------------------------------------------
| Announcements
|--------------------------------------------------------------------------
| Includes: Announcement CRUD, latest public announcements
*/
'announcements' => [
'enabled' => (bool) env('MODULE_ANNOUNCEMENTS_ENABLED', true),
'label' => 'Announcements',
'description' => 'System-wide announcements and notifications.',
'enabled' => (bool) env('MODULE_ANNOUNCEMENTS_ENABLED', true),
'label' => 'Announcements',
'description' => 'Barangay bulletins and public announcements.',
],
/*
|--------------------------------------------------------------------------
| Batch Operations
| Accounting
|--------------------------------------------------------------------------
| Includes: Batch creation of products, stores, users
*/
'batch' => [
'enabled' => (bool) env('MODULE_BATCH_ENABLED', true),
'label' => 'Batch Operations',
'description' => 'Bulk creation of products, stores, and user accounts.',
'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.',
],
];