Interactive Laravel code generator with support for DDD, Clean Architecture, and Docker infrastructure. > Written in Rust — runs via terminal and via graphical panel (Tauri). No external dependencies.
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************************************************
**********************************-:. .:-***************************
******************************- ==++=:****************
***************************. -*****************
***********************+: =*******== +******************
*******************+- =**************: +********************
******************= +****=. .=*****=.**********************
******************** .****+*. -**************************
******************** -******: =** **************************
******************** -*****: **-+**** :*********************
******************** -****. : *: *:*** : :******************
******************** -**= =. **=**** =**** -****************
******************** -*= :+=***** +******* :***************
***#*#************** -* ****+ +*********:***************
##****#************* -# = +- ****************************
*#***##************* -# =**#=* :.***************************
#########*#********* -# .- - .---#****************************
#######*#*#********* .* = **.=*****************************
###########********* +* .* +********* ********************
############**#****- +#- + *********+ -*******************
#############***##*. ***.* ********* -*****************
*********#####*####**+. :********: =*******************
################********** .=*********************
############*##*####********+ ************************
###############*##*##***#*******+ +***************************
##################*##*************************************************
##################*#**************************************************
#####################***#*#*******************************************
#####################*************************************************
######################*#*#********************************************
########################**********************************************
╔══════════════════════════════════════╗
║ ║
║ CARONTE ║
║ code generator ║
║ ║
╚══════════════════════════════════════╝
- Overview
- Project Structure
- Main Menu
- Flow — DDD Context
- Flow — Complete DDD Scaffolds
- Flow — MVCS Scaffolds
- Flow — Docker Infra
- Flow — Landing Page
- Flow — Standalone Generators (MVCS)
- Generators in Detail
- Graphical Panel — caronte Manager
- Installation and Usage
- Changelog
- License
The caronte tool generates complete scaffolding for Laravel projects. It supports two architectural patterns:
- DDD + Clean Architecture — Bounded Contexts with Application / Domain / Infra layers
- MVCS — Native Laravel pattern (
App\Models·App\Services·App\Http\Controllers)
Each generator asks interactive questions and saves the files directly to the absolute path provided by the user — never inside the caronte project itself.
| Mode | How to run |
|---|---|
| Interactive CLI | caronte in the terminal |
| Desktop Panel | tauri dev (dev) or caronte-manager binary (prod) |
13 available generators:
| # | Generator | Pattern | What it delivers |
|---|---|---|---|
| 1 | DDD Context | DDD | Complete bounded context (Application + Domain + Infra) |
| 2 | Claims Reverse Logistics | DDD | 7 Contexts + 10 Migrations + 10 Models + Manager JSON |
| 3 | Inventory ERP | DDD | 6 Contexts + Kardex + UseCases + Manager JSON |
| 4 | Inventory ERP | MVCS | Models + Services + Controllers + Migrations + Routes |
| 5 | Reverse Logistics ERP | MVCS | Models + Services + Controllers + Migrations + Routes |
| 6 | Docker Infra | — | Dev/prod Dockerfile + compose + Nginx + Makefile |
| 7 | Landing Page | — | HTML + Tailwind + DaisyUI (generic or SaaS) |
| 8 | Model | MVCS | Optional Eloquent Model + Migration + Service + Controller |
| 9 | Controller | MVCS | Resource with Service injection or plain |
| 10 | Service | MVCS | Service with CRUD delegating actions to the Model |
| 11 | Migration | — | Schema::create with correct Laravel timestamp formatting |
| 12 | POS | — | Point of Sale Scaffold |
caronte-laravel/
├── src/
│ ├── main.rs ← CLI: interactive menu + ASCII logo
│ ├── cli.rs ← Shared argument structs
│ └── flows/
│ ├── deps.rs ← copy_laravel_base + verify_all
│ ├── context/ ← DDD Context Generator
│ ├── docker/ ← Docker Infra Generator
│ ├── estoque/ ← Inventory ERP Scaffold (DDD)
│ ├── erp_estoque/ ← Inventory ERP Scaffold (MVCS)
│ ├── erp_logistica/ ← Reverse Logistics ERP Scaffold (MVCS)
│ ├── logistica_reversa/ ← Reverse Logistics Scaffold (DDD)
│ ├── landing_page/ ← Landing Page Generator (generic + saas)
│ ├── pdv/ ← POS Scaffold
│ └── artesanal/
│ ├── controller/ ← Controller Generator (+ optional Service)
│ ├── model/ ← Model Generator (+ optional Service + Controller)
│ ├── service/ ← Service Generator
│ └── migration/ ← Migration Generator (real Laravel timestamp)
├── laravel-base/ ← Laravel 13 Template (without vendor/)
│ ├── app/ · bootstrap/ · config/ · database/ · routes/ · resources/
│ └── composer.json ← laravel/framework ^13.x
├── manager/ ← Tauri Crate (desktop panel)
│ ├── src/
│ │ ├── lib.rs ← Tauri app builder
│ │ └── commands.rs ← Bridge: frontend → Rust generators
│ └── tauri.conf.json
├── frontend-installer/ ← Vite SPA + TypeScript + Tailwind + DaisyUI
│ ├── index.html ← Drawer layout (sidebar + main)
│ └── src/main.ts ← Pages and handlers for the generators
├── Cargo.toml ← Workspace (caronte-laravel + manager)
├── install.sh ← Installs caronte in /usr/local/bin
└── install.ps1 ← Installs caronte in %USERPROFILE%\.cargo\bin
flowchart TD
START([▶ caronte]) --> LOGO[Displays ASCII Logo\nCaronte · Laravel]
LOGO --> MENU{Select the generator}
MENU --> G1[DDD Context]
MENU --> G2[Reverse Logistics — DDD]
MENU --> G3[Inventory ERP — DDD]
MENU --> G4[Inventory ERP — MVCS]
MENU --> G5[Reverse Logistics ERP — MVCS]
MENU --> G6[Docker Infra]
MENU --> G7[Landing Page]
MENU --> G8[Model]
MENU --> G9[Controller]
MENU --> G10[Service]
MENU --> G11[Migration]
MENU --> G12[POS]
MENU --> EXIT([Exit])
G1 --> CTX([→ DDD Context])
G2 & G3 --> DDD([→ DDD Scaffolds])
G4 & G5 --> MVCS([→ MVCS Scaffolds])
G6 --> DOC([→ Docker])
G7 --> LP([→ Landing Page])
G8 & G9 & G10 & G11 --> ART([→ Standalone Generators])
flowchart TD
IN([DDD Context Generator]) --> W0[Absolute path of the Laravel project]
W0 --> W1[Context Name\ne.g., Product → auto PascalCase]
W1 --> W2[Route prefix — auto-suggested kebab-case]
W2 --> W3[Base directory for Contexts\ndefault: app/Contexts]
W3 --> W4[PHP base namespace\ne.g., App\\\\Contexts]
W4 --> W5{Generate Domain Entity?}
W5 --> W6{Generate Authorizations?}
W6 --> W7[MultiSelect operations\nindex · show · store · update · destroy\nall checked by default]
W7 --> APP & DOM & INF
subgraph APP [Application Layer]
A1[Input DTOs — readonly class]
A2[Output DTOs — simple and paginated]
A3[Queries — GET index / show]
A4[UseCases — POST store · PUT update · DELETE destroy]
A5[Errors · Exceptions]
end
subgraph DOM [Domain Layer]
D4[Entity — ::create and ::update]
D5[Status Enums]
D6[Authorizations — if selected]
end
subgraph INF [Infra Layer]
I1[Eloquent Model]
I2[Repository]
I3[Controller + FormRequests]
I4[Routes · ServiceProvider]
end
APP & DOM & INF --> OK([✅ Context generated\nRegister the provider in bootstrap/providers.php])
flowchart TD
subgraph LOG [Claims Reverse Logistics — DDD]
L1[paths · namespace · ERP ID\ncompany · warehouse] --> L2[Absolute path of the project]
L2 --> LB[laravel-base copied → project_root]
LB --> LA[7 DDD Contexts\nInsuranceCompany · Carrier · Insured\nPolicy · Claim · CollectionOrder · SortingReport]
LB --> LC[10 Migrations ordered by FK]
LB --> LD[10 Eloquent Models cross-context]
LB --> LE[Manager JSON — SLA · Webhooks · Intelipost]
LA & LC & LD & LE --> LOK([✅ Logistics DDD generated])
end
subgraph EST [Inventory ERP — DDD]
E1[paths · namespace · costing method] --> E2[Absolute path of the project]
E2 --> EB[laravel-base copied → project_root]
EB --> EA[6 DDD Contexts\nWarehouse · Supplier · Product\nPurchaseOrder · StockMovement · Inventory]
EB --> EC[10 Migrations + 4 sub-entities]
EB --> ED[Immutable Kardex UseCases + CloseInventory]
EB --> EE[Manager JSON — FIFO · Average Cost]
EA & EC & ED & EE --> EOK([✅ Inventory ERP DDD generated])
end
flowchart TD
subgraph MVES [Inventory ERP — MVCS]
ME1[Absolute path of the project] --> ME2[laravel-base copied]
ME2 --> ME3[10 Migrations]
ME2 --> ME4[10 Models — App\\Models\nWarehouse · Supplier · Product · Batch\nPurchaseOrder · PurchaseOrderItem\nStockMovement · Inventory · InventoryCount · StockPosition]
ME2 --> ME5[6 Services — App\\Services\nWarehouse · Supplier · Product · PurchaseOrder\nStockMovement with Kardex · Inventory]
ME2 --> ME6[6 Controllers — App\\Http\\Controllers\\Estoque\ninline validation · JsonResponse]
ME2 --> ME7[routes/api_erp_estoque.php\napiResource + Kardex routes without PUT/DELETE]
ME3 & ME4 & ME5 & ME6 & ME7 --> MEOK([✅ Inventory ERP MVCS])
end
subgraph MVLOG [Reverse Logistics ERP — MVCS]
ML1[Absolute path of the project] --> ML2[laravel-base copied]
ML2 --> ML3[10 Migrations]
ML2 --> ML4[10 Models — App\\Models\nInsuranceCompany · Carrier · Insured · Policy\nClaim · ClaimedItem · CollectionOrder\nLogisticsMovement · WhReceipt · SortingReport]
ML2 --> ML5[7 Services — App\\Services\nCollectionOrderService with registerMovement]
ML2 --> ML6[7 Controllers — App\\Http\\Controllers\\Logistica\ninline validation + tracking route]
ML2 --> ML7["routes/api_erp_logistica.php<br/>apiResource + POST collection-orders/{id}/movements"]
ML3 & ML4 & ML5 & ML6 & ML7 --> MLOK([✅ Logistics ERP MVCS])
end
MEOK & MLOK --> NEXT[Next steps:\ncomposer install\nphp artisan migrate]
flowchart TD
IN([Docker Generator]) --> W1[Application Name]
W1 --> W2[Output path — Laravel project root]
W2 --> W3[Nginx server_name\ne.g., localhost or app.local]
W3 --> W4[PHP Version — 8.3 · 8.2 · 8.1]
W4 --> W5[Node Version — 22 LTS · 20 LTS]
W5 --> W6[MultiSelect: databases\nMySQL · MariaDB · PostgreSQL · SQL Server · SQLite]
W6 --> W7{Redis?}
W7 --> W8{Mailpit?}
W8 --> DEV[Dockerfile.dev\nPHP-fpm + Xdebug + Composer + Node + 30 extensions]
W8 --> PROD[Dockerfile.prod\nMulti-stage: composer → node → runtime]
W8 --> COMPOSE[docker-compose.dev.yml\ndocker-compose.prod.yml]
W8 --> CONF[php-dev.ini · php-prod.ini · xdebug.ini · www.conf\nnginx.conf · default.conf · my.cnf · supervisord.conf]
W8 --> EXTRA[.dockerignore · .env.example\nMakefile — up / down / build / shell / artisan / migrate]
DEV & PROD & COMPOSE & CONF & EXTRA --> OK([✅ Docker Infra generated])
flowchart TD
IN([Landing Page Generator]) --> L1{Base Layout}
L1 -- Generic DaisyUI --> GEN[product · tagline · company]
L1 -- SaaS Contabilizei-style --> SAAS[product · tagline · company]
GEN --> GT[DaisyUI Theme\nlight · dark · corporate · lofi · business\ncupcake · cyberpunk · forest · luxury · night]
GT --> GS[MultiSelect sections\nlogos · features_grid · features_tabs · stats\ntestimonials · pricing · faq · cta_bottom]
SAAS --> SS[MultiSelect sections\nsocial_proof · comparison_table · journey_selector\nbenefits_slider · content_grid · testimonials_photo · faq]
GS --> OUT[Absolute output path\ne.g., /home/user/projects/my-landing]
SS --> OUT
OUT --> IDX[index.html — complete page assembled]
OUT --> NAV[sections/navbar/index.html]
OUT --> HERO[sections/hero/index.html]
OUT --> SEC[sections/section_name/index.html\nfor each selected section]
OUT --> FOOT[sections/footer/index.html]
IDX & NAV & HERO & SEC & FOOT --> OK([✅ Landing Page generated])
flowchart TD
subgraph MOD [Model]
M0[Project path] --> M1[Name — e.g., Product]
M1 --> M2{+ Migration?}
M2 --> M3{+ Service — MVCS?}
M3 --> M4{+ Controller?}
M4 --> MA[app/Models/Product.php]
M4 --> MB[database/migrations/YYYY_MM_DD_HHMMSS_create_products_table.php]
M4 --> MS[app/Services/ProductService.php\nindex · show · store · update · destroy]
M4 --> MC[app/Http/Controllers/ProductController.php\ninjects ProductService into constructor]
MA & MB & MS & MC --> MOK([✅ Model generated])
end
subgraph CTRL [Controller]
C0[Project path] --> C1[Name — e.g., ProductController]
C1 --> C2{Generate Service along — MVCS?}
C2 -- yes --> CS[app/Services/ProductService.php\n+ Controller with injection]
C2 -- no --> CA[Standard Laravel resource controller]
CS & CA --> COK([✅ Controller generated])
end
subgraph SVC [Service]
S0[Project path] --> S1[Name — e.g., Product]
S1 --> S2[Model to inject\nauto: same name]
S2 --> SA[app/Services/ProductService.php]
SA --> SOK([✅ Service generated])
end
subgraph MIG [Migration]
G0[Project path] --> G1[Name — e.g., create_products_table]
G1 --> G2[Table — auto-inferred from name]
G2 --> GA[database/migrations/YYYY_MM_DD_HHMMSS_name.php\nreal Laravel timestamp · declare strict]
GA --> GOK([✅ Migration generated])
end
| Layer | What it generates |
|---|---|
| Application | Input DTOs (readonly class) · Output DTOs (simple and paginated) · Queries (GET) · UseCases (POST/PUT/DELETE) · Errors · Exceptions |
| Domain | Entity (with ::create() / ::update()) · Enums · Authorizations |
| Infra | Eloquent Model · Repository · Controller · FormRequests · Routes · ServiceProvider |
- 7 DDD Contexts — InsuranceCompany, Carrier, Insured, Policy, Claim, CollectionOrder, SortingReport
- 3 sub-entities — ClaimedItem, LogisticsMovement, WhReceipt
- 10 Migrations ordered by FK sequence with
declare(strict_types=1), indices, and comments - 10 Eloquent Models with cross-context relationships using FQN
- Manager JSON — SLA, webhooks with
exponential_backoff, Intelipost Reverse integration
-
6 DDD Contexts — Warehouse, Supplier, Product, PurchaseOrder, StockMovement (Immutable Kardex — no PUT/DELETE), Inventory
-
4 sub-entities — StockPosition, Batch, PurchaseOrderItem, InventoryCount
-
Special UseCases:
-
RegisterMovementUseCase— calculatesbalance_after_movement, blocks negative stock -
CloseInventoryUseCase— automatically createsgain_adjustment/loss_adjustmententries in Kardex -
10 Migrations with
decimal(12,3)column types to support KG/Liters -
Manager JSON — FIFO / Average Costing, expiration alerts, automated replenishment triggers
Flat namespace structure App\Models / App\Services / App\Http\Controllers\Estoque:
| Layer | Files |
|---|---|
| Models | Warehouse, Supplier, Product, Batch, PurchaseOrder, PurchaseOrderItem, StockMovement, Inventory, InventoryCount, StockPosition |
| Services | WarehouseService, SupplierService, ProductService, PurchaseOrderService, StockMovementService (Kardex with register() + transaction-safe balance calculation), InventoryService |
| Controllers | 6 controllers with inline validation — Kardex handles no PUT/DELETE requests |
| Routes | routes/api_erp_estoque.php — apiResource + manual Kardex routes |
Flat namespace structure App\Models / App\Services / App\Http\Controllers\Logistica:
| Layer | Files |
|---|---|
| Models | InsuranceCompany, Carrier, Insured, Policy, Claim, ClaimedItem, CollectionOrder, LogisticsMovement, WhReceipt, SortingReport |
| Services | 7 services — CollectionOrderService with registerMovement() for real-time tracking updates |
| Controllers | 7 controllers with inline validation + extra POST /collection-orders/{id}/movements route |
| Routes | routes/api_erp_logistica.php |
| File | Description |
|---|---|
Dockerfile.dev |
PHP 8.3-fpm, +30 extensions, Xdebug, Composer, Node.js |
Dockerfile.prod |
Multi-stage: composer-deps → node-assets → optimized production runtime |
docker-compose.dev.yml |
App + Nginx + DBs + Redis + Mailpit complete with healthchecks |
docker-compose.prod.yml |
App + Horizon worker, stripped of devtools |
docker/php/php-dev.ini |
Visible errors, OPcache disabled for debugging |
docker/php/php-prod.ini |
Aggressive OPcache tuning + JIT tracing enabled |
docker/php/xdebug.ini |
Configured for develop/debug/coverage modes on port 9003 |
docker/php/www.conf |
PHP-FPM pool sizing: pm=dynamic, max_children=50 |
docker/nginx/nginx.conf |
Worker configs, gzip compression, and security headers |
docker/nginx/default.conf |
Laravel server block configuration including healthchecks |
docker/mysql/my.cnf |
utf8mb4 support, InnoDB fine-tuning, slow query logging |
docker/supervisor/supervisord.prod.conf |
Monitored processes: Nginx + PHP-FPM + 2 queue workers |
.dockerignore |
Excludes vendor, node_modules, .env, and local test files |
.env.example |
Pre-configured to point to the selected database and stack services |
Makefile |
Shortcuts for make up/down/build/shell/artisan/migrate/test/prod-* |
Supported Databases: MySQL 8.4 · MariaDB 11.4 · PostgreSQL 17 · SQL Server 2022 · SQLite
Two available layouts — each section managed within its own directory:
Generic (DaisyUI) — 10 selectable themes:
logos · features_grid · features_tabs · stats · testimonials · pricing · faq · cta_bottom
SaaS (Contabilizei-style) — minimalist white & green design:
social_proof · comparison_table · journey_selector · benefits_slider · content_grid · testimonials_photo · faq
Output directory structure:
my-landing/
index.html
sections/
navbar/index.html
hero/index.html
features_grid/index.html
pricing/index.html
footer/index.html
...
Desktop interface built using Tauri v2 + Vite + TypeScript + Tailwind CSS + DaisyUI.
manager/ ← Rust crate (Tauri backend)
frontend-installer/ ← 9-page SPA UI, one per generator tool
To run the application in development mode:
cd manager
tauri dev
# The Vite frontend starts automatically at http://localhost:1420
To build for production:
cd manager
tauri build
# Compile and install globally to /usr/local/bin
./install.sh --build
# Run the generator
caronte
# Or run directly without prior installation
cargo run
./install.sh --uninstall
rustup target add x86_64-unknown-linux-musl
RUSTFLAGS="-C target-feature=+crt-static" \
cargo build --release --target x86_64-unknown-linux-musl
-
New flows: Inventory ERP (MVCS) and Reverse Logistics ERP (MVCS)
-
Generate files inside standard
App\Models/App\Services/App\Http\Controllersdirectories -
Reuse the database migrations schema from the DDD flows
-
Kardex in MVCS implementation:
StockMovementService::register()handles balances within clean DB transactions -
Tracking in MVCS implementation:
CollectionOrderService::registerMovement()handles instant real-time events + custom route -
Split up application endpoints into dedicated
routes/api_erp_estoque.phpandroutes/api_erp_logistica.phpfiles -
New standalone generator:
Create Service— provisions an isolatedApp\Services\{Name}Serviceclass -
Create Controller — added a new option "Generate Service along (MVCS)?" (default: yes)
-
When enabled, controllers auto-inject the matching
{Name}Service, delegate operations, and return standardizedJsonResponseschemas -
Create Model — added a new option "Generate Service?" (default: yes); cascades
service=trueflags down to the controller step -
Migration — fixed the output timestamp format to match native Laravel
YYYY_MM_DD_HHMMSSstructures (migrated away from Unix epochs) -
DDD Context — removed repetitive automated dependency checks and auto-docker configurations; the wizard now prompts for path details up front
laravel-base/template added straight to the workspace: a clean boilerplate tracking Laravel 13 features without heavyvendor/assets (composer.jsontrackinglaravel/framework ^13.x)deps::copy_laravel_base(dest)— safely duplicates the core template layer into the destination folder structure prior to writing generation data; completely idempotent (automatically skips if a localcomposer.jsonalready exists)- Replaced classic
verify_all()sweeps with targetedcopy_laravel_base()operations inside the Inventory ERP (DDD), Reverse Logistics (DDD), and POS modules - Users run their own manual
composer installtasks following generation steps
flows/deps— added environment sanity verification checks and automated installations for local environments running PHP 8.3, Composer, and PostgreSQL instances- Docker auto-scaffold layer baked right into Context, Inventory, Logistics, and POS generation execution flows
- Fixed the Windows compatibility runner method
install_composer_via_php_windows(): accurately returns aboolflag, links active PHP binaries directly into system PATH scopes, and writes clear.batoperational wrapper logic consistently
- Core modules shipped: DDD Context, Reverse Logistics, Inventory ERP, Docker Infra setup, Landing Page components, Model, Controller, Migration, and standalone POS scaffolding routines
MIT License — Copyright (c) 2026 Caronte