maskulabs/inertia-app
Inertia App
Web application based on Yii 3 and Inertia.js.
About
This repository contains an application built on top of the
yiisoft/app template.
It includes project-specific modifications and configuration for a web application using:
- PHP 8.5
- Yii 3
- Inertia.js
- Vue 3
- Vite
Requirements
Installation
Local installation
Create a project and install dependencies:
composer create-project maskulabs/inertia-app myproject --stability=dev
cd myproject
npm install
[!NOTE] Ensure that Composer is executed with the same PHP version that will be used to run the application.
To run the app:
composer serve
The application should then be available at the URL printed in the console, usually:
http://localhost:8080
Docker
[!WARNING] Docker Compose version 2.24 or newer is required.
Clone the repository and install dependencies:
make composer update
Start the development environment:
make up
Stop it:
make down
The application will be available at:
http://localhost
To see all available commands:
make help
Useful make commands
Development
make build
make up
make down
make stop
make clear
make shell
Tools
make yii <command>
make composer <command>
make rector
make cs-fix
make npm <command>
Tests and analysis
make test
make test-coverage
make codecept <command>
make psalm
make composer-dependency-analyser
Production
make prod-build
make prod-push
make prod-deploy
Directory structure
assets/ Asset bundle source files.
config/ Configuration files.
docker/ Docker configuration.
frontend/ Frontend source files.
public/ Publicly accessible files.
runtime/ Runtime-generated files.
src/ Application source code.
tests/ Test suite.
vendor/ Composer dependencies.
Makefile Development and deployment commands.
yii Console application entry point.
Testing
The project uses Codeception and PHPUnit-based tooling.
For local execution:
./vendor/bin/codecept build
APP_ENV=test ./yii serve > ./runtime/yii.log 2>&1 &
./vendor/bin/codecept run
Using Docker:
make codecept build
make test
Static analysis
Static analysis is available via Psalm:
./vendor/bin/psalm
Or with Docker:
make psalm
Attribution
This project is based on the
yiisoft/app application template by Yii Software.
License
This repository is based on software originally distributed under the BSD License.
See LICENSE.md for the full license text and terms applicable to the original code.
Unless stated otherwise, modifications contained in this repository are distributed under the same license.