# Frontend ↔ Backend Permissions Sync

Source of truth: backend `PermissionSeeder` (`database/seeders/PermissionSeeder.php`).

Align the frontend permission catalog to these notes.

---

## Fix immediately (keys that do not exist in backend)

| Remove from frontend | Why |
|----------------------|-----|
| `pages.create` | Backend only has `pages.view`, `pages.update` |
| `pages.delete` | Same — no create/delete for pages |

---

## Add missing actions

| Module | Add |
|--------|-----|
| Suggestions | `suggestions.delete` (backend has view + delete) |

**Correct Suggestions actions:**

```
suggestions.view
suggestions.delete
```

**Correct Pages actions:**

```
pages.view
pages.update
```

---

## Modules missing from the frontend list

Add these pages/groups so role UI matches the API:

| Page / group | Actions |
|--------------|---------|
| Permissions | `permissions.view` |
| UserMedicalTestResults | `user_medical_test_results.view` |

---

## Health Targets (separated)

Do **not** reuse `health_goals.*` or `water_config.*` for this page.

```
health_targets.view
health_targets.create
health_targets.update
health_targets.delete
```

---

## Already aligned (no change)

App Settings, Admins, Roles, Activity Logs, Users, Countries, Cities, Onboarding Questions, Daily Questions, Health Symptoms/Conditions/Goals, Diseases, Water Config (`water_config.*` for WaterIntakeUnits only), Medical Tests, Dose Types, Fasting Plans / Custom Fasting Plans / Fasting Sessions, Palm Stages, Nutrition Tips, Meals, Subscription Packages / Cancellations / Cancel Reasons, FAQs.

---

## Notes (not conflicts)

- Frontend page **WaterIntakeUnits** → use keys `water_config.*` (backend group name is “Water Config”).
- **HealthGoals** and **HealthTargets** are different modules — do not share permission keys.
