Skip to main content

Real-World Scenario

You’re building a client portal for a marketing agency. Each client (team) needs to:
  • View their projects and campaigns
  • See invoices and make payments
  • Access reports and analytics
  • Communicate with the agency team
  • Upload and download files
This is a complete, production-ready example showing how everything works together.

The Business Model

Agency Structure:
  • Agency staff use the admin panel to manage all clients
  • Each client gets their own team/workspace
  • Clients can invite their own team members
  • Each team is billed separately (subscription per client)
What Clients Get:
  • Dedicated workspace for their company
  • All their projects, files, and reports in one place
  • Team collaboration (invite colleagues)
  • Secure client portal experience

Database Structure

1. Projects Table

Each client has projects (campaigns, websites, etc.):

2. Invoices Table

Track billing for each client:

3. Reports Table

Monthly performance reports for clients:

4. Files Table

Document storage for each client:

Complete Model Implementation

Project Model with Business Logic

Invoice Model with Payment Tracking

Filament Resources

Project Resource (Client View)

Invoice Resource (Client View)

Dashboard Widgets

Client Dashboard Widget

Why This Example is Better

Real Business Logic

  • ✅ Overdue detection for projects and invoices
  • ✅ Automatic invoice numbering
  • ✅ Payment tracking
  • ✅ Status color coding
  • ✅ Client-specific permissions

Complete Data Model

  • ✅ Projects, Invoices, Reports, Files
  • ✅ Proper relationships
  • ✅ Indexed for performance
  • ✅ Cascade deletes handled

Production-Ready Features

  • ✅ Client can’t create/edit projects or invoices
  • ✅ Payment integration hooks
  • ✅ PDF download functionality
  • ✅ File categorization
  • ✅ Date-based filtering

UX Considerations

  • ✅ Visual indicators for overdue items
  • ✅ Quick actions (Pay, Download)
  • ✅ Search and filters
  • ✅ Responsive dashboard
  • ✅ Clear navigation

Next Steps