tinytank / framework
Starlite: a tiny, database-free PHP micro framework for static-like dynamic sites (Datastar, Symfony Routing, Twig, Markdown blog, translations, SEO), compiled for Opcache.
Requires
- php: >=8.4
- ext-intl: *
- ext-mbstring: *
- ext-xmlwriter: *
- intervention/image: ^4.3
- league/commonmark: ^2.8
- monolog/monolog: ^3.9
- psr/container: ^2.0
- spatie/schema-org: ^5.0
- starfederation/datastar-php: ^1.0
- symfony/config: ^7.4
- symfony/console: ^7.4
- symfony/dotenv: ^7.4
- symfony/error-handler: ^7.4
- symfony/http-foundation: ^7.4
- symfony/mailer: ^7.4
- symfony/routing: ^7.4
- symfony/security-csrf: ^7.4
- symfony/translation: ^7.4
- symfony/yaml: ^7.4
- twig/intl-extra: ^3.10
- twig/twig: ^3.10
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^12.0
Suggests
- ext-gd: Responsive images (GD or Imagick, with WebP; AVIF where available)
- ext-imagick: Responsive images (Imagick or GD), used when both are installed
- phpunit/phpunit: For Starlite\Testing\KernelTestCase in your app's tests
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-15 00:18:21 UTC
README
The core of Starlite: a tiny, database-free PHP micro framework for static-like dynamic sites. Datastar for reactivity, Symfony Routing, Twig, a Markdown blog with translations, SEO (Open Graph, JSON-LD, hreflang, sitemap, feeds) and Vite, all compiled ahead of time for Opcache. Freely inspired by Craft CMS and Datastar.
This is the framework package (starlite/framework). To build a site, start from the skeleton:
lab909/starlite.
📖 Documentation: https://lab909.github.io/starlite-framework-docs/
Installation
The package isn't on Packagist; sites install it from this repository:
{
"repositories": [{ "type": "vcs", "url": "https://github.com/lab909/starlite-framework" }],
"require": { "starlite/framework": "^1.0@dev" }
}
The skeleton already contains this. Update a site with composer update starlite/framework.
What's inside
src/ Kernel, Router, Controller, Datastar, Vite, Site, Translations, Cache, Container
src/Blog/ the Markdown blog: compiler, post SEO, feed, asset serving
src/Seo/ page metadata, sitemap, robots.txt
src/Console/ bin/console: deploy, cache:clear, command discovery
src/Forms/ forms: validation, spam checks (all local), sending with Symfony Mailer
src/Images/ responsive images (AVIF/WebP, srcset) and originals without metadata
src/Log/ the log (Monolog): daily files, email alerts, nothing about visitors
src/Cdn/ caching pages at a CDN (opt-in) and purging Cloudflare, Bunny or any CDN
src/Pages/, src/Collections/, src/Content/ content pages, data collections, content components and embeds
src/Testing/ KernelTestCase, the base class for app tests
resources/vite/ Starlite's Vite plugin
resources/js/ the Datastar client and the 'starlite' browser helpers
resources/templates/ default templates: content components (youtube, vimeo), overridable by sites
tests/ the framework's test suite, with a fixture project and content; tests/js: Vitest
Development
composer update composer test # PHPUnit composer analyse # PHPStan, level 8 npm install && npm test # Vitest: the browser helpers in resources/js (Datastar, persist, theme…)
The skeleton's Playwright tests then check the whole site in a real browser.
To work on the framework inside a site, clone this repository into the site's packages/starlite/
(gitignored) and run composer update starlite/framework: Composer then symlinks your clone instead
of installing from GitHub. See the skeleton's CONTRIBUTING.md.
Third-party code
resources/js/datastar.js is the Datastar client
(v1.0.2), MIT License, Copyright © Star Federation: see resources/js/datastar.LICENSE.md. Its
license header is kept in sites' built JavaScript (comments.legal in the Vite plugin). Everything
else comes through Composer with its own license.