Content
# Laravel Domo
<div align="center">
[](https://packagist.org/packages/jemgdevp/laravel-domo)
[](https://packagist.org/packages/jemgdevp/laravel-domo)
[](https://github.com/jemgdevp/laravel-domo/actions)
[](https://phpstan.org/)
[](https://laravel.com)
</div>
## 🚀 Overview
**Laravel Domo** is an all-in-one database engineering suite for Laravel (v11+). It bridges the gap between raw SQL, Eloquent models, and AI-driven architecture.
### ✨ Features
- **🌐 Web Dashboard** - Rich visual interface, auto-mounted at `/domo` in your local environment
- **💻 Terminal UI** - Powerful TUI for command-line workflow (`domo:tui`)
- **🤖 AI Architect** - AI-powered Eloquent ORM analysis and suggestions
- **🔌 MCP Integration** - Model Context Protocol for AI agent connectivity
- **📊 Schema Analyzer** - Intelligent database schema inspection
- **🔄 Migration Management** - Visual migration generation and preview
- **📦 Portability** - Import/Export SQL dumps and migrations
## 📦 Installation
Install the package via Composer:
```bash
composer require --dev jemgdevp/laravel-domo
```
### Configuration
Publish the configuration file:
```bash
php artisan vendor:publish --tag=domo-config
```
### Environment Setup
Add your API keys to `.env`:
```env
# AI Driver Configuration — default provider is "opencode"
DOMO_AI_DRIVER=opencode
DOMO_OPENCODE_API_KEY=your-api-key
DOMO_OPENCODE_BASE_URL=https://opencode.ai/zen/go/v1/
DOMO_OPENCODE_MODEL=deepseek-v4-pro
# Or use OpenAI
# DOMO_AI_DRIVER=openai
# OPENAI_API_KEY=your-api-key
# Or use Anthropic
# DOMO_AI_DRIVER=anthropic
# ANTHROPIC_API_KEY=your-api-key
# MCP Server
DOMO_MCP_ENABLED=true
DOMO_MCP_PORT=3000
# Dashboard
DOMO_DASHBOARD_ENABLED=true
DOMO_DASHBOARD_PORT=8080
```
## 🎯 Usage
### Web Dashboard
The dashboard mounts itself automatically — **no command required**. In your
**local** environment, just visit the `domo` route on your running app:
```
http://localhost:8000/domo # or whatever host/port your app uses
```
It is a local development tool: like Telescope, its routes are only registered
in the environments listed under `dashboard.environments` (default: `['local']`),
so it is **never exposed in production**.
**Optional — dedicated server.** To run the dashboard on its own port without
booting your whole app, the bundled command still works:
```bash
php artisan domo:serve --open
php artisan domo:serve --host=0.0.0.0 --port=3000 --open
```
### Terminal UI
Launch the TUI:
```bash
php artisan domo:tui
```
**Options:**
```bash
php artisan domo:tui --no-colors --simple
```
Note: the rich TUI is supported on Linux/macOS terminals. Windows is not supported by the current PHP-TUI backend.
### MCP Server
Enable MCP server for AI agent integration:
```env
DOMO_MCP_ENABLED=true
DOMO_MCP_PORT=3000
DOMO_MCP_HOST=127.0.0.1
```
### AI Configuration
The default provider is **`opencode`** (an OpenAI-compatible endpoint). You can
switch the global default with `DOMO_AI_DRIVER`, or pick the provider/model
**per analysis** from the dashboard's AI page.
```env
# Default: opencode (OpenAI-compatible)
DOMO_AI_DRIVER=opencode
DOMO_OPENCODE_API_KEY=your-api-key
DOMO_OPENCODE_BASE_URL=https://opencode.ai/zen/go/v1/
DOMO_OPENCODE_MODEL=deepseek-v4-pro
# Or OpenAI
# DOMO_AI_DRIVER=openai
# OPENAI_API_KEY=your-api-key
# Or Anthropic
# DOMO_AI_DRIVER=anthropic
# ANTHROPIC_API_KEY=your-api-key
```
> Any OpenAI-compatible service (Groq, OpenRouter, Ollama, DeepSeek, ...) works:
> add a provider in `config/domo.php` with a `base_url` and select it from the
> AI analysis page.
### Available Commands
| Command | Description |
|---------|-------------|
| `php artisan domo:serve` | Run the dashboard on a dedicated server (optional; it auto-mounts at `/domo` in local) |
| `php artisan domo:tui` | Launch terminal UI |
| `php artisan vendor:publish --tag=domo-config` | Publish config |
### Configuration
Edit `config/domo.php`:
```php
return [
'ai_driver' => 'opencode', // openai | anthropic | opencode | your own
'mcp' => [
'enabled' => true,
'port' => 3000,
'host' => '127.0.0.1',
],
'dashboard' => [
'enabled' => true,
'environments' => ['local'], // environments where the dashboard auto-registers
'route' => 'domo',
'host' => '127.0.0.1',
'port' => 8080,
'middleware' => ['web'],
],
'tui' => [
'enabled' => true,
'theme' => 'default',
'colors' => true,
],
'database' => [
'connection' => config('database.default'),
'tables' => [
'exclude' => 'migrations,failed_jobs',
],
],
];
```
## 📚 Documentation
Full documentation is available at [https://jemgdevp.github.io/laravel-domo](https://jemgdevp.github.io/laravel-domo)
### Additional Resources
- [Quick Start Guide](QUICKSTART.md)
- [Project Structure](STRUCTURE.md)
- [Contributing Guide](CONTRIBUTING.md)
- [Security Policy](SECURITY.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)
## 🧪 Testing
```bash
composer test
```
## 🛡️ Security
If you discover any security related issues, please email murksopps@gmail.com instead of using the issue tracker.
## 📊 Requirements
- PHP 8.2+
- Laravel 11.x or 12.x
- Database: MySQL, PostgreSQL, SQLite, or SQL Server
## ❓ FAQ
**Q: Is this package production-ready?**
A: Laravel Domo is designed for development environments. Install as dev dependency: `composer require --dev jemgdevp/laravel-domo`
**Q: Which AI providers are supported?**
A: OpenAI, Anthropic, and **opencode** (the default) out of the box, plus any
OpenAI-compatible service (Groq, OpenRouter, Ollama, DeepSeek, ...) you add under
`providers` in `config/domo.php`. You can also choose the provider and model
**per analysis** from the dashboard's AI page.
**Q: Can I use this with SQLite?**
A: Yes! Laravel Domo supports MySQL, PostgreSQL, SQLite, and SQL Server.
**Q: How do I customize the dashboard route?**
A: Edit `config/domo.php` and change the `dashboard.route` value.
## 🤝 Contributing
See our [Contributing Guide](CONTRIBUTING.md) for details.
## 📄 License
Laravel Domo is open-sourced software licensed under the [MIT license](LICENSE.md).
## 🙏 Acknowledgments
- [Laravel](https://laravel.com) - The PHP Framework for Web Artisans
- [TestBench](https://github.com/orchestral/testbench) - Laravel testing helper
- [Anthropic](https://anthropic.com) - AI provider
- [OpenAI](https://openai.com) - AI provider
<div align="center">
**Made with ❤️ by [jemgdevp](https://github.com/jemgdevp)**
</div>