pushinbr / pam-skeleton
Production-ready starter application for the Pam runtime.
Requires
- php: ^8.5
- pushinbr/pam-http: ^2.0
- 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.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
- dev-brand/pam-mascot
- dev-docs/readme
This package is auto-updated.
Last update: 2026-11-09 16:13:12 UTC
README
Start with production structure, not an empty directory.
The structured API starter with typed DTOs, thin controllers, services, repositories, resources, migrations, tests, and integer-backed domain enums.
Install · Quick example · What you get · Docs · Issues
Install
Create a project from the skeleton with PAM's embedded Composer:
pam composer create-project pushinbr/pam-skeleton my-app
cd my-app
pam composer require illuminate/database illuminate/events illuminate/filesystem illuminate/pagination
pam doctor --fix
pam dev
The starter's database layer uses PAM HTTP's optional Eloquent bridge, whose illuminate/* packages are installed separately (see the PAM HTTP guide). .env.example defaults to SQLite (DB_CONNECTION=sqlite, DB_DATABASE=storage/database.sqlite) on port 3000; bin/migrate runs the migrations and pam test runs the suite.
For a minimal API without the layered structure, pam init my-api --template http scaffolds a single index.php with the same pushinbr/pam-http 2.x router.
Quick example
<?php declare(strict_types=1); use App\Http\Controllers\PingController; use App\Http\Controllers\ProductController; use App\Providers\AppServiceProvider; use Pam\Api\Config\ConfigDefinition; use Pam\Api\Config\Configuration; use Pam\Api\Config\ConfigType; use Pam\Api\Middleware\SecurityHeadersMiddleware; use Pam\Api\Database\DatabaseConfig; use Pam\Api\Database\EloquentServiceProvider; use Pam\App; $config = Configuration::fromEnvironment([ new ConfigDefinition( key: 'app.port', environment: 'PAM_PORT', type: ConfigType::Integer, required: false, default: 3000, ), ]); $app = new App(); $app->provider(new EloquentServiceProvider(DatabaseConfig::fromEnvironment())); $app->provider(new AppServiceProvider()); $app->middleware(new SecurityHeadersMiddleware()); $app->get('/api/ping', [PingController::class, 'show']); $app->get('/api/products', [ProductController::class, 'index']); $app->post('/api/products', [ProductController::class, 'store']); $app->listen($config->integer('app.port'));
Routes call thin controllers (src/Http/Controllers), which delegate to services and repositories; ProductStatus is an integer-backed enum (Active = 1, Archived = 2).
What you get
- Starting a structured JSON API
- Teaching the recommended PAM application architecture
- Proving database, validation, resource, and test workflows end to end
| Role | Application starter |
| Execution path | PAM HTTP · Eloquent · PHP 8.5 |
| This repository owns | Generated project structure and first executable vertical slice |
| Boundary | A starting point, not a framework dependency or runtime distribution |
src/
Domain/Products/ CreateProductData, ProductStatus
Http/Controllers/ PingController, ProductController
Http/Requests/ StoreProductRequest
Http/Resources/ PingResource, ProductResource
Models/ Product
Providers/ AppServiceProvider
Repositories/ ProductRepository, EloquentProductRepository
Services/ ProductService, ReadinessService
database/migrations/ create_products
tests/ ApplicationTest
Docs
Part of the PAM ecosystem
PAM runs PHP natively on servers, desktops and phones. This repository is one piece of it.
| PAM | PAM Desktop | PAM Native | Ecosystem |
|---|---|---|---|
| the runtime and CLI | native desktop apps in PHP | native Android and iOS apps in PHP | every official package and plugin |
Docs: push-in.github.io/pam-docs · Issues
Apache License 2.0 with an Additional Use Grant: files copied from this skeleton and code emitted by PAM generators may be used, modified, sublicensed and distributed under terms of your choice · Made in Brazil by Pushin