Skip to content

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:

php
// Example addon structure
app/
├── Addons/
│   ├── Accounting/
│   │   ├── Models/
│   │   ├── Filament/
│   │   ├── Providers/
│   │   └── Migrations/
│   └── Inventory/
│       ├── Models/
│       ├── Filament/
│       ├── Providers/
│       └── Migrations/

Providers ​

Each addon registers itself through a service provider:

php
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:

php
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 ​

  1. Create Your First Addon - Learn to build custom business modules
  2. Migration System - Manage database changes across addons
  3. ERP Integration - See Twist in action with our ERP modules

Built-in Addons ​

Obelaw comes with several production-ready addons:

AddonPurposeDocumentation
AccountingFinancial managementView docs
SalesCustomer & order managementView docs
PurchasingVendor & procurementView docs
WarehouseInventory & logisticsView docs
CatalogProduct managementView docs
ContactsRelationship managementView docs

Next Steps ​

Ready to start building with Twist? Check out our guides:

Released under the MIT License.