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
Project Conventions
refineder/filament-crm
cursor
real-time
crm
chat
laravel
whatsapp
livewire
filament
refineder
wasenderapi

Project-specific conventions for the Refineder Filament CRM plugin

Install
php artisan boost:add-skill refineder/filament-crm

Save this content to: .cursor/rules/project-conventions.mdc

# Refineder Filament CRM - Project Conventions

## Package Identity
- Vendor: `refineder`
- Package: `filament-crm`
- Namespace: `Refineder\FilamentCrm`
- Plugin ID: `refineder-crm`
- Config key: `refineder-crm`
- Table prefix: `crm_`
- Translation namespace: `refineder-crm`

## Directory Structure
```
src/
├── RefinederCrmPlugin.php          # Filament Plugin class
├── RefinederCrmServiceProvider.php  # Spatie PackageServiceProvider
├── Models/                         # Eloquent models
├── Resources/                      # Filament resources with Pages/, Schemas/, Tables/
├── Livewire/                       # Livewire components (ChatBox, etc.)
├── Http/Controllers/               # Webhook controller
├── Services/                       # WasenderService wrapper
├── Enums/                          # PHP 8.1+ enums
├── Events/                         # Laravel events
├── Widgets/                        # Filament dashboard widgets
└── Traits/                         # Shared traits
```

## Database Tables
- `crm_contacts` - Customer contacts
- `crm_conversations` - Chat conversations
- `crm_messages` - Individual messages
- `crm_deals` - Sales deals/opportunities
- `crm_deal_stages` - Deal pipeline stages
- `crm_whatsapp_sessions` - WhatsApp session configs

## Key Principles
1. Multi-tenant support - scope by team/user
2. Multi-session - support multiple WhatsApp accounts
3. Real-time - use Livewire polling/events for chat
4. Extensible - allow users to customize models, resources
5. Translation-ready - all strings through `__('refineder-crm::...')`
6. Use PHP Enums for statuses and types
7. Never hardcode WasenderAPI URLs - use config
8. All webhook routes must be verifiable
9. Support both Arabic and English out of the box

## Model Conventions
- All models extend `Illuminate\Database\Eloquent\Model`
- Use `HasFactory` trait
- Define `$table` with `crm_` prefix
- Use `$casts` for JSON fields and enums
- Define relationships explicitly

## Testing Approach
- Use Pest PHP for testing
- Mock WasenderClient for API tests
- Use Filament testing utilities for resource tests

Refineder Filament CRM - Project Conventions

Package Identity

  • Vendor: refineder
  • Package: filament-crm
  • Namespace: Refineder\FilamentCrm
  • Plugin ID: refineder-crm
  • Config key: refineder-crm
  • Table prefix: crm_
  • Translation namespace: refineder-crm

Directory Structure

src/
├── RefinederCrmPlugin.php          # Filament Plugin class
├── RefinederCrmServiceProvider.php  # Spatie PackageServiceProvider
├── Models/                         # Eloquent models
├── Resources/                      # Filament resources with Pages/, Schemas/, Tables/
├── Livewire/                       # Livewire components (ChatBox, etc.)
├── Http/Controllers/               # Webhook controller
├── Services/                       # WasenderService wrapper
├── Enums/                          # PHP 8.1+ enums
├── Events/                         # Laravel events
├── Widgets/                        # Filament dashboard widgets
└── Traits/                         # Shared traits

Database Tables

  • crm_contacts - Customer contacts
  • crm_conversations - Chat conversations
  • crm_messages - Individual messages
  • crm_deals - Sales deals/opportunities
  • crm_deal_stages - Deal pipeline stages
  • crm_whatsapp_sessions - WhatsApp session configs

Key Principles

  1. Multi-tenant support - scope by team/user
  2. Multi-session - support multiple WhatsApp accounts
  3. Real-time - use Livewire polling/events for chat
  4. Extensible - allow users to customize models, resources
  5. Translation-ready - all strings through __('refineder-crm::...')
  6. Use PHP Enums for statuses and types
  7. Never hardcode WasenderAPI URLs - use config
  8. All webhook routes must be verifiable
  9. Support both Arabic and English out of the box

Model Conventions

  • All models extend Illuminate\Database\Eloquent\Model
  • Use HasFactory trait
  • Define $table with crm_ prefix
  • Use $casts for JSON fields and enums
  • Define relationships explicitly

Testing Approach

  • Use Pest PHP for testing
  • Mock WasenderClient for API tests
  • Use Filament testing utilities for resource tests
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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin