Search by

splinter / skeleton

Splinter application skeleton — deploy a new microservice with composer create-project

Maintainers

Package info

github.com/vhar/splinter-skeleton

Type:project

pkg:composer/splinter/skeleton

Transparency log

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.1 2026-08-25 18:36 UTC

This package is auto-updated.

Last update: 2026-08-25 18:37:14 UTC


README

Application template for the Splinter framework.

Create a new project

composer create-project splinter/skeleton my-service
cd my-service
cp .env.example .env   # already done automatically by composer

Edit .env, then run the migrations:

php splinter migrate

Start a local PHP server:

php -S localhost:8000 -t public/

Directory layout

bootstrap/app.php     Web bootstrap — boots HttpKernel
config/               Configuration files (auto-loaded by the kernel)
  app.php             Providers, routes, middlewares, extra commands
  database.php        Database connections
  events.php          Event → listener map
  phinx.php           Migration runner config (includes core migrations)
  queue.php           Redis connection for the queue driver
db/
  migrations/         Your application migrations
  seeds/              Seed files
public/index.php      Web server document root entry point
routes/
  api.php             API routes
  web.php             Web routes
splinter              CLI entry point (like artisan)
src/                  Your application code (App\ namespace)

CLI commands

php splinter migrate [--connection=default]
php splinter migrate:rollback [--connection=default]
php splinter migrate:status [--connection=default]
php splinter migrate:create <ClassName>
php splinter queue:work [queue]

Adding routes

Route files receive $app (Splinter\Application) and $router (Bramus\Router\Router) as local variables.

// routes/api.php
$router->mount('/api/v1', function () use ($router, $app) {
    $router->get('/ping', function () {
        \Splinter\Http\JsonResponse::success(['pong' => true])->send();
    });
});

Adding console commands

Register your command classes in config/app.php under 'commands'. They are resolved from the DI container, so constructor dependencies are autowired automatically.