pckg / skeleton
Directory structure, required files and suggestions for /pckg
Requires
- php: 8.0.*
- pckg-app/frontend: dev-next-8.0 as dev-master
- pckg/auth: dev-next-8.0 as dev-master
- pckg/cache: dev-next-8.0 as dev-master
- pckg/collection: dev-next-8.0 as dev-master
- pckg/concept: dev-next-8.0 as dev-master
- pckg/database: dev-next-8.0 as dev-master
- pckg/framework: dev-next-8.0 as dev-master
- pckg/generic: dev-next-8.0 as dev-master
- pckg/htmlbuilder: dev-next-8.0 as dev-master
- pckg/locale: dev-next-8.0 as dev-master
- pckg/mail: dev-next-8.0 as dev-master
- pckg/manager: dev-next-8.0 as dev-master
- pckg/migrator: dev-next-8.0 as dev-master
- pckg/queue: dev-next-8.0 as dev-master
- pckg/translator: dev-next-8.0 as dev-master
Requires (Dev)
- pckg-app/frontend-dev: dev-next-8.0 as dev-master
- dev-master
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/moment-timezone-0.5.37
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/eventsource-1.1.1
- dev-dependabot/npm_and_yarn/url-parse-1.5.10
This package is auto-updated.
Last update: 2025-01-10 00:12:19 UTC
README
A clean start for every pckg project.
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
andpackage.json
Dev environment
The whole dev environment with system dependencies and some services is available in schtr4jh/pckg:latest
Docker
image.
$ 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.
Create a project
Create a project with composer and install all depencencies including dev.
# composer create-project pckg/skeleton . -s dev --prefer-dist
Install frontend dependencies.
# yarn install
Console
See what console
provides.
# php console
Available commands:
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.
# php console app:create
Answer to some questions and create a new app structure in the app
directory.
Init the application
Create static storage directories for the application.
# php console project:init
This will create the storage
folder with some mandatory subfolders not included in GIT.
Access the application
Open in web browser.
https://localhost:8072/
Directory structure
vendor
,components
andnode_modules
- dependency managers directorieswww
- directory that will be exposed to the internetstorage
- directory for framework, cache, uploads, tmp and other private and public filesconfig
- root project configurationapp/$app/config
- app configurationapp/$app/src
- app source filesapp/$app/public
- static assets (private, can be mounted towww
)
Note: it is recommended to disable discovery of dependency manager directories, www
and storage
.
Test the application
Runs mocha + codeception tests + static code analysis.
# php console project:test
More
Backend
- pckg/framework - learn about application lifespan, console access, routing, requests, responses, templating and other framework concepts.
- pckg/database - learn about database and data-layer organization
- pckg/migrator - migrate your database structure, data and config
- pckg/collection - more about data and collection manipulation
- pckg/htmlbuilder - more about form and request validation
- pckg/manager - more about asset & meta management
- pckg/auth - more about local and remote authentication options
- pckg/storage - mora about storage layer
- pckg/translator - mora about i18n layer
- pckg/queue - more about queue layer
- pckg/locale - more about localization layer
- pckg/cache - more about cache layer
- pckg/httpql - more about querying your data
- pckg/mail - more about mail communication
- pckg/websocket - more about websocket server and client
- pckg/tenant - mora about multi-tenancy support
- pckg/task - mora about async task handling
Frontend
- pckg/helpers-less - simple frontend LESS framework
- pckg/helpers-js - frontend Vue helpers
- pckg/orm - simple JS ORM
More
- pckg-app/demo-app - Demo app with feature presentation
- pckg/docker-images - Docker images