# BarangaySystem

Barangay Management & Governance Platform built on Hypervel (Laravel-compatible on Hyperf/Swoole) + Vue 3 SPA.

## Stack

| 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

- **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

## 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 |

## Git Remotes

```
primary   ssh://git@git.hesed.sbs:6611/BarangaySystem
origin    ssh://git@git2.hesed.sbs:6612/josh/BarangaySystem.git
```

## Setup

```bash
cp .env.example .env
composer install
npm install
php artisan migrate --seed
npm run build
```
