Skip to content

Crud skill test 05 product collection#1348

Draft
manuelblum wants to merge 7 commits intocrud-skill-test-04-product-reviewfrom
crud-skill-test-05-product-collection
Draft

Crud skill test 05 product collection#1348
manuelblum wants to merge 7 commits intocrud-skill-test-04-product-reviewfrom
crud-skill-test-05-product-collection

Conversation

@manuelblum
Copy link
Contributor

Sample PR showcasing how Claude (Opus 4.6) implements full-stack CRUD for a scoped entity with ManyToMany relation management and page-based editing from a spec file using Comet skills. The entire implementation — API entity, admin UI, enum
components, DataGrid, form with RouterTabs, ManyToMany selection dialog — was generated from specs/product/05-product-collection.md.

What's implemented

Area Features
API Entity ProductCollection entity (scoped with domain + language), CollectionType enum (Manual, Seasonal,Featured, Sale), ManyToMany relation to Product, MikroORM migration, NestJS module registration
API Resolver & Service Full CRUD with scope support, @ResolveField for products relation, productCountcomputed field, server-side search by name, filtering by collectionType/isActive, slug query with scope, findBySlug
Validation Slug uniqueness per scope (SLUG_ALREADY_EXISTS), cross-field constraint validTo must be aftervalidFrom (VALID_TO_MUST_BE_AFTER_VALID_FROM), validation payloads on create/update mutations
Translatable Enum CollectionType: translatable component, colored Chip (Manual=default, Seasonal=info,Featured=primary, Sale=error), SelectField for form dropdown
DataGrid Server-side paginated grid with columns: name, collectionType (colored chip), productCount (badge),validFrom, validTo, isActive (boolean). Toolbar with search, GridFilterButton, Excel export via "More" menu, "Add Collection" button
Form Create/edit form with 3 FieldSets: General (name, slug with validation, description), Settings (CollectionTypeselect, isActive switch), Validity (validFrom/validTo DateTimePickers). Save conflict detection via useFormSaveConflict. Products relation excluded from form — managed separately
Products Tab (ManyToMany) "Products" RouterTab with read-only DataGrid of associated products. Each row hasedit icon (cross-entity RouterLink to Product edit page) and remove icon (unlinks product, doesn't delete). "Select Products" toolbar button opens modal selection dialog
Select Products Dialog Paginated, searchable checkbox DataGrid of all available products. Pre-selected products checked. keepNonExistentRowsSelected preserves selections across pages. Cancel (textDark variant) + Save Selection actions
Entity Toolbar Custom toolbar with entity name as title and CollectionType as translatable support text. Loading/error states handled inline
Pages ProductCollectionsPage with StackSwitch (grid, add, edit). Edit page uses RouterTabs for "General" (form) and "Products" (selection grid)
Master Menu New "Product Collections" entry with List icon and productCollections permission

Spec

See specs/product/05-product-collection.md for the full requirements.

Screenshots

Feature Screenshot
Product Collections grid with colored CollectionType chip, product count badge, and toolbar (search, filter, export, add) 07-product-collections-grid-with-data
Add Collection form with 3 FieldSets: General, Settings (CollectionType dropdown, Active switch), Validity (DateTimePickers) 02-product-collection-add-form
Edit page with entity toolbar (name + CollectionType support text), RouterTabs (General / Products), populated form data 03-product-collection-edit-form
Select Products dialog with paginated checkbox DataGrid, search, 3 products selected, Cancel + Save Selection actions Screenshot 2026-03-16 at 12 14 11
Products tab showing associated products with edit (cross-entity link) and remove (unlink) actions per row 06-products-tab-with-selections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant