tthe/bagatelle

Bagatelle is a PHP boilerplate bundle for simple websites and APIs.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:project

pkg:composer/tthe/bagatelle

v0.0.1 2026-02-09 21:28 UTC

This package is not auto-updated.

Last update: 2026-02-10 04:13:35 UTC


README

  • A trifle; an insubstantial thing.
  • (literature, music) A short piece of literature or of instrumental music, typically light or playful in character.

bagatelle - Wiktionary, the free dictionary
(Named in contrast to Symfony)

Introduction

Bagatelle is an opinionated PHP boilerplate bundle for simple websites and APIs. It bundles and pre-configures common components from the PHP ecosystem, making it easy to get started while having full control of all the details.

Contents

Bagatelle centers around Symfony's HttpKernel, Routing, EventDispatcher and Console packages for building web and CLI applications.

Well known packages Monolog (PSR-3 logging), PHP-DI (PSR-11 dependency injection container), Twig (templating engine), phpdotenv (environment variables) and nyholm/psr7 (HTTP messages) are bundled and preconfigured as well.

A basic but functional implementation for adding middleware to routes and controllers along with CORS support is also included.

Additionally, a Docker image based on FrankenPHP is ready for development and production use-cases.

Get Started

Create project

Create a new application based on Bagatelle (replace "my-project" with your name of choice):

composer create-project tthe/bagatelle my-project

Run application

When developing you can either use PHPs built-in development server:

php -S localhost:8080 -t public

or using Docker:

docker compose up -d

# or, for production config:
SERVER_NAME="your-domain.com" docker compose -f compose.yaml -f compose.prod.yaml up

Both will start your Bagatelle-based application at localhost:8080.

The console application is executed using:

php bin/console.php

Documentation