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 3d 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 14% 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://www.gravatar.com/avatar/d69aeb65c83404c0dd5e2eeb2b61c08e854fd8443bd93e444bd759aa4e313fee?d=identicon)[ryanve](/maintainers/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

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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