Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This project is **InvoicePlane v2**, a **multi-tenant Laravel application** with
- **Module System:** nwidart/laravel-modules
- **Permissions:** spatie/laravel-permission
- **Multi-tenancy:** Filament Companies with `BelongsToCompany` trait
- **Queue System:** Required for export functionality (Redis, database, or sync for local development)

## Development Commands

Expand Down Expand Up @@ -57,8 +58,16 @@ composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed

# Start queue worker for export functionality
php artisan queue:work
```

**Queue Configuration:**
- Export functionality requires a queue worker to be running
- For local development, you can use `QUEUE_CONNECTION=sync` in `.env`
- For production, use Redis or database queue driver with Supervisor

## Related Documentation

- **Installation:** `.github/INSTALLATION.md`
Expand Down Expand Up @@ -124,6 +133,15 @@ php artisan migrate --seed
- Reusable logic (e.g., fixtures, setup) must live in abstract test cases, not inline.
- Tests have inline comment blocks above sections (Arrange, Act, Assert).

### Export System Rules

- **Exports use Filament's asynchronous export system** which requires queue workers.
- **Export tests must use fakes:** `Queue::fake()`, `Storage::fake()`, and verify job dispatching with `Bus::assertChained()`.
- **The `exports` table is temporary** and managed by Filament for job coordination only.
- **No export history feature** - export records are ephemeral and auto-prunable.
- **Queue configuration is required** for export functionality to work in production.
- See `Modules/Core/Filament/Exporters/README.md` for export architecture details.

### Database & Models

- **No `$fillable` array in Models.**
Expand Down
Loading