You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
--- |
|
description: Prinsip arsitektur dan pattern yang wajib diikuti |
|
globs: ["geonet-console/app/**"] |
|
alwaysApply: false |
|
--- |
|
|
|
# Architecture Rules — geonet-console |
|
|
|
## Layer Structure |
|
|
|
``` |
|
Routes (routes/api.php) |
|
→ Middleware (auth, rate limit, scope) |
|
→ Controller (Http/Controllers/Api/V1/) — thin, validasi only |
|
→ Service (Services/) — business logic |
|
→ Model (Models/) — Eloquent |
|
→ Database |
|
``` |
|
|
|
## Prinsip Wajib |
|
|
|
- **Service layer** untuk semua logic — jangan taruh logic di controller atau model |
|
- **ApiActor** sebagai identity caller — jangan `Auth::user()` |
|
- **Audit log** untuk semua aksi write — via `AuditLogService` |
|
- **Jangan duplikasi Zabbix** — monitoring real-time tetap di Zabbix |
|
- **PostgreSQL untuk app baru** — SQL Server hanya legacy/GIS |
|
|
|
## Sistem Boundaries |
|
|
|
| Komponen | Tanggung Jawab | |
|
|----------|----------------| |
|
| geonet-console | IT portal: auth, LDAP mgmt, DB registry, API | |
|
| Zabbix | Monitoring server real-time — jangan duplikasi | |
|
| QNAP OSS | File storage (avatar) — via S3 API | |
|
| Active Directory | Identity source — auth via LDAP | |
|
| GeoNetAgent | Asset management endpoint (repo terpisah) | |
|
|
|
## Perubahan Arsitektur |
|
|
|
Jika ada perubahan arsitektur signifikan: |
|
1. Buat ADR di `docs/adr/ADR-NNNN-judul.md` |
|
2. Update diagram di `docs/diagrams/` |
|
3. Update `docs/architecture/` yang relevan |
|
4. Jangan delete ADR lama — buat baru yang reference ADR lama
|
|
|