Installation
Requirements
- PHP 8.3+
- Composer
- SQLite (dev) / PostgreSQL / MySQL / MariaDB (production)
- Redis (optional — cache and queues)
- FrankenPHP (optional — recommended for production)
Create a new project
composer create-project rbaezc/hexagen-app my-app
cd my-appThis installs the application skeleton: your config/, public/, src/Slices/ and a welcome page. The framework goes in vendor/, so composer update brings new releases.
Adding it to an existing project
composer require rbaezc/hexagenphp-frameworkThen copy config/, public/index.php and .env.example from the skeleton, and map HexaGen\ to src/ in your composer.json autoload so your slices load.
Configure environment
create-project copies .env.example to .env and fills APP_KEY and JWT_SECRET with random values. Open .env to change the rest:
APP_NAME=MyApp
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost:8000
DB_DRIVER=sqlite
DB_DATABASE=database/hexagen # creates database/hexagen.sqliteAPP_KEY signs queue and cache payloads and encrypts encrypted model attributes. To generate a new one:
php -r "echo bin2hex(random_bytes(32));"Run migrations
php hexaphp migrateThe database file is created automatically — no manual setup needed.
Start the server
php hexaphp server:startOpen http://localhost:8000 in your browser.
PostgreSQL / MySQL / MariaDB
DB_DRIVER=mysql # pgsql for PostgreSQL; mysql for MySQL and MariaDB
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_app
DB_USER=root
DB_PASSWORD=secretMariaDB uses the mysql driver (pdo_mysql).
The framework creates the database automatically if it doesn't exist.
Next steps
- Architecture — understand Vertical Slices
- Worker Mode — run with FrankenPHP
- HexaORM Models — your first model