-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.cursorrules
More file actions
11 lines (10 loc) · 765 Bytes
/
Copy path.cursorrules
File metadata and controls
11 lines (10 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
# Cursor Project Rules (ALWAYS FOLLOW)
- Laravel 12 + PHP 8.3+; Eloquent-first.
- Vue 3 + Inertia 2 + PrimeVue + Tailwind.
- MySQL 8; soft deletes; foreign keys ON.
- Multi-branch: all tenant data has branch_id; use server-side BranchContext; add BelongsToBranch trait + global scope where safe.
- Stock: mutate only via StockLedger; `stocks` is derived/materialized from `stock_ledger_entries`.
- Security: Policies + Form Requests for every write. Never trust client-provided branch_id/user_id.
- Quality: Add indexes on FKs and frequently filtered columns; prevent N+1 with `with()`.
- UI: DataTable (server), dialogs for create/edit, ConfirmDialog for destructive, Toasts for feedback.
- Tests: Pest; cover happy paths, authz failures, validation, edge cases.