# Context: Business Summary

LOMA-PORTAL is a **portal-platform** preset materialization for Loma Group. Single-tenant today, multi-tenant ready.

## Domain at a glance

```
Tenant
 ├── Users  →  UserRole  →  Role  →  RolePermission  →  Permission
 ├── Departments (tree)
 ├── OrgUnits
 ├── Announcements        (visibility: ALL | ROLES | DEPARTMENTS)
 ├── Documents            (owner = User; metadata in DB; blob in S3)
 ├── ApprovalRequests     (state machine: DRAFT→SUBMITTED→IN_REVIEW→APPROVED|REJECTED|CANCELLED)
 │     └── ApprovalSteps  (ordered; each has approver + decision + comment)
 └── AuditLogs            (append-only, tenant-scoped)
```

## Surface (from the portal-platform manifest)

- `/auth/login` + refresh + me
- `/dashboard` (summary)
- `/documents` (library, signed-URL uploads)
- `/announcements`
- `/approvals` (inbox + new)
- `/directory` (people search)
- `/admin/users`, `/admin/roles`, `/admin/audit`

## System roles (seeded)

`system-admin` (all), `admin`, `manager`, `user`, `guest`. See `prisma/seed.ts` for permission grants.

## Compliance posture

- PDPA + GDPR enabled (`project.config.json#compliance`).
- Audit trail on auth + mutations + sensitive reads.
- Right-to-erasure via `database/scripts/anonymize/anonymize_user.sql` (anonymize in place, preserve FKs).

## Out of scope (today)

- Payment / commerce.
- Multi-tenant enforcement (schema ready, query-filter not enforced).
- SMS provider (noop channel only).
