PHPackages                             ryanve/chromosome - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ryanve/chromosome

ActiveLibrary[Templating &amp; Views](/categories/templating)

ryanve/chromosome
=================

JSON-based PHP template engine

26PHP

Since Feb 2Pushed 12y agoCompare

[ Source](https://github.com/ryanve/chromosome)[ Packagist](https://packagist.org/packages/ryanve/chromosome)[ RSS](/packages/ryanve-chromosome/feed)WikiDiscussions php Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[Chromosome](../../) PHP package
--------------------------------

[](#chromosome-php-package)

- Generate views from content stored in static JSON and HTML files.
- Use as server-side template engine or as local site generator.

Setup
-----

[](#setup)

### Apache

[](#apache)

Add the following [Apache](http://httpd.apache.org/docs/2.0/misc/rewriteguide.html) rewrites to the root [.htaccess](http://en.wikipedia.org/wiki/Htaccess) file on your server. Change `_items` or `_php` paths as needed to accommodate your directory structure.

```
# BEGIN chromosome
# github.com/ryanve/chromosome

  RewriteEngine On

  # Option 1: Unless file, add trailing slash.
  # RewriteCond %{REQUEST_FILENAME} !-f
  # RewriteRule ^.*[^/]$ /$0/ [L,R=301]
  # Option 2: Unless dir, remove trailing slash.
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)[/]+$ /$1 [L,R=301]

  # Search _items for non-existing URIs and rewrite if it exists there.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{DOCUMENT_ROOT}/_items/%{REQUEST_URI} -d
  RewriteCond %{DOCUMENT_ROOT}/_php/chromosome -d
  RewriteRule ^(.*)$ /_php/chromosome/request.php?request=$1&from=_items [L]

  # Map direct file requests.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{DOCUMENT_ROOT}/_items/%{REQUEST_URI} -f
  RewriteRule ^(.*)$ _items/$1 [L]

  # Rewrite other dirs that contain the JSON file.
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteCond %{REQUEST_FILENAME}item.json -f
  RewriteCond %{REQUEST_URI} !^/?_items/.+$
  RewriteRule ^(.*)$ /_php/chromosome/request.php?request=$1 [L]

# END chromosome
```

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/949985?v=4)[ryan neptune](/maintainers/ryanve)[@ryanve](https://github.com/ryanve)

---

Top Contributors

[![ryanve](https://avatars.githubusercontent.com/u/949985?v=4)](https://github.com/ryanve "ryanve (77 commits)")

### Embed Badge

![Health badge](/badges/ryanve-chromosome/health.svg)

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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