diff --git a/README.md b/README.md index d49f66d..3f4ff11 100644 --- a/README.md +++ b/README.md @@ -1,174 +1,63 @@ -TODO +# BarangaySystem +Barangay Management & Governance Platform built on Hypervel (Laravel-compatible on Hyperf/Swoole) + Vue 3 SPA. -# Member Information Record +## Stack -This document contains the member details collected for registration or profile purposes. +| Layer | Technology | +|---|---| +| Backend | Hypervel (PHP 8.x, Hyperf/Swoole) | +| Frontend | Vue 3 SPA + Pinia | +| Database | MySQL | +| Cache/Session | Redis | +| Auth | JWT (lcobucci) + Session dual guard | +| File Storage | Multi-disk (local/S3) with CDN pipeline | +| Queue | Redis-backed | ---- +## Core Modules -## 🧍 Personal Information +- **Resident & Household Management** — resident profiles, household registry +- **Document/Certificate Requests** — Clearance, Residency, Indigency, Good Moral, Business Clearance + QR PH payment +- **Blotter / Incident System** — filing, hearings, resolution tracking +- **Barangay Projects** — infrastructure, livelihood, health, education projects +- **Budget & Finance** — income/expense recording, fiscal year reports +- **Geography Hierarchy** — Region → Province → City/Municipality → Barangay → Purok +- **QR PH Payment** — InstaPay/QRPH for document fees (GCash, Maya, and all major banks) +- **Announcements** — barangay bulletins +- **Admin Console** — system settings, branding, module toggles, user management, logs, backups +- **Accounting** — chart of accounts, journal entries, financial reports -| Field | Value | -|-------|-------| -| **First Name** | Rex Moran | -| **Middle Name** | - | -| **Last Name** | Loba | -| **Suffix** | - | -| **Gender** | - | -| **Date of Birth** | - | -| **Email** | rexm.loba@gmail.com | -| **Phone** | - | +## User Roles ---- +| Role | Description | +|---|---| +| `super_admin` | System owner / platform administrator | +| `punong_barangay` | Barangay Captain | +| `kagawad` | Barangay Councilor | +| `secretary` | Barangay Secretary | +| `treasurer` | Barangay Treasurer | +| `sk_chairperson` | SK Chairperson | +| `sk_councilor` | SK Councilor | +| `tanod` | Barangay Tanod | +| `bhw` | Barangay Health Worker | +| `daycare_worker` | Daycare Worker | +| `staff` | Administrative Staff | +| `resident` | Registered Resident | +| `audit` | Internal Auditor | -## 📱 Social Accounts +## Git Remotes -| Platform | Account Name / Number | -|-----------|-----------------------| -| **Facebook** | - | -| **Messenger** | - | -| **Viber** | - | -| **TikTok** | - | +``` +primary ssh://git@git.hesed.sbs:6611/BarangaySystem +origin ssh://git@git2.hesed.sbs:6612/josh/BarangaySystem.git +``` ---- +## Setup -## 🚨 Emergency Contact Information - -| Field | Value | -|-------|-------| -| **Name** | - | -| **Address** | - | -| **Contact Number** | - | -| **Relation** | - | - ---- - -## 🏛 Membership Details for Cooperatives - -| Field | Value | -|-------|-------| -| **Membership Type** | - | -| **Organization Name** | - | -| **Membership Level** | - | -| **Officer Position** | - | -| **Officer Level** | - | -| **Concurrent Position** | - | -| **Concurrent Level** | - | -| **Cooperative Name** | - | -| **Cooperative Position** | - | -| **Year Beginning** | - | - ---- - -## 🏠 Address Information - -| Field | Value | -|-------|-------| -| **Address** | - | -| **Region** | - | -| **Province** | - | -| **City / Municipality** | - | -| **Barangay** | - | - ---- - -## 👪 Family & Education - -| Field | Value | -|-------|-------| -| **Civil Status** | - | -| **Number of Children** | - | -| **Highest Educational Attainment** | - | -| **Course** | - | -| **School Attended** | - | -| **Year Last Attended** | - | - ---- - -## 💼 Employment & Livelihood - -| Field | Value | -|-------|-------| -| **Current Source of Livelihood** | - | -| **Company Last Employed** | - | -| **Position in the Company** | - | -| **Year Last Employed** | - | - ---- - -## 🆔 Government Information - -| Field | Value | -|-------|-------| -| **Tax Identification Number (TIN)** | - | -| **PhilHealth ID Number** | - | -| **Government Issued ID** | - | - ---- - -## 🖼 Supporting Documents - -| Field | Value | -|-------|-------| -| **Photograph** | - | -| **Date Submitted** | - | -| **Date Approved** | - | - ---- - -### 🗒 Notes -- Fields marked with “–” are currently unfilled. -- Update this file as new information becomes available. -- Store sensitive data responsibly and avoid committing private identifiers in public repositories. - ---- - -📧 **Contact:** rexm.loba@gmail.com - - - - - -

- -

-Build Status -Total Downloads -Latest Stable Version -License -

- -## Introduction - -**Hypervel** is a Laravel-style PHP framework with native coroutine support for ultra-high performance. - -Hypervel ports many core components from Laravel while maintaining familiar usage patterns, making it instantly accessible to Laravel developers. The framework combines the elegant and expressive development experience of Laravel with the powerful performance benefits of coroutine-based programming. If you're a Laravel developer, you'll feel right at home with this framework, requiring minimal learning curve. - -This is an ideal choice for building microservices, API gateways, and high-concurrency applications where traditional PHP frameworks often encounter performance constraints. - -## Why Hypervel? - -While Laravel Octane impressively enhances your Laravel application's performance, it's crucial to understand the nature of modern web applications. In most cases, the majority of latency stems from I/O operations, such as file operations, database queries, and API requests. - -However, Laravel doesn't support coroutines - the entire framework is designed for a blocking I/O environment. Applications heavily dependent on I/O operations will still face performance bottlenecks. Consider this scenario: - -Imagine building an AI-powered chatbot where each conversation API takes 3-5 seconds to respond. With 10 workers in Laravel Octane receiving 10 concurrent requests, all workers would be blocked until these requests complete. - -> You can see [benchmark comparison](https://hypervel.org/docs/introduction.html#benchmark) between Laravel Octane and Hypervel - -Even with Laravel Octane's improvements, your application's concurrent request handling capacity remains constrained by I/O operation duration. Hypervel addresses this limitation through coroutines, enabling efficient handling of concurrent I/O operations without blocking workers. This approach significantly enhances performance and concurrency for I/O-intensive applications. - -> See [this issue](https://github.com/laravel/octane/issues/765) for more discussions. - -## Documentation - -[https://hypervel.org/docs](https://hypervel.org/docs) - -Hypervel provides comprehensive and user-friendly documentation that allows you to quickly get started. From this documentation, you can learn how to use various components in Hypervel and understand the differences between this framework and Laravel. - -> Most of the content in this documentation is referenced from the official Laravel documentation. We appreciate the Laravel community's contributions. - -## License - -The Hypervel framework is open-sourced software licensed under the [MIT](https://opensource.org/licenses/MIT) license. \ No newline at end of file +```bash +cp .env.example .env +composer install +npm install +php artisan migrate --seed +npm run build +``` diff --git a/app/Enums/Barangay/BlotterStatus.php b/app/Enums/Barangay/BlotterStatus.php new file mode 100644 index 0000000..cfc7d51 --- /dev/null +++ b/app/Enums/Barangay/BlotterStatus.php @@ -0,0 +1,25 @@ + 'Filed', + self::FOR_HEARING => 'For Hearing', + self::SETTLED => 'Settled', + self::RESOLVED => 'Resolved', + self::DISMISSED => 'Dismissed', + self::ENDORSED => 'Endorsed to Higher Authority', + }; + } +} diff --git a/app/Enums/Barangay/DocumentStatus.php b/app/Enums/Barangay/DocumentStatus.php new file mode 100644 index 0000000..bbf142c --- /dev/null +++ b/app/Enums/Barangay/DocumentStatus.php @@ -0,0 +1,27 @@ + 'Draft', + self::PENDING_PAYMENT => 'Pending Payment', + self::PAID => 'Paid', + self::PROCESSING => 'Processing', + self::READY => 'Ready for Pickup', + self::CLAIMED => 'Claimed', + self::CANCELLED => 'Cancelled', + }; + } +} diff --git a/app/Enums/Barangay/PaymentStatus.php b/app/Enums/Barangay/PaymentStatus.php new file mode 100644 index 0000000..c64e906 --- /dev/null +++ b/app/Enums/Barangay/PaymentStatus.php @@ -0,0 +1,21 @@ + 'Pending', + self::PAID => 'Paid', + self::REFUNDED => 'Refunded', + self::WAIVED => 'Waived', + }; + } +} diff --git a/app/Enums/UserActions.php b/app/Enums/UserActions.php index b0c4f4e..0ea4ba0 100644 --- a/app/Enums/UserActions.php +++ b/app/Enums/UserActions.php @@ -1,30 +1,40 @@ env('APP_NAME', 'BukidBountyApp'), + 'name' => env('APP_NAME', 'BarangaySystem'), /* |-------------------------------------------------------------------------- diff --git a/config/modules.php b/config/modules.php index 83ec960..616d932 100644 --- a/config/modules.php +++ b/config/modules.php @@ -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__ENABLED=false in .env to disable a module. * - The middleware 'module:' 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.', ], ]; diff --git a/database/migrations/2026_06_06_100001_create_barangay_residents_table.php b/database/migrations/2026_06_06_100001_create_barangay_residents_table.php new file mode 100644 index 0000000..746aa05 --- /dev/null +++ b/database/migrations/2026_06_06_100001_create_barangay_residents_table.php @@ -0,0 +1,62 @@ +id(); + $table->string('hashkey')->unique()->nullable(); + $table->unsignedBigInteger('user_id')->nullable()->index(); + $table->string('firstname'); + $table->string('middlename')->nullable(); + $table->string('lastname'); + $table->string('suffix')->nullable(); + $table->date('dob')->nullable(); + $table->string('birthplace')->nullable(); + $table->enum('gender', ['MALE', 'FEMALE', 'OTHER'])->nullable(); + $table->enum('civil_status', ['SINGLE', 'MARRIED', 'WIDOWED', 'SEPARATED', 'ANNULLED'])->nullable(); + $table->string('citizenship')->nullable()->default('Filipino'); + $table->string('religion')->nullable(); + $table->string('occupation')->nullable(); + $table->decimal('monthly_income', 12, 2)->nullable(); + $table->string('blood_type')->nullable(); + $table->boolean('voter_status')->default(false); + $table->string('registered_voter_id')->nullable(); + $table->string('voter_precinct')->nullable(); + $table->boolean('head_of_household')->default(false); + // Address + $table->string('purok')->nullable(); + $table->string('street')->nullable(); + $table->string('barangay')->nullable(); + $table->string('city')->nullable(); + $table->string('province')->nullable(); + $table->string('region')->nullable(); + // Government IDs + $table->string('philhealth_id')->nullable(); + $table->string('sss_id')->nullable(); + $table->string('gsis_id')->nullable(); + $table->string('tin')->nullable(); + // Emergency contact + $table->string('emergency_contact_name')->nullable(); + $table->string('emergency_contact_phone')->nullable(); + $table->string('emergency_contact_address')->nullable(); + $table->boolean('is_active')->default(true); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + + public function down(): void + { + Schema::dropIfExists('barangay_residents'); + } +} diff --git a/database/migrations/2026_06_06_100002_create_barangay_households_table.php b/database/migrations/2026_06_06_100002_create_barangay_households_table.php new file mode 100644 index 0000000..7261dd0 --- /dev/null +++ b/database/migrations/2026_06_06_100002_create_barangay_households_table.php @@ -0,0 +1,51 @@ +id(); + $table->string('hashkey')->unique()->nullable(); + $table->string('household_no')->unique()->nullable(); + $table->unsignedBigInteger('head_resident_id')->nullable()->index(); + $table->string('address')->nullable(); + $table->string('purok')->nullable(); + $table->string('barangay')->nullable(); + $table->string('city')->nullable(); + $table->string('province')->nullable(); + $table->unsignedInteger('member_count')->default(0); + $table->enum('ownership_type', ['OWNED', 'RENTED', 'SHARED'])->nullable(); + $table->decimal('monthly_rental', 10, 2)->nullable(); + $table->boolean('has_electricity')->default(false); + $table->boolean('has_water')->default(false); + $table->string('housing_material')->nullable(); + $table->boolean('is_active')->default(true); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('barangay_household_members', function (Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('household_id')->index(); + $table->unsignedBigInteger('resident_id')->index(); + $table->string('relationship_to_head')->nullable(); + $table->boolean('is_active')->default(true); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('barangay_household_members'); + Schema::dropIfExists('barangay_households'); + } +} diff --git a/database/migrations/2026_06_06_100003_create_barangay_blotters_table.php b/database/migrations/2026_06_06_100003_create_barangay_blotters_table.php new file mode 100644 index 0000000..38f50f6 --- /dev/null +++ b/database/migrations/2026_06_06_100003_create_barangay_blotters_table.php @@ -0,0 +1,61 @@ +id(); + $table->string('hashkey')->unique()->nullable(); + $table->string('blotter_no')->unique()->nullable(); + $table->unsignedBigInteger('complainant_user_id')->nullable()->index(); + $table->string('complainant_name'); + $table->string('complainant_contact')->nullable(); + $table->unsignedBigInteger('respondent_user_id')->nullable()->index(); + $table->string('respondent_name')->nullable(); + $table->string('respondent_contact')->nullable(); + $table->enum('incident_type', ['AMICABLE', 'UNLAWFUL', 'MINOR', 'OTHER'])->default('AMICABLE'); + $table->date('incident_date')->nullable(); + $table->string('incident_location')->nullable(); + $table->text('narrative')->nullable(); + $table->enum('status', ['FILED', 'FOR_HEARING', 'SETTLED', 'RESOLVED', 'DISMISSED', 'ENDORSED'])->default('FILED'); + $table->timestamp('complaint_date')->nullable(); + $table->unsignedBigInteger('filed_by')->nullable(); + $table->unsignedBigInteger('assigned_officer_id')->nullable()->index(); + $table->text('resolution')->nullable(); + $table->string('settlement_type')->nullable(); + $table->string('endorsed_to')->nullable(); + $table->boolean('is_active')->default(true); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('barangay_blotter_hearings', function (Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('blotter_id')->index(); + $table->timestamp('hearing_date')->nullable(); + $table->enum('status', ['SCHEDULED', 'HELD', 'POSTPONED'])->default('SCHEDULED'); + $table->unsignedBigInteger('officer_id')->nullable(); + $table->text('notes')->nullable(); + $table->text('resolution')->nullable(); + $table->timestamp('next_hearing_date')->nullable(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('barangay_blotter_hearings'); + Schema::dropIfExists('barangay_blotters'); + } +} diff --git a/database/migrations/2026_06_06_100004_create_barangay_document_requests_table.php b/database/migrations/2026_06_06_100004_create_barangay_document_requests_table.php new file mode 100644 index 0000000..6e8df76 --- /dev/null +++ b/database/migrations/2026_06_06_100004_create_barangay_document_requests_table.php @@ -0,0 +1,70 @@ +id(); + $table->string('hashkey')->unique()->nullable(); + $table->string('name'); + $table->string('code')->unique(); + $table->text('description')->nullable(); + $table->decimal('base_fee', 10, 2)->default(0); + $table->unsignedInteger('processing_days')->default(1); + $table->boolean('is_active')->default(true); + $table->boolean('requires_clearance')->default(false); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + }); + + Schema::create('barangay_document_requests', function (Blueprint $table) { + $table->id(); + $table->string('hashkey')->unique()->nullable(); + $table->string('request_no')->unique()->nullable(); + $table->unsignedBigInteger('resident_user_id')->nullable()->index(); + $table->unsignedBigInteger('request_type_id')->index(); + $table->text('purpose')->nullable(); + $table->decimal('fee_amount', 10, 2)->default(0); + $table->enum('payment_status', ['PENDING', 'PAID', 'REFUNDED', 'WAIVED'])->default('PENDING'); + $table->enum('payment_method', ['CASH', 'GCASH', 'QRPH', 'BANK', 'WAIVED'])->nullable(); + $table->string('payment_ref')->nullable(); + $table->text('qrph_code')->nullable(); + $table->enum('status', ['DRAFT', 'PENDING_PAYMENT', 'PAID', 'PROCESSING', 'READY', 'CLAIMED', 'CANCELLED'])->default('DRAFT'); + $table->unsignedBigInteger('requested_by')->nullable(); + $table->unsignedBigInteger('processed_by')->nullable(); + $table->timestamp('claimed_at')->nullable(); + $table->text('notes')->nullable(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + + Schema::create('barangay_request_payments', function (Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('request_id')->index(); + $table->decimal('amount', 10, 2); + $table->enum('method', ['CASH', 'GCASH', 'QRPH', 'BANK', 'WAIVED']); + $table->string('reference')->nullable(); + $table->text('qrph_raw')->nullable(); + $table->timestamp('paid_at')->nullable(); + $table->unsignedBigInteger('verified_by')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('barangay_request_payments'); + Schema::dropIfExists('barangay_document_requests'); + Schema::dropIfExists('barangay_request_types'); + } +} diff --git a/database/migrations/2026_06_06_100005_create_barangay_projects_table.php b/database/migrations/2026_06_06_100005_create_barangay_projects_table.php new file mode 100644 index 0000000..e337690 --- /dev/null +++ b/database/migrations/2026_06_06_100005_create_barangay_projects_table.php @@ -0,0 +1,40 @@ +id(); + $table->string('hashkey')->unique()->nullable(); + $table->string('project_name'); + $table->text('description')->nullable(); + $table->enum('type', ['INFRASTRUCTURE', 'LIVELIHOOD', 'HEALTH', 'EDUCATION', 'ENVIRONMENT', 'OTHERS'])->default('INFRASTRUCTURE'); + $table->decimal('budget', 15, 2)->nullable(); + $table->enum('fund_source', ['GENERAL_FUND', 'SK', 'PROVINCE', 'NATIONAL', 'OTHERS'])->default('GENERAL_FUND'); + $table->date('start_date')->nullable(); + $table->date('end_date')->nullable(); + $table->enum('status', ['PLANNED', 'ONGOING', 'COMPLETED', 'SUSPENDED', 'CANCELLED'])->default('PLANNED'); + $table->string('implementing_office')->nullable(); + $table->string('contractor')->nullable(); + $table->string('location')->nullable(); + $table->unsignedInteger('beneficiaries_count')->nullable(); + $table->boolean('is_active')->default(true); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + + public function down(): void + { + Schema::dropIfExists('barangay_projects'); + } +} diff --git a/database/migrations/2026_06_06_100006_create_barangay_budget_table.php b/database/migrations/2026_06_06_100006_create_barangay_budget_table.php new file mode 100644 index 0000000..51fffb4 --- /dev/null +++ b/database/migrations/2026_06_06_100006_create_barangay_budget_table.php @@ -0,0 +1,35 @@ +id(); + $table->string('hashkey')->unique()->nullable(); + $table->string('fiscal_year', 4); + $table->enum('category', ['INCOME', 'EXPENSE']); + $table->string('source'); + $table->decimal('amount', 15, 2); + $table->text('description')->nullable(); + $table->date('date')->nullable(); + $table->string('reference')->nullable(); + $table->unsignedBigInteger('encoded_by')->nullable(); + $table->unsignedBigInteger('created_by')->nullable(); + $table->unsignedBigInteger('updated_by')->nullable(); + $table->timestamps(); + $table->softDeletes(); + }); + } + + public function down(): void + { + Schema::dropIfExists('barangay_budget'); + } +} diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index ff648f5..1fa4d2d 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -12,5 +12,6 @@ class DatabaseSeeder extends \Hyperf\Database\Seeders\Seeder (new UpdateUserInfoSeeder)->run(); (new AccountSeeder)->run(); (new LandingPageSeeder)->run(); + (new RequestTypeSeeder)->run(); } } diff --git a/database/seeders/LandingPageSeeder.php b/database/seeders/LandingPageSeeder.php index 6eb3b72..16c0f8f 100644 --- a/database/seeders/LandingPageSeeder.php +++ b/database/seeders/LandingPageSeeder.php @@ -28,672 +28,76 @@ class LandingPageSeeder extends \Hyperf\Database\Seeders\Seeder { return [ [ - 'title' => 'Bigkis Inc | Bisigco', - 'description' => 'National agricultural cooperative landing page — Bigkis Inc & Bisigco (Philippines).', - 'html_content' => $this->bigkisTemplate(), - ], - [ - 'title' => 'Bigkis Inc | Bisigco v2', - 'description' => 'Modern, dynamic, and premium landing page for Bigkis Inc & Bisigco.', - 'html_content' => $this->bigkisTemplateV2(), + 'title' => 'Barangay System — Default Landing', + 'description' => 'Default landing page for the Barangay Management & Governance Platform.', + 'html_content' => $this->defaultTemplate(), ], ]; } - private function bigkisTemplate(): string + private function defaultTemplate(): string { return <<<'HTML' -
-
-
-
- Bigkis Inc Logo -
- Bisigco Logo + + + + + + Barangay System + + + +
+

Barangay System

+
+
+

Serving Our Community

+

Request barangay certificates, report incidents, and access government services — online, anytime.

+ Access Portal +
+
+
+
📄
+

Certificate Requests

+

Barangay Clearance, Residency, Indigency, Good Moral & more

-
Est. 2022 · Philippines
-

BIGKIS INC | BISIGCO

-

Bigkis Bayanihang Masa · Sincere Advocacy · Responsible Action

-

A national agricultural cooperative uniting over 1 million members worldwide — empowering Filipino farmers, growers, and communities through unity, livelihood, and shared prosperity.

-
- Become a Member - Learn More +
+
📋
+

Blotter Filing

+

File incidents and track hearing schedules online

-
-
- -
-
-
1M+
Members Worldwide
-
81
Provinces Reached
-
100%
Filipino-Led
-
2022
Year Established
-
-
- -
-
-
-
-
About the Cooperative
-

Unity in Action. Livelihood for All.

-

Bigkis Inc (Bigkis Bayanihang Masa, Sincere Advocacy, Responsible Action Incorporated) is a nationwide cooperative movement built on the Filipino spirit of bayanihan — collective effort for the common good.

-

Together with BISIGCO (Bigkis Agri-Livelihood & Growers Cooperative), we provide farmers, fisherfolk, and growers with access to markets, fair pricing, capacity-building, and dignified livelihood opportunities.

-

From rice paddies in Luzon to upland farms in Mindanao, our members stand united — feeding the nation and uplifting their families.

-
-
- Bigkis Inc and Bisigco — Unity in Action, Livelihood for All -
+
+
👥
+

Resident Records

+

Manage resident and household information

-
-
- -
-
-
-
Our Programs
-

What We Do for Our Members

+
+
📢
+

Announcements

+

Stay updated on barangay news and events

-
-
-
🌾
-

Agri-Livelihood

-

Farm inputs, training, and market access for rice, corn, vegetables, livestock, and high-value crops.

-
-
-
🤝
-

Bayanihan Network

-

A nationwide grassroots network connecting members across barangays, municipalities, and provinces.

-
-
-
💰
-

Fair Trade Marketplace

-

Direct-to-consumer selling that removes middlemen and ensures fair prices for growers.

-
-
-
📚
-

Capacity Building

-

Skills training, financial literacy, and modern farming workshops for sustainable growth.

-
-
-
🛡️
-

Member Protection

-

Cooperative insurance, mutual aid, and advocacy for farmers' rights at every level of government.

-
-
-
🌏
-

Global OFW Bridge

-

Connecting overseas Filipinos with cooperative ventures back home — investment with impact.

-
-
-
-
- -
-
-
-

When Filipinos stand together — farmer beside farmer, neighbor beside neighbor — no challenge is too great. This is the spirit of Bigkis.

-
-
— The Bigkis Inc Movement
-
-
- -
-
-

Join the Movement

-

Become part of a million-strong cooperative reshaping Philippine agriculture — one bayanihan at a time.

- -
-
- -
-
-
-
-
-
- Bigkis Inc - Bisigco -
-
-
BIGKIS INC
-
Est. 2022
-
-
-

Bigkis Bayanihang Masa, Sincere Advocacy, Responsible Action Incorporated — a national agricultural cooperative serving Filipino farmers and communities.

-
-
-
Cooperative
- -
-
-
Connect
-
- 📍 Republic of the Philippines - ✉️ info@bigkis.ph - 📞 Member Hotline -
-
-
-
- © 2026 Bigkis Inc & BISIGCO — Unity in Action. Livelihood for All. 🇵🇭 -
-
-
-HTML; - } - - private function bigkisTemplateV2(): string - { - return <<<'HTML' -
- - -
-
-
- 🌟 Premium Design Interface -
- -
-
- Bigkis Inc -
-
-
- Bisigco -
-
- -
-

Bigkis | Bisigco

-

Sincere Advocacy · Responsible Action

-
- -

- A revolutionary national agricultural cooperative uniting millions across the Philippines. We empower farmers, elevate communities, and build a sustainable future through genuine bayanihan. -

- - -
-
- -
-
-
1M+
-
Active Members
-
-
-
81
-
Provinces Reached
-
-
-
100%
-
Filipino-Led
-
-
-
2022
-
Est. Year
-
-
- -
-
-
-
Impact & Programs
-

Empowering Growth

-
- -
-
-
🌾
-

Agri-Livelihood

-

State-of-the-art farm inputs, comprehensive training, and exclusive market access to elevate local agriculture.

-
- -
-
🤝
-

Bayanihan Network

-

A highly connected grassroots infrastructure linking members from barangays to provincial hubs seamlessly.

-
- -
-
💰
-

Fair Trade Hub

-

An optimized direct-to-consumer marketplace eliminating middlemen to maximize grower profitability.

-
- -
-
📚
-

Capacity Mastery

-

Advanced skill acquisition, robust financial literacy, and modern agronomy workshops.

-
- -
-
🛡️
-

Member Protection

-

Comprehensive cooperative insurance, mutual aid funds, and unwavering advocacy for farmers' rights.

-
- -
-
🌏
-

Global OFW Bridge

-

Strategic investment channels for overseas Filipinos to fund and grow domestic cooperative ventures.

-
-
-
-
- -
-
-
-

Ready to Make an Impact?

-

Join our million-strong movement. Transform agriculture, secure your livelihood, and uplift the nation with Bigkis and Bisigco.

- Become a Member -
-
-
- -
+
+
+ © 2026 Barangay System. All rights reserved. +
+ + HTML; } } diff --git a/database/seeders/RequestTypeSeeder.php b/database/seeders/RequestTypeSeeder.php new file mode 100644 index 0000000..01ccf3b --- /dev/null +++ b/database/seeders/RequestTypeSeeder.php @@ -0,0 +1,94 @@ + 'Barangay Clearance', + 'code' => 'CLEARANCE', + 'description' => 'General purpose barangay clearance for various applications.', + 'base_fee' => 50.00, + 'processing_days' => 1, + 'is_active' => true, + 'requires_clearance' => false, + ], + [ + 'name' => 'Certificate of Residency', + 'code' => 'RESIDENCY', + 'description' => 'Proof of residency within the barangay.', + 'base_fee' => 30.00, + 'processing_days' => 1, + 'is_active' => true, + 'requires_clearance' => false, + ], + [ + 'name' => 'Certificate of Indigency', + 'code' => 'INDIGENCY', + 'description' => 'Certification for indigent residents for government assistance.', + 'base_fee' => 0.00, + 'processing_days' => 1, + 'is_active' => true, + 'requires_clearance' => false, + ], + [ + 'name' => 'Certificate of Good Moral Character', + 'code' => 'GOOD_MORAL', + 'description' => 'Character reference certificate from the barangay.', + 'base_fee' => 50.00, + 'processing_days' => 2, + 'is_active' => true, + 'requires_clearance' => false, + ], + [ + 'name' => 'Business Clearance', + 'code' => 'BUSINESS_CLEARANCE', + 'description' => 'Barangay clearance for business registration and renewal.', + 'base_fee' => 200.00, + 'processing_days' => 3, + 'is_active' => true, + 'requires_clearance' => false, + ], + [ + 'name' => 'Closure of Business', + 'code' => 'BUSINESS_CLOSURE', + 'description' => 'Certification for business closure.', + 'base_fee' => 100.00, + 'processing_days' => 3, + 'is_active' => true, + 'requires_clearance' => false, + ], + [ + 'name' => 'Solo Parent ID', + 'code' => 'SOLO_PARENT', + 'description' => 'Certification for solo parent status.', + 'base_fee' => 0.00, + 'processing_days' => 2, + 'is_active' => true, + 'requires_clearance' => false, + ], + [ + 'name' => 'Senior Citizen Assistance', + 'code' => 'SENIOR_CITIZEN', + 'description' => 'Certification for senior citizen benefits.', + 'base_fee' => 0.00, + 'processing_days' => 1, + 'is_active' => true, + 'requires_clearance' => false, + ], + ]; + + foreach ($types as $type) { + \Hyperf\DbConnection\Db::table('barangay_request_types') + ->updateOrInsert(['code' => $type['code']], array_merge($type, [ + 'created_at' => now(), + 'updated_at' => now(), + ])); + } + } +} diff --git a/database/seeders/SystemSettingSeeder.php b/database/seeders/SystemSettingSeeder.php index eef9a81..8ad8d57 100644 --- a/database/seeders/SystemSettingSeeder.php +++ b/database/seeders/SystemSettingSeeder.php @@ -13,7 +13,7 @@ class SystemSettingSeeder extends \Hyperf\Database\Seeders\Seeder // General Settings [ 'key' => 'app_name', - 'value' => 'BukidBounty', + 'value' => 'Barangay System', 'type' => 'text', 'group' => 'general', 'label' => 'Application Name', @@ -21,7 +21,7 @@ class SystemSettingSeeder extends \Hyperf\Database\Seeders\Seeder ], [ 'key' => 'app_description', - 'value' => 'Agricultural Management Platform & Marketplace ecosystem for modern farming communities.', + 'value' => 'Barangay Management & Governance Platform', 'type' => 'text', 'group' => 'general', 'label' => 'Application Description', @@ -29,7 +29,7 @@ class SystemSettingSeeder extends \Hyperf\Database\Seeders\Seeder ], [ 'key' => 'app_tagline', - 'value' => 'Bounty of the Fields at Your Fingertips', + 'value' => 'Serving our community, one document at a time.', 'type' => 'text', 'group' => 'general', 'label' => 'Tagline', @@ -73,7 +73,7 @@ class SystemSettingSeeder extends \Hyperf\Database\Seeders\Seeder // Advanced Settings [ 'key' => 'footer_text', - 'value' => '© 2026 BukidBounty Ecosystem. All rights reserved.', + 'value' => '© 2026 Barangay System. All rights reserved.', 'type' => 'text', 'group' => 'advanced', 'label' => 'Footer Text', @@ -113,9 +113,9 @@ class SystemSettingSeeder extends \Hyperf\Database\Seeders\Seeder ], [ 'key' => 'app_mode', - 'value' => 'corporate', + 'value' => 'barangay', 'type' => 'select', - 'options' => json_encode(['corporate', 'cooperative', 'ngo', 'tandem', 'others']), + 'options' => json_encode(['barangay']), 'group' => 'general', 'label' => 'Application Mode', 'description' => 'Defines the operational mode of the platform, which affects available features and terminology.' @@ -130,7 +130,7 @@ class SystemSettingSeeder extends \Hyperf\Database\Seeders\Seeder ], [ 'key' => 'chapter_positions', - 'value' => json_encode(['National Director', 'Regional Director', 'Provincial Coordinator', 'City/Municipal Officer', 'Barangay Captain', 'Secretary', 'Treasurer', 'Auditor', 'Member']), + 'value' => json_encode(['Punong Barangay', 'Kagawad', 'Secretary', 'Treasurer', 'SK Chairperson', 'SK Councilor', 'Tanod', 'BHW', 'Daycare Worker', 'Staff', 'Member']), 'type' => 'json', 'group' => 'general', 'label' => 'Chapter Positions', diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index 1af200b..89ea09e 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -10,79 +10,63 @@ use Hypervel\Support\Str; class UserSeeder extends Seeder { - protected $users = [ [ - 'name' => 'Admin Ultima User', + 'name' => 'System Administrator', 'mobile_number' => '777', 'nickname' => 'admin', 'username' => 'admin', 'email' => 'admin@example.com', 'password' => 'OmegaPsilon32!', - 'acct_type' => 'ult', + 'acct_type' => 'super_admin', ], [ - 'name' => 'Super Op User', + 'name' => 'Punong Barangay', 'mobile_number' => '09111111111', - 'nickname' => 'superop', - 'username' => 'test_super_op', + 'nickname' => 'captain', + 'username' => 'test_captain', 'password' => 'TetraOmega21!', - 'acct_type' => 'super operator', + 'acct_type' => 'punong_barangay', ], [ - 'name' => 'Operator User', + 'name' => 'Barangay Secretary', 'mobile_number' => '09222222222', - 'nickname' => 'operator', - 'username' => 'test_op', + 'nickname' => 'secretary', + 'username' => 'test_secretary', 'password' => 'HeliosAlpha21!', - 'acct_type' => 'operator', + 'acct_type' => 'secretary', ], [ - 'name' => 'Coordinator User', + 'name' => 'Barangay Treasurer', 'mobile_number' => '09333333333', - 'nickname' => 'coordinator', - 'username' => 'test_coord', + 'nickname' => 'treasurer', + 'username' => 'test_treasurer', 'password' => 'ParagonSigma51!', - 'acct_type' => 'coordinator', + 'acct_type' => 'treasurer', ], [ - 'name' => 'Rider User', + 'name' => 'Sample Kagawad', 'mobile_number' => '09444444444', - 'nickname' => 'rider', - 'username' => 'test_rider', + 'nickname' => 'kagawad', + 'username' => 'test_kagawad', 'password' => 'MilipedeAstra21!', - 'acct_type' => 'rider', + 'acct_type' => 'kagawad', ], [ - 'name' => 'POS Terminal User', + 'name' => 'Sample Resident', 'mobile_number' => '09555555555', - 'nickname' => 'pos', - 'username' => 'test_pos', - 'password' => 'MedicusGamma21!', - 'acct_type' => 'pos terminal', - ], - [ - 'name' => 'Standard User', - 'mobile_number' => '09666666666', - 'nickname' => 'user', - 'username' => 'test_user', + 'nickname' => 'resident', + 'username' => 'test_resident', 'password' => 'OrionDraconis21!', - 'acct_type' => 'user', + 'acct_type' => 'resident', ], ]; - /** - * Run the database seeds. - * - * @return void - */ public function run() { foreach ($this->users as $data) { User::firstOrCreate(['mobile_number' => $data['mobile_number']], [ 'name' => $data['name'], - // 'hashkey' => $data['hashkey'], - 'nickname' => $data['nickname'] ?? null, 'username' => $data['username'] ?? null, 'email' => $data['email'] ?? null, @@ -109,4 +93,3 @@ class UserSeeder extends Seeder } } } -