> Source: https://laravilt.com/docs/getting-started/architecture

# Architecture

Laravilt uses a modular, layered architecture.

## Package Layers

```
┌─────────────────────────────────────┐
│          LARAVILT (Meta)            │
├─────────────────────────────────────┤
│  AI  │  Plugins  │  Auth            │  ← Advanced
├─────────────────────────────────────┤
│              Panel                  │  ← Integration
├─────────────────────────────────────┤
│  Forms │ Tables │ Infolists │Widgets│  ← Core 2
├─────────────────────────────────────┤
│ Schemas │ Query-Builder │ Actions   │  ← Core 1
├─────────────────────────────────────┤
│              Support                │  ← Foundation
└─────────────────────────────────────┘
```

## Core Concepts

### Panels

Self-contained admin interfaces:

```php
$panel
    ->id('admin')
    ->path('admin')
    ->login()
    ->discoverResources(in: app_path('Laravilt/Admin/Resources'));
```

### Resources

CRUD entities with forms, tables, and actions:

```php
class UserResource extends Resource
{
    protected static string $model = User::class;

    public static function form(Schema $form): Schema { }
    public static function table(Table $table): Table { }
}
```

### Components

All UI elements use fluent builder pattern:

```php
TextInput::make('email')
    ->email()
    ->required()
    ->maxLength(255);
```

## Data Flow

```
HTTP Request
    ↓
Laravel Router → Panel Middleware → Controller
    ↓
Inertia Response (JSON props)
    ↓
Vue Component (renders UI)
```

## Frontend Stack

- **Inertia.js v2** - Laravel + Vue integration
- **Vue 3** - Reactive UI framework
- **shadcn/ui** - UI component library
- **Tailwind CSS** - Utility-first styling

## Next Steps

- [Data Flow](https://github.com/laravilt/laravilt/blob/HEAD/docs/getting-started/data-flow) - How data flows through the system
- [Packages](https://github.com/laravilt/laravilt/blob/HEAD/docs/getting-started/packages) - Package details
- [Panel](https://github.com/laravilt/laravilt/blob/HEAD/docs/panel/introduction) - Panel configuration
- [Support](https://github.com/laravilt/laravilt/blob/HEAD/docs/support/introduction) - Base utilities
