pushinbr / pam-skeleton
Production-ready starter application for the Pam runtime.
Requires
- php: ^8.5
- pushinbr/arcano: ^0.2.2
- pushinbr/pam-http: ^2.2
- pushinbr/pam-http-psr: ^1.0
- pushinbr/pam-socket: ^1.1
Requires (Dev)
- laravel/pint: ^1.30
- phpunit/phpunit: ^12.5
- pushinbr/pam-http-testing: ^1.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v2.1.0
- v2.0.1
- v2.0.0
- v1.0.2
- v1.0.1
- v1.0.0
- v0.1.47
- v0.1.46
- v0.1.45
- v0.1.44
- v0.1.43
- v0.1.42
- v0.1.41
- v0.1.40
- v0.1.39
- v0.1.38
- v0.1.37
- v0.1.36
- v0.1.35
- v0.1.34
- v0.1.33
- v0.1.32
- v0.1.31
- v0.1.30
- v0.1.29
- v0.1.28
- v0.1.27
- v0.1.26
- v0.1.25
- v0.1.24
- v0.1.23
- v0.1.22
- v0.1.21
- v0.1.20
- v0.1.19
- v0.1.18
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
This package is auto-updated.
Last update: 2026-11-19 00:48:06 UTC
README
This branch targets PAM API 2.0. Use the published
1.xskeleton until the PAM API 2.0 prerelease is available on Packagist.
Start here
This skeleton creates an application for the PAM Runtime; it does not include the runtime itself. Install PAM first, then create the project through PAM:
curl --proto '=https' --proto-redir '=https' --tlsv1.2 \ --connect-timeout 15 --max-time 60 --max-filesize 1048576 -fsSL \ https://github.com/push-in/pam/releases/latest/download/install.sh | sh pam doctor pam init my-app cd my-app pam composer install mkdir -p storage && touch storage/database.sqlite export DB_CONNECTION=sqlite DB_DATABASE=$PWD/storage/database.sqlite pam composer migrate pam composer dev
The API starts at http://127.0.0.1:3000.
The starter intentionally demonstrates the structured PAM API path: a named controller method orchestrates a service and returns a JSON Resource. Closures remain available for small endpoints, but application rules should live in services and persistence should live in repositories.
It also ships an executable Arcano ORM vertical slice:
curl -X POST http://127.0.0.1:3000/api/products \ -H 'content-type: application/json' \ -d '{"name":"Mechanical keyboard","priceInCents":34990}' curl http://127.0.0.1:3000/api/products
ProductController stays thin, StoreProductRequest validates and hydrates a
typed DTO, ProductService owns the use case, ProductRepository isolates
Arcano persistence, and ProductResource owns the response contract. Product
statuses are sequential integer-backed enum values (1 active, 2 archived).
Creation returns 201 Created; resources may select any valid HTTP status while
retaining PAM API's consistent data envelope.
Run the in-memory application test inside Pam's Embed SAPI:
pam composer test
The generated application and this published skeleton share the same source files:
index.php
src/
├── Domain/Products/
├── Http/{Controllers,Requests,Resources}/
├── Models/Product.php # #[Entity] mapped by Arcano
├── Providers/AppServiceProvider.php
├── Repositories/
└── Services/
database/migrations/
tests/{ApplicationTest.php,bootstrap.php}
index.php validates typed configuration before listening, installs secure
response headers, and boots Arcano from environment configuration (DB_*).
The entities in src/Models are compiled into var/cache/arcano-schema.php;
the cache is rebuilt when an entity changes, except with PAM_ENV=production.
Migrations are explicit so concurrent production workers never race schema changes:
pam composer migrate # run pending migrations pam composer migrate generate # write a migration for changed entities pam composer migrate rollback 1 # revert the last migration pam composer migrate status # list migrations and when they ran pam composer migrate cache # rebuild the schema cache during deploy
License
The PAM skeleton is open source under the Apache License 2.0. Application files copied from this skeleton and code emitted by PAM generators may be used, modified, sublicensed, and distributed under terms of your choice, as stated in the Additional Use Grant.