Ringkasan
Admin Dazo memiliki beberapa technical debt yang perlu ditangani secara bertahap. Daftar ini diurutkan berdasarkan prioritas dan dampak.
Critical Priority
| # | Issue | Dampak | Effort | Rencana |
|---|---|---|---|---|
| 1 | Hardcoded superadmin credentials | Security risk | Low | Hapus auto-create, enforce env-based seeding |
| 2 | PersonalAccessToken::updated() bug | Token tidak tersimpan dengan benar | Low | Ganti dengan updateOrCreate() |
| 3 | Stray dd() di LiveChatController | Production crash | Low | Hapus baris dd() |
| 4 | Password overwrite bug | User tidak bisa update profile tanpa ganti password | Low | Tambah kondisi if ($request->filled('password')) |
High Priority
| # | Issue | Dampak | Effort | Rencana |
|---|---|---|---|---|
| 5 | Addon yearly expiry bug | Addon “Year” tidak pernah expire dengan benar | Low | Fix $d_satuan → $addon_d_satuan di OrderController.php:179 |
| 6 | Loose phone matching covendor | Data salah match antar user | Medium | Normalize phone sebelum compare |
| 7 | No CI/CD pipeline | Deployment manual, error-prone | Medium | Buat GitHub Actions workflow |
| 8 | DB::transaction no-op di MongoDB | False sense of safety | Medium | Gunakan MongoDB session atau remove |
| 9 | N+1 query di PackageController | Slow performance page | Medium | Eager load atau aggregate |
Medium Priority
| # | Issue | Dampak | Effort | Rencana |
|---|---|---|---|---|
| 10 | Date stored as string | Index tidak efektif, comparison brittle | High | Migrate ke BSON DateTime |
| 11 | Duration string parsing | Typo break expiry math | Medium | Buat enum atau value object |
| 12 | Controller instantiation (new PaymentController()) | Tight coupling, hard to test | Medium | Extract ke service class |
| 13 | Mixed MongoDB + MySQL di LiveChat | Complexity, potential inconsistency | High | Konsolidasi ke satu database |
| 14 | Dead model imports di LiveChatController | Confusion, potential errors | Low | Cleanup unused imports |
| 15 | Typo filename QuickLoginControler | Inconsistent naming | Low | Rename file |
| 16 | Typo class name TicketingfeedbackController | Case mismatch dengan routes | Low | Fix class name atau routes |
Low Priority
| # | Issue | Dampak | Effort | Rencana |
|---|---|---|---|---|
| 17 | Velzon demo pages masih shipped | Bundle size besar | Low | Hapus unused pages |
| 18 | No queue (sync) | Slow request untuk operasi berat | High | Implement Redis queue |
| 19 | No index strategy MongoDB | Query slow di collection besar | Medium | Audit dan tambah index |
| 20 | Env-switched URLs hardcoded | Tidak flexible | Medium | Pindah ke config/services.php |
Rencana Pembenahan
Phase 1 — Quick Wins (1-2 hari)
- Fix critical bugs (#1, #2, #3, #4)
- Fix high priority bugs (#5, #6)
- Cleanup dead code (#14, #15, #16)
Phase 2 — Infrastructure (1 minggu)
- Setup CI/CD pipeline (#7)
- Fix MongoDB transaction handling (#8)
- Optimize N+1 queries (#9)
Phase 3 — Architecture (2-4 minggu)
- Migrate dates ke BSON DateTime (#10)
- Extract service classes (#11, #12)
- Konsolidasi database LiveChat (#13)
- Implement queue system (#18)
Phase 4 — Optimization (ongoing)
- MongoDB index audit (#19)
- Centralize service URLs (#20)
- Cleanup Velzon demo pages (#17)