refactor: split actions into use cases and repositories #3

Merged
aferrer merged 13 commits from refactor/use-cases-architecture into dev 2026-06-04 20:31:44 +00:00
Owner

Summary

  • Reorganizes server actions, schemas, types, and use-cases into root src/* folders.
  • Moves assignment, asset, item, category, recipient, and user mutation logic into use-cases.
  • Updates Prisma workflow, admin user bootstrap, role guards, and removes generated Prisma client from git.

Changes

Area Change
Prisma Moves schema/migrations to prisma/*, updates Prisma 7 client generation, removes generated client from git
Auth/Admin Adds role guards, /forbidden, admin users pages, and bootstrap seed
Architecture Adds src/use-cases/* and keeps services as repository/data-access layer
Actions/Schemas/Types Moves legacy src/lib/actions, src/lib/schemas, src/lib/types into root folders
Inventory Refactors assignment, asset, item, category, and recipient mutations
Import Moves legacy import action/schema structurally without redesigning import behavior

Test Plan

  • bunx tsc --noEmit
  • bunx prisma validate
  • Fresh review confirmed no tracked leftovers from @/lib/actions, @/lib/schemas, @/lib/types
  • Fresh review confirmed no tracked assignament typo remains
## Summary - Reorganizes server actions, schemas, types, and use-cases into root `src/*` folders. - Moves assignment, asset, item, category, recipient, and user mutation logic into use-cases. - Updates Prisma workflow, admin user bootstrap, role guards, and removes generated Prisma client from git. ## Changes | Area | Change | |------|--------| | Prisma | Moves schema/migrations to `prisma/*`, updates Prisma 7 client generation, removes generated client from git | | Auth/Admin | Adds role guards, `/forbidden`, admin users pages, and bootstrap seed | | Architecture | Adds `src/use-cases/*` and keeps services as repository/data-access layer | | Actions/Schemas/Types | Moves legacy `src/lib/actions`, `src/lib/schemas`, `src/lib/types` into root folders | | Inventory | Refactors assignment, asset, item, category, and recipient mutations | | Import | Moves legacy import action/schema structurally without redesigning import behavior | ## Test Plan - [x] `bunx tsc --noEmit` - [x] `bunx prisma validate` - [x] Fresh review confirmed no tracked leftovers from `@/lib/actions`, `@/lib/schemas`, `@/lib/types` - [x] Fresh review confirmed no tracked `assignament` typo remains
aferrer added 13 commits 2026-06-04 20:29:34 +00:00
aferrer merged commit 16a68e01ab into dev 2026-06-04 20:31:44 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aferrer/stock-manager#3