This commit is contained in:
Saufi
2026-06-03 08:51:22 +08:00
commit a14d43fe34
347 changed files with 38197 additions and 0 deletions

98
docs/00-project-brief.md Normal file
View File

@@ -0,0 +1,98 @@
# Sistem Pengurusan Pusat Mengundi Pilihanraya Negeri - Project Brief
## Purpose
This project is a Laravel and MySQL web application for managing staffing, assignments, documentation, attendance, finance verification, exports, and operational records for Pusat Mengundi during a Pilihanraya Negeri.
The application supports a practical Malaysian government/PBT-style workflow where Admin users configure election geography and staffing needs, PPM users review and assign staff at their own Pusat Mengundi, KTM users manage KP under their own team, Admin Kewangan verifies banking data, and public Pemohon users apply through QR links tied to a specific Pusat Mengundi.
## Workspace Inspection
Inspection date: 2026-05-28
Original findings:
- Workspace path: `C:\Users\User\Aplikasi\prn2026`
- No existing Laravel application was present.
- No `.git` repository was initialized.
- No `AGENTS.md` project instruction file was present.
- PHP CLI was available: PHP 8.5.1.
- Composer was available: Composer 2.9.4.
- Node was available: Node 25.1.0.
- PowerShell blocks `npm.ps1`; use `npm.cmd` for npm commands.
- MySQL CLI was not available in PATH.
Current implementation findings:
- Laravel application has been scaffolded.
- Installed Laravel skeleton version: 13.8.0.
- Installed Laravel framework version: 13.12.0.
- Local `.env` is configured for MySQL database `prn2026`.
- MySQL connection was confirmed through Laravel/PDO during Phase 2.
## Phase 1 Snapshot
Update date: 2026-05-28
- Authentication scaffolding is available through Laravel Breeze.
- Generic public account registration route is disabled.
- Bootstrap 5 layout and role-based dashboard routes are available.
- RBAC package, roles, permissions, and default Admin seeder are available.
- `.env.example` is configured for MySQL.
## Phase 2 Snapshot
Update date: 2026-05-28
- Core election-domain migrations are implemented.
- Domain models and Eloquent relationships are implemented.
- Factory baseline is available for core hierarchy/application/assignment models.
- Seeders create roles, permissions, positions, sample election hierarchy, quotas, sample role users, sample dual-role PPM/KTM assignment, and wheelchair allocation.
## Target Users
- Admin
- Admin Kewangan
- PPM
- KTM
- Pemohon
## Core Hierarchy
The system is built around this election hierarchy:
```text
Bahagian Pilihanraya
└── Daerah Mengundi
└── Pusat Mengundi
└── Saluran Mengundi
```
Each Pusat Mengundi can have one PPM, multiple PAPM, KKM representative, JKM representative, Police escort data, wheelchair allocation, and multiple Saluran Mengundi. Each Saluran Mengundi can have one KTM, one Polis Pengiring, one KPDP, four KP, and one calon simpanan.
## Main Business Outcomes
- Configure election event, registration period, polling date, hierarchy, positions, and quotas.
- Generate secure QR links for public application per Pusat Mengundi.
- Collect applicant details and required documents through a public-facing form.
- Enforce vacancy, role, period, and duplicate IC rules.
- Allow PPM to approve, reject, change roles, and assign staff only within their own Pusat Mengundi.
- Allow KTM to register and approve KP only under their own team.
- Allow Admin to manage all data, including post-closing changes with required notes.
- Allow Admin Kewangan to verify banking information without changing assignments.
- Track wheelchairs and polling-day attendance.
- Export operational and finance reports while logging every export.
- Audit important changes, including previous values, new values, actor, timestamp, and notes where applicable.
## Phase 0 Scope
Phase 0 was documentation and planning only. No Laravel project scaffolding, package installation, migrations, or feature code was created in Phase 0.
## Phase 1 Scope
Phase 1 delivered Laravel setup, authentication, Bootstrap base layout, role and permission setup, and base dashboards.
## Phase 2 Scope
Phase 2 delivered the core database, models, relationships, factories, and seeders needed for the election domain.