Installation
Requirements
- PHP 8.4 with the
intl,mbstring,xmlwriterandopcacheextensions (Composer checks all butopcache), and GD or Imagick with WebP support for responsive images - Composer 2
- Node.js 22+ and npm, for the asset build
- For local development: DDEV (recommended), which provides all of the above in Docker
Create a site
A TinyTank site starts from the skeleton, tinytankphp/tinytank. On GitHub, click Use this template to create your site's own repository (without the skeleton's history), then clone it:
git clone git@github.com:you/my-site.git
cd my-siteWithout GitHub's template button
With Composer, which also installs the framework:
composer create-project tinytank/tinytank my-site
cd my-site && git initOr with git:
git clone --depth 1 https://github.com/tinytankphp/tinytank.git my-site
cd my-site && rm -rf .git && git initThe framework isn't part of the skeleton: it's the tinytank/framework package, which Composer installs from Packagist in the next step. Its source is tinytankphp/framework.
Configure
Copy the example environment file and fill it in:
cp .env.example .envAPP_SECRET=… # openssl rand -hex 32
APP_URL=https://my-site.ddev.site # your site's public URL, no trailing slash
APP_DEBUG=1 # development modeAPP_SECRET signs Datastar requests; APP_URL is used for every absolute URL (canonical links, Open Graph, sitemap, feeds). Both are required: the app refuses to boot without them. See Configuration for everything else.
Run it with DDEV
ddev config --project-name=my-site # once, if you renamed the project
ddev start
ddev composer update # installs tinytank/framework from Packagist
ddev npm install
ddev npm run dev # Vite + Tailwind with hot reloadOpen https://my-site.ddev.site. Editing a template, a post or a translation reloads the page; CSS changes apply without a reload.
Commit your lock file
The skeleton doesn't commit composer.lock. Your site should: remove the /composer.lock line from .gitignore and commit the file, so every server installs exactly the versions you tested.
Without DDEV
Any PHP 8.4 setup works. Point the web server's document root at public/ and send every request that isn't a file to public/index.php. For a quick look:
composer update && npm install && npm run build
php -S localhost:8000 -t public public/index.phpThe Vite dev server is configured for DDEV; outside it, run npm run build after asset changes, or adjust server.origin in vite.config.js.
Check that everything works
ddev composer test # the framework and app test suites
ddev composer analyse # PHPStanNext steps
- Project structure: where everything lives
- Your first page: a route, a controller and a template in five minutes