PHPackages                             lexislav/station0 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. lexislav/station0

ActiveLibrary[Framework](/categories/framework)

lexislav/station0
=================

Grand zero flat file CMS — core library.

v0.7.1(1mo ago)027[1 PRs](https://github.com/lexislav/station0/pulls)1MITPHPPHP ^8.2

Since Apr 27Pushed 1w agoCompare

[ Source](https://github.com/lexislav/station0)[ Packagist](https://packagist.org/packages/lexislav/station0)[ RSS](/packages/lexislav-station0/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (26)Versions (26)Used By (1)

Station0
========

[](#station0)

Lightweight flat-file CMS built on PHP 8.2+. Pages are stored as plain text files on disk — no database migrations, fully Git-friendly. SQLite is used only for authentication.

Stack
-----

[](#stack)

- **Framework**: Slim 4
- **Templates**: Twig 3
- **Markdown**: League/CommonMark (GFM + front matter)
- **Auth**: Delight\\Auth (SQLite)
- **DI**: PHP-DI 7

Requirements
------------

[](#requirements)

- PHP ≥ 8.2 (with `pdo_sqlite` extension)
- Composer

Installation
------------

[](#installation)

```
composer create-project lexislav/get-station0 mysite
cd mysite
php -S localhost:8080 -t public public/index.php
```

On first visit to `http://localhost:8080/admin`, a setup form lets you create the first admin account in the browser.

Apache deployment
-----------------

[](#apache-deployment)

If you're serving via Apache (Homebrew `httpd`, XAMPP, system Apache, …):

1. Point your vhost `DocumentRoot` at the project's `public/` directory.
2. Allow `.htaccess` overrides for that directory and ensure `mod_rewrite` is loaded.

Example vhost (Homebrew `httpd` at `/opt/homebrew/etc/httpd/extra/httpd-vhosts.conf`):

```

    ServerName mysite.local
    DocumentRoot "/path/to/mysite/public"

        AllowOverride All
        Require all granted

```

In `httpd.conf` make sure this line is uncommented:

```
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so

```

Restart: `brew services restart httpd`.

**Symptom of misconfiguration:** Apache's default "Not Found — The requested URL was not found on this server." page on `/admin` (or any sub-path) means the rewrite isn't being applied — check `AllowOverride` and `mod_rewrite`.

This package
------------

[](#this-package)

`lexislav/station0` is the **core library** — it contains the PHP classes, admin templates, and CLI binary. It is installed into `vendor/` by the skeleton project.

For a ready-to-use project skeleton, see [lexislav/get-station0](https://github.com/lexislav/get-station0).

Media &amp; uploads
-------------------

[](#media--uploads)

Uploaded assets are stored **next to the page** they belong to:

```
site/content/pages/about/
  page.txt
  team-photo.jpg          ← uploaded asset

```

Filenames are slugified on upload (`Team Photo.JPG` → `team-photo.jpg`) and collisions resolve as `team-photo-2.jpg`, `-3`, … Allowed types: jpg, png, gif, webp, svg (max 8 MB).

In stored content, asset references are **page-relative** — bare filenames:

```
- type: gallery
  images:
    - src: team-photo.jpg
      alt: The team
```

At render time, the bare filename is resolved against the current page (`/media/about/team-photo.jpg`). Move or rename the page directory and the references still work — they were never absolute.

To migrate any older absolute `/media/{path}/file.ext` references in stored pages to the new bare-filename form:

```
php vendor/bin/console assets:relink           # apply
php vendor/bin/console assets:relink --dry-run # preview
```

Public asset URLs follow the page URL: `/media/{page-path}/{filename}`. The root page uses `/media/~/{filename}`.

Per-template block restrictions
-------------------------------

[](#per-template-block-restrictions)

A template can restrict which block types its pages may use, and pre-seed a new page with starter blocks. Drop an optional manifest beside the template file:

```
site/templates/gallery.twig         ← the template
site/templates/gallery.blocks.yaml  ← its block manifest (optional)

```

```
# site/templates/gallery.blocks.yaml
allowedBlocks:        # the "+ Add block" palette shows only these, in order
  - text
  - gallery
defaultBlocks:        # a NEW page of this template opens with these inserted
  - gallery
```

Both keys are optional and compose:

- **`allowedBlocks`** — restricts the editor palette. No declaration ⇒ all blocks are available (the default).
- **`defaultBlocks`** — pre-inserts blocks into **new** pages only, at their schema default field values. No declaration ⇒ a single empty `text` block. Pre-seeded blocks must be a subset of the allow-list.

Unknown block names are ignored, and an allow-list that filters down to nothing falls back to the full palette. This mirrors how a page's `AllowedChildTemplates`front-matter field restricts which child *templates* a page accepts — here it is the block types inside a page that are restricted, keyed by template.

CLI (via skeleton)
------------------

[](#cli-via-skeleton)

```
php vendor/bin/console user:create   [role]
php vendor/bin/console user:reset-password
php vendor/bin/console cache:clear
php vendor/bin/console assets:relink [--dry-run]
```

Package structure
-----------------

[](#package-structure)

```
admin/templates/   Admin Twig templates
bin/console        CLI binary (exposed via composer bin)
config/roles.php   Role definitions
src/               PHP source (namespace Station0\)

```

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance96

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

24

Last Release

36d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7147349?v=4)[Alexandr Hudeček](/maintainers/lexislav)[@lexislav](https://github.com/lexislav)

---

Top Contributors

[![lexislav](https://avatars.githubusercontent.com/u/7147349?v=4)](https://github.com/lexislav "lexislav (60 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lexislav-station0/health.svg)

```
[![Health](https://phpackages.com/badges/lexislav-station0/health.svg)](https://phpackages.com/packages/lexislav-station0)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[phlak/directory-lister

PHP directory lister

2.5k1.4k](/packages/phlak-directory-lister)[craftcms/cms

Craft CMS

3.6k3.6M3.2k](/packages/craftcms-cms)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)[chameleon-system/chameleon-base

The Chameleon System core.

1028.7k5](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
