Minimal startup-ready PHP app on vortexphp/framework.
The vortex file in the project root is the CLI entry point (also registered in Composer bin). Run it with php vortex <command> (for example php vortex serve).
- PHP
8.2+ - Composer
- Node.js + npm (for Tailwind CSS build)
- GNU Make (optional; use the
composer run …equivalents below if you prefer) - Docker (optional; see Docker)
composer.json includes path repositories so a full Vortex checkout can symlink vendor/vortexphp/framework and vendor/vortexphp/live to sibling packages while you work on the framework. That is optional: vendor/ is gitignored, and installs from Packagist use normal package copies when those path entries are absent or unused. If you see symlinks under vendor/vortexphp/, you are using the local path repositories.
make setup # composer install + npm install; copies .env.example → .env if .env is missing
# edit .env: set APP_KEY and APP_URL (see .env.example comments)
make build
make serve # or: php vortex serveSame without Make:
composer run setup
cp .env.example .env # if you skipped `make setup`
composer run build
php vortex servecomposer create-project vortexphp/vortex my-app
cd my-app
composer run setup
cp .env.example .envcomposer install
npm install
cp .env.example .envGenerate APP_KEY and put it in .env:
php -r "echo 'base64:'.base64_encode(random_bytes(32)), PHP_EOL;"Set at least:
APP_KEYAPP_URL(for local:http://localhost:8000)
Build front-end assets (Tailwind → public/css/app.css, then copy Live → public/js/live.js):
make build
# or: composer run buildnpm run build only compiles CSS; composer run build / make build also runs php vortex publish:assets, which copies package assets (for example vortexphp/live → public/js/live.js).
Watch CSS during development:
make dev
# or: npm run dev / composer run devRun the app:
php vortex serve
# or: make serveOpen:
http://localhost:8000/http://localhost:8000/health
make test # or: composer run test
composer run doctor
composer run smoke
composer run db-check| Output | Source | How it is produced |
|---|---|---|
public/css/app.css |
ui/css/app.css |
Tailwind: npm run build / npm run dev |
public/js/live.js |
vendor/vortexphp/live/resources/live.js |
php vortex publish:assets (from LivePackage::publicAssets()); part of composer run build; also Composer post-install / post-update |
Templates reference /css/app.css and /js/live.js only. There is no separate public/dist/ pipeline in this app; that path is gitignored to avoid duplicate stale files.
database/seeders/DatabaseSeeder.php (Database\Seeders\DatabaseSeeder) is the entry point for seed data. Wire it into your own commands or tooling as the project grows.
App\Exceptions\AppException— base class for domain-level errors.App\Exceptions\Handler— implementhandle()to return a customResponsefor specific throwables; returnnullto use the frameworkErrorRenderer(wired frompublic/index.php).
Requires vendor/ (run composer install on the host first). Then:
docker compose upServes on http://127.0.0.1:8080/ (PHP built-in server, 0.0.0.0:8080 inside the container).
composer run install:prod
composer run build(composer run build runs npm run build and then syncs Live assets; Node is required for the Tailwind step.)