Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
New Feature
unusualify/modularity
cursor
repositories
method-transformers
traits
modular-architecture
vuetify
composables
lifecycle-hooks

This rule provides standards for new features of Modularous

Install
php artisan boost:add-skill unusualify/modularity

Save this content to: .cursor/rules/new-feature.mdc

This project is a feature-based modular Laravel package using:
- Repository pattern as the primary data access layer
- Trait-driven behavior composition
- Method Transformers for lifecycle interception

Core rules:

1. Repositories
- Repositories are the single source of truth for data mutations
- All create/update/delete logic must pass through repository methods
- Never access Eloquent models directly outside repositories

2. Method Transformers
- Repository methods must respect transformer lifecycle hooks:
  - beforeSave
  - afterSave
  - beforeCreate / afterCreate
  - beforeUpdate / afterUpdate
- Transformers must remain side-effect aware and predictable
- Do not embed business logic directly in transformers

3. Traits
- Traits are used for reusable, cross-cutting behavior only
- Trait methods must be conventionally named and discoverable
- Trait execution must be inferred via repository or model lifecycle
- Avoid stateful traits unless explicitly required

4. Modularous
- Code must remain module-isolated and feature-scoped
- No cross-module coupling without explicit contracts
- Shared logic must live in base repositories or shared traits

5. Laravel Conventions
- Respect Laravel naming, directory structure, and contracts
- Use service container binding instead of manual instantiation
- Prefer collections, value objects, and DTO-like arrays over primitives

6. Vue / Vuetify
- Vue components must be presentational by default
- Business logic belongs in composables or backend repositories
- Follow Vuetify component and slot conventions strictly

General Principle:
Favor convention over configuration. Extend existing patterns—do not invent new ones unless unavoidable.

This project is a feature-based modular Laravel package using:

  • Repository pattern as the primary data access layer
  • Trait-driven behavior composition
  • Method Transformers for lifecycle interception

Core rules:

  1. Repositories
  • Repositories are the single source of truth for data mutations
  • All create/update/delete logic must pass through repository methods
  • Never access Eloquent models directly outside repositories
  1. Method Transformers
  • Repository methods must respect transformer lifecycle hooks:
    • beforeSave
    • afterSave
    • beforeCreate / afterCreate
    • beforeUpdate / afterUpdate
  • Transformers must remain side-effect aware and predictable
  • Do not embed business logic directly in transformers
  1. Traits
  • Traits are used for reusable, cross-cutting behavior only
  • Trait methods must be conventionally named and discoverable
  • Trait execution must be inferred via repository or model lifecycle
  • Avoid stateful traits unless explicitly required
  1. Modularous
  • Code must remain module-isolated and feature-scoped
  • No cross-module coupling without explicit contracts
  • Shared logic must live in base repositories or shared traits
  1. Laravel Conventions
  • Respect Laravel naming, directory structure, and contracts
  • Use service container binding instead of manual instantiation
  • Prefer collections, value objects, and DTO-like arrays over primitives
  1. Vue / Vuetify
  • Vue components must be presentational by default
  • Business logic belongs in composables or backend repositories
  • Follow Vuetify component and slot conventions strictly

General Principle: Favor convention over configuration. Extend existing patterns—do not invent new ones unless unavoidable.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log