This guide walks you through setting up the project on a local development machine. For production deployment, see the Deployment page.
| Dependency | Version | Notes |
|---|---|---|
PHP | 8.1+ | Required by CI 4.4+ |
MySQL | 5.7 / 8.0 | Primary database |
Composer | 2.x | Dependency management |
Node.js | 18+ (optional) | Only for asset pipeline |
git clone https://github.com/your-org/myapp.git
cd myapp
composer install
cp env .env
Edit .env with your local database credentials and base URL.
php spark migrate
php spark db:seed MainSeeder
php spark serve
App will be available at http://localhost:8080.
localhost to a socket path instead of TCP.
Use 127.0.0.1 in .env to avoid connection errors.
Key variables to configure in .env:
| Variable | Default | Description |
|---|---|---|
| CI_ENVIRONMENT required | production |
Set to development locally for detailed error display. |
| database.default.hostname required | — | MySQL hostname. Use 127.0.0.1. |
| app.baseURL required | — | Full URL with trailing slash. e.g. http://localhost:8080/ |
| JWT_SECRET optional | — | Only needed if JWT API auth is enabled. |
.env
The file is in .gitignore. Use your CI/CD secrets manager for production values.