Download the PHP package samushi/domion without Composer
On this page you can find all versions of the php package samushi/domion. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samushi/domion
More information about samushi/domion
Files in samushi/domion
Package domion
Short Description Domion - Professional Architecture for Laravel with Automated Frontend & Auth Integration
License MIT
Informations about the package domion
🏗️ Domion – The Ultimate DDD Starter Kit for Laravel
Welcome to Domion! 👋
Simplify your enterprise Laravel development with a robust Domain-Driven Design (DDD) architecture. Domion is not just a structure package; it is a Complete Starter Kit that gives you everything you need to launch a professional, scalable application in minutes.
Whether you're building a RESTful API, a React SPA, or a Vue.js application, Domion has you covered with pre-configured authentication, settings modules, and enterprise-grade patterns.
🚀 Why Choose Domion?
| Feature | Description |
|---|---|
| DDD Architecture | Pre-configured structure with Actions, DTOs, Repositories, and Domain separation. |
| Three Starter Modes | Choose between API, React (Inertia), or Vue (Inertia) during setup. |
| Built-in Security | Two-Factor Authentication (2FA) via Laravel Fortify with complete UI. |
| API Response Builder | Standardized JSON responses using marcin-orlowski/laravel-api-response-builder. |
| Query Filters | Powerful filtering system using samushi/query-filter integrated in Repositories. |
| Settings Module | Profile, Password, Appearance, and Account Deletion – all pre-built. |
| Multi-tenancy Ready | Full support for Stancl/Tenancy for SaaS applications. |
📦 Installation Guide
Follow these simple steps to start your journey with Domion.
Step 1: Create a Laravel Project
Start with a fresh Laravel installation.
Step 2: Install Domion
Install the package via Composer.
Step 3: Setup Your Architecture 🪄
This is where the magic happens. The interactive setup command will:
- Ask you to choose between API, React, or Vue mode
- Configure your project structure
- Install all necessary dependencies
- Scaffold core domains (Auth, Dashboard, Settings)
- Set up 2FA via Fortify (for React/Vue modes)
Step 4: Launch Your Application
For API Mode:
For React/Vue Mode:
Open your browser and explore your new application!
🎯 Starter Kit Modes
Domion supports three distinct modes, each optimized for different use cases.
1. 🔌 API Mode (Headless)
Perfect for building RESTful APIs, mobile backends, or microservices.
Features:
- No frontend UI – pure JSON API endpoints
- Standardized API responses via
laravel-api-response-builder - Token-based authentication (Laravel Sanctum)
- Clean controller structure extending
ApiControllers
API Response Example:
Error Response:
2. ⚛️ React Mode (Inertia.js)
Modern single-page application experience with React and TypeScript.
Features:
- Full React + TypeScript + Inertia.js setup
- Pre-built pages: Login, Register, Dashboard, Settings
- Shadcn-inspired UI components
- Dark/Light mode support
- Sidebar navigation layout
- Two-Factor Authentication UI
Included Pages:
/– Landing Page/login– Authentication/register– User Registration/dashboard– Protected Dashboard/settings/profile– Profile Management/settings/password– Password Update/settings/appearance– Theme Selection/settings/two-factor– 2FA Management
3. 💚 Vue Mode (Inertia.js)
Elegant single-page application with Vue 3 and TypeScript.
Features:
- Full Vue 3 + TypeScript + Inertia.js setup
- Same pre-built pages as React mode
- Component-based architecture
- Dark/Light mode support
- Responsive layouts
🏗️ Architecture Overview
Domion organizes your code into Domains. Each domain is self-contained, handling its own logic, database interactions, and frontend views (if applicable).
Directory Structure
🧱 Core Concepts
1. Actions (Business Logic)
Actions are the heart of your business logic. Each action does one thing and does it well.
Creating an Action:
Action Structure:
Calling an Action:
2. DTOs (Data Transfer Objects)
DTOs ensure type safety and clean data flow between layers.
DTO Structure:
Creating from Request:
Available Methods:
fromRequest(FormRequest $request)– Create from validated requestfromArray(array $data)– Create from arraytoArray()– Convert to arraytoCollection()– Convert to Laravel Collection
3. Repositories (Data Access Layer)
Repositories abstract database operations and integrate with Query Filters.
Repository Structure:
Available Repository Methods:
4. Query Filters (samushi/query-filter)
Domion integrates samushi/query-filter for powerful, reusable query filtering.
Creating a Filter:
Usage in Repository:
Filters are automatically applied when you call all() or paginate() if query parameters match.
Built-in Filters:
Search– Full-text search across searchable columnsOrder– Dynamic ordering (e.g.,?order_by=created_at&order_dir=desc)
5. Controllers
Controllers are thin and delegate to Actions. They extend base controllers provided by Domion.
For API Mode:
For React/Vue Mode:
Available Response Methods:
| Method | Mode | Description |
|---|---|---|
$this->success($data, $message, $code) |
API | Success JSON response |
$this->error($message, $code) |
API | Error JSON response |
$this->render($page, $props) |
Inertia | Render Inertia page |
$this->toRoute($route, $params) |
Inertia | Redirect to named route |
$this->toUrl($path) |
Inertia | Redirect to URL |
$this->back() |
Inertia | Redirect back |
🔐 Security Features
Two-Factor Authentication (2FA)
Domion integrates Laravel Fortify for 2FA. This is automatically configured during setup.
How it works:
- User navigates to Settings → Two Factor Auth
- Clicks Enable
- Scans QR Code with authenticator app
- Saves Recovery Codes
- Future logins require OTP verification
Backend: Fortify handles all 2FA logic (/user/two-factor-authentication endpoints).
Frontend: Complete React/Vue UI is provided.
API Authentication (Sanctum)
For API mode, authentication is handled via Laravel Sanctum tokens.
🛠️ CLI Commands
| Command | Description |
|---|---|
php artisan domion:setup |
Interactive project setup |
php artisan domion:make:domain {Name} |
Create a new domain |
php artisan domion:make:action {Name} |
Generate an Action class |
📦 Dependencies
Domion automatically installs these packages based on your chosen mode:
| Package | Purpose | Modes |
|---|---|---|
inertiajs/inertia-laravel |
SPA bridge | React, Vue |
laravel/fortify |
2FA & Security | React, Vue |
laravel/sanctum |
API Authentication | All |
marcin-orlowski/laravel-api-response-builder |
Standardized API responses | API |
samushi/query-filter |
Query filtering | All |
🏢 Multi-tenancy Support
Domion supports multi-tenant applications via stancl/tenancy.
When enabled, domains are organized into:
- Central Domains: Shared across all tenants (e.g., Billing, Admin)
- Tenant Domains: Isolated per tenant (e.g., Projects, Orders)
🤝 Contributing
We welcome contributions! Please fork the repository and submit a pull request.
📄 License
The MIT License (MIT). Please see License File for more information.
Created with ❤️ by Sami Maxhuni
All versions of domion with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
samushi/queryfilter Version ^2.2
marcin-orlowski/laravel-api-response-builder Version ^10.0|^11.0|^12.0
laravel/prompts Version ^0.1|^0.2|^0.3