PHPackages                             8fold/php-amos - 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. 8fold/php-amos

ActiveLibrary

8fold/php-amos
==============

Not a content management system.

0.11.0(1y ago)0590MITPHPPHP ^8.2

Since Oct 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/8fold/php-amos)[ Packagist](https://packagist.org/packages/8fold/php-amos)[ GitHub Sponsors](https://github.com/8fold)[ GitHub Sponsors](https://github.com/joshbruce)[ RSS](/packages/8fold-php-amos/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (53)Used By (0)

8fold Amos for PHP
==================

[](#8fold-amos-for-php)

This project is a collection of patterns and sample code for creating flat-file PHP-based websites with minimal dependencies and opinions. The patterns are more important than the implementation.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).

- Implementations SHOULD favor separating metadata, content, rendering, and logic.
    - Metadata SHOULD favor JSON over YAML.
    - Content SHOULD favor Markdown over HTML.
    - Rendering SHOULD favor the system language over HTML.
    - Logic SHOULD favor low-level solutions over exhaustive frameworks.
- Implementations SHOULD favor local scope over global; developers and content creators SHOULD NOT need to modify multiple locations to accomplish things.
- Implementations SHOULD favor taking advantage of, not replacing, the server itself. (The implementation found here uses Apache, however, similar capabilities exist on other server stacks.)
- Implementations SHOULD favor simplicity over complexity; see [Pragmatic Dave's Razor](https://pragdave.me/blog/2014/03/04/time-to-kill-agile.html#back-to-the-basics).
- Paths SHOULD NOT use trailing slashes.
- Website URLs SHOULD NOT display site filenames (`index`) or extensions (`.html`, `.php`, and so on) and SHOULD use trailing slash to mimic static sites (`https://domain.com/page/` NOT `https://domain.com/page`).

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

[](#installation)

1. Clone the repository.
2. Add to project, or, copy, paste, and modify the code in your own classes.

Folders and files (basics)
--------------------------

[](#folders-and-files-basics)

Each website MAY have three areas:

1. content,
2. site, and
3. source.

Each site SHOULD have its own content folder. Each site SHOULD have two folders; one for local development and the other for pointing the domain. Each site MAY have only one source folder. A baseline Amos project, MAY look something like this:

```
.
├── content-root/
│   └── public
├── site-root/
│   ├── local
│   └── public
└── src
```

While not required, we RECOMMEND prefixing content folders with `content-`, site folders with `site-`, and using the naming convention for your preferred stack to name the folder where source code lives. (In PHP this is `src`.)

### Content directories

[](#content-directories)

*Usually the most frequently changed.*

Details for each page of the website exist within the content directory. Each page MAY have a metadata file, a content file, and any other associated content within the folder representing that page:

```
.
├── content-root/
│   └── public/
│       ├── content.md
│       ├── meta.json
│       └── sub-page/
│           ├── content.md
│           └── meta.json
└── ...
```

Note: The content folder(s) MAY NOT be at the same level as the site and source folders. Further, there MAY be more than 1.

The `content.md` is a plain text file that can operate independently from the website and rendering. The `meta.json` file holds metadata about the content itself and SHOULD NOT depend on the website implementation.

### Source directories

[](#source-directories)

*Usually changed less often compared to content.*

The code that consumes, manipulates, and renders the content lives here. We RECOMMEND separating data manipulation code from view code; facilitating [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller), [MVVM](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel), or [MVP](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter) design patterns.

### Site directories

[](#site-directories)

*Rarely changed.*

This area is the gateway for the server and allows users to configure the environment. It's also the area where we tend to start when making non-content changes by asking two questions:

1. Is this something the server can do for us?
2. If so, do we want it to?

For example, Apache servers have a file called `.htaccess` we can, and do, use to communicate with the server. We would like to redirect a user from one URL to a different URL. We could:

1. Write source code that looks for a `redirect` key in the `meta.json` file where the value is the target URL for the redirect. Write source code that responds with the proper 300 response code, changing the header location value for the browser. This MAY become difficult to change in the future as the number of redirected pages increases; if we decide to change, the name for the key, for example, we need to write more source code to allow for both, or, potentially update a lot of files.
2. Use a framework that has this implementation already in place, thereby, increasing dependencies. This MAY become difficult in the future because the framework developers may modify things in a way that forces us to write more source code or modify multiple files to update to the latest version of the framework.
3. Add one line to the `.htaccess` file.

This implementation
-------------------

[](#this-implementation)

MUST remain as functional as possible. `final` `abstract` classes with `static` methods are used to accomplish this while taking advantage of PSR-4 autoloading.

Other
-----

[](#other)

{links or descriptions or license, versioning, and governance}

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~19 days

Recently: every ~29 days

Total

51

Last Release

728d ago

PHP version history (3 changes)0.0.1PHP ^7.4||^8.0

0.2.0PHP ^8.1

0.11.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ff7aa36dc04c5b535cd71eadbf66038401edde0c9dfaa688bec4fc16c6d7e8b?d=identicon)[eightfold](/maintainers/eightfold)

---

Top Contributors

[![joshbruce](https://avatars.githubusercontent.com/u/15252830?v=4)](https://github.com/joshbruce "joshbruce (248 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/8fold-php-amos/health.svg)

```
[![Health](https://phpackages.com/badges/8fold-php-amos/health.svg)](https://phpackages.com/packages/8fold-php-amos)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[aimeos/aimeos-core

Full-featured e-commerce components for high performance online shops

4.5k346.9k48](/packages/aimeos-aimeos-core)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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