pckg/skeleton
A clean start for every pckg project., (*1)
, (*2)
Features
- PHP 8.0 Framework with ORM, Migrations, Auth, Queue and I18n modules on the backend - pckg
- Webpack with VueJS ecosystem integration on the frontend - pckg-app/frontend
and pckg-app/frontend-dev
- Plug'n'play Docker images for Dev and Prod environments - pckg/docker-images
- CI & CD pipelines (Github Workflows) -
./github/workflows/
- PHP Cloc, Stan, CS, Codeception and Mocha -
composer.json and package.json
Dev environment
The whole dev environment with system dependencies and some services is available in schtr4jh/pckg:latest Docker
image., (*3)
$ docker run \
-v $PWD:/var/www/html \
-i -p 8072:443 \
-t schtr4jh/pckg:latest \
--restart=always /bin/bash
See pckg/docker-images for more info on configuration, parameters and
services., (*4)
Create a project
Create a project with composer and install all depencencies including dev., (*5)
# composer create-project pckg/skeleton . -s dev --prefer-dist, (*6)
Install frontend dependencies., (*7)
# yarn install, (*8)
Console
See what console provides., (*9)
# php console, (*10)
Available commands:, (*11)
help Displays help for a command list Lists commands\
app\
**app:create** Create new application\
cache\
**cache:clear** Clear cache\
migrator\
**migrator:install** Install migrations from envirtonment\
Create new application
Create a directory structure for the new application., (*12)
# php console app:create, (*13)
Answer to some questions and create a new app structure in the app directory., (*14)
Init the application
Create static storage directories for the application., (*15)
# php console project:init, (*16)
This will create the storage folder with some mandatory subfolders not included in GIT., (*17)
Access the application
Open in web browser., (*18)
https://localhost:8072/, (*19)
Directory structure
-
vendor, components and node_modules - dependency managers directories
-
www - directory that will be exposed to the internet
-
storage - directory for framework, cache, uploads, tmp and other private and public files
-
config - root project configuration
-
app/$app/config - app configuration
-
app/$app/src - app source files
-
app/$app/public - static assets (private, can be mounted to www)
Note: it is recommended to disable discovery of dependency manager directories, www and storage., (*20)
Test the application
Runs mocha + codeception tests + static code analysis., (*21)
# php console project:test, (*22)
More
Backend
Frontend
More
Support
pckg/framework
pckg.org, (*23)