Twist Framework Overview
Twist is the powerful addon framework that powers the Obelaw ecosystem. It provides a standardized way to create, manage, and distribute business modules and extensions.
What is Twist?
Twist is our custom-built framework that sits on top of Laravel and Filament, providing:
- Modular Architecture: Build applications as collections of focused addons
- Hot-swappable Components: Enable/disable features without touching core code
- Standardized APIs: Consistent interfaces across all business modules
- Migration Management: Database versioning across multiple addons
- Dependency Resolution: Automatic handling of addon dependencies
Core Concepts
Addons
Addons are self-contained modules that provide specific business functionality:
// Example addon structure
app/
├── Addons/
│ ├── Accounting/
│ │ ├── Models/
│ │ ├── Filament/
│ │ ├── Providers/
│ │ └── Migrations/
│ └── Inventory/
│ ├── Models/
│ ├── Filament/
│ ├── Providers/
│ └── Migrations/Providers
Each addon registers itself through a service provider:
class AccountingAddonProvider extends TwistAddonProvider
{
public function register()
{
$this->loadMigrationsFrom(__DIR__ . '/Migrations');
$this->loadViewsFrom(__DIR__ . '/Views', 'accounting');
}
public function getAddonName(): string
{
return 'Accounting';
}
}Clusters
Twist uses Filament clusters to organize admin interfaces:
use Obelaw\Twist\Filament\Clusters\TwistCluster;
class AccountingCluster extends TwistCluster
{
protected static ?string $navigationLabel = 'Accounting';
protected static ?string $navigationIcon = 'heroicon-o-calculator';
}Architecture Benefits
🔧 Modularity
Build complex applications by combining focused, single-responsibility addons.
🚀 Scalability
Add new features without modifying existing code or affecting other modules.
🔄 Maintainability
Each addon is independently testable, updatable, and deployable.
🎯 Flexibility
Mix and match addons to create custom business solutions.
Getting Started with Twist
- Create Your First Addon - Learn to build custom business modules
- Migration System - Manage database changes across addons
- ERP Integration - See Twist in action with our ERP modules
Built-in Addons
Obelaw comes with several production-ready addons:
| Addon | Purpose | Documentation |
|---|---|---|
| Accounting | Financial management | View docs |
| Sales | Customer & order management | View docs |
| Purchasing | Vendor & procurement | View docs |
| Warehouse | Inventory & logistics | View docs |
| Catalog | Product management | View docs |
| Contacts | Relationship management | View docs |
Next Steps
Ready to start building with Twist? Check out our guides:
- Creating Addons - Build your first custom addon
- Migration System - Handle database changes
- ERP Examples - Learn from existing implementations