PHPackages                             jacob-roth/simple-framework - 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. jacob-roth/simple-framework

ActiveProject[Framework](/categories/framework)

jacob-roth/simple-framework
===========================

SimpleFramework is a simple framework for building out html\\php pages

v1.3.1(1y ago)040MITPHPPHP ^7.4 || ^8.0

Since Mar 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/JacobRothDevelopment/SimpleFramework)[ Packagist](https://packagist.org/packages/jacob-roth/simple-framework)[ Docs](https://github.com/JacobRothDevelopment/Phapi)[ RSS](/packages/jacob-roth-simple-framework/feed)WikiDiscussions master Synced today

READMEChangelog (7)DependenciesVersions (10)Used By (0)

SimpleFramework
===============

[](#simpleframework)

SimpleFramework is a simple framework for building out php pages

```
composer require jacob-roth/simple-framework
```

So J, what does this do?
------------------------

[](#so-j-what-does-this-do)

Ever want to build a static website ***and*** want to reuse code you made? No? What do you mean no one builds static sites anymore? Well, SimpleFramework lets you do this anyway.

What's that? Other packages do this better? That's probably true. You should use them, then.

What SimpleFramework does:

- URL Routing
    - maps requests to `pages` directory
        - ex: requesting `/page1` delivers `/pages/page1.php`
        - ex: requesting `/creative/page1` delivers `/pages/creative/page1.php`
    - still works for assets
        - ex: requesting `/assets/styles.css` delivers `/assets/styles.css`
- Build Pages
    - PHP pages in the `pages` directory
    - Use Components
- Build Components
    - PHP or HTML files in the `components` directory
    - Components can be reused between pages
    - Can pass parameters through `$data` object to and between components

What You Need To Do
-------------------

[](#what-you-need-to-do)

1. `composer require jacob-roth/simple-framework`
2. Create `/pages` and `/components` directories in project root
3. Add the following to `.htaccess` into project root directory

    ```
    RewriteEngine On
    RewriteRule ^(.*)$ index.php [NC,L,QSA]
    ```
4. Create `index.php` in project root directory
5. Add the following to `index.php`

    ```
    SimpleFramework\Constants::setDefaults();
    SimpleFramework\Util::loadContent();
    ```

Using Util
----------

[](#using-util)

Util functionDescriptionincludeComponentImport ComponentrequireComponentImport Component
Throws error if file doesn't existloadContentStart processing the url requestloadResourceLoad only given resource file (ie stylesheet, image, etc.)ENVs
----

[](#envs)

If needed, you can change some of the defaults in SimpleFramework using `$_ENV`

$\_ENV nameDefaultDescriptionAPP\_SF\_COMPONENTS`components`Directory where component files are locatedAPP\_SF\_PAGES`pages`Directory where pages are locatedAPP\_SF\_ROOT`index.php`Root PHP page nameAPP\_SF\_404`null`The page delivered when url doesn't map to fileAPP\_SF\_IGNORE\_REGEX`["/^\/\..*$/","/^\/vendor$/"]`If any requests match any of the regular expressions, automatically return 404APP\_SF\_APACHE\_MIME\_DOT\_TYPES`/etc/mime.types`The file path for apache mime typesAPP\_SF\_MIME\_TYPES\_MAP`null`Map of file extensions to content typesYou can set these ENVs like this:

```
$_ENV[SimpleFramework\Constants::notFoundFile] = __DIR__ . "/pages/404.php";
```

This must be done after calling `Constants::setDefaults()`

Limitations
===========

[](#limitations)

- If you choose to change the ENV variable `APP_SF_APACHE_MIME_DOT_TYPES`, you must run the following to properly create the type mapping

```
SimpleFramework\Constants::setMimeTypesMap();
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~114 days

Recently: every ~83 days

Total

9

Last Release

663d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/53883026?v=4)[JacobRothDevelopment](/maintainers/JacobRothDevelopment)[@JacobRothDevelopment](https://github.com/JacobRothDevelopment)

---

Top Contributors

[![JacobRothDevelopment](https://avatars.githubusercontent.com/u/53883026?v=4)](https://github.com/JacobRothDevelopment "JacobRothDevelopment (21 commits)")[![jacobRedHawk](https://avatars.githubusercontent.com/u/66629427?v=4)](https://github.com/jacobRedHawk "jacobRedHawk (7 commits)")

---

Tags

frameworkstaticSimple

### Embed Badge

![Health badge](/badges/jacob-roth-simple-framework/health.svg)

```
[![Health](https://phpackages.com/badges/jacob-roth-simple-framework/health.svg)](https://phpackages.com/packages/jacob-roth-simple-framework)
```

###  Alternatives

[originphp/framework

The OriginPHP framework

472.6k6](/packages/originphp-framework)

PHPackages © 2026

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