PHPackages                             fahrradkrucken/sf-router - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fahrradkrucken/sf-router

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fahrradkrucken/sf-router
========================

Simple, single-file, dependency-free PHP router.

v1.0.0(6y ago)04PHP

Since Mar 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/fahrradkrucken/sf-router)[ Packagist](https://packagist.org/packages/fahrradkrucken/sf-router)[ RSS](/packages/fahrradkrucken-sf-router/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

SFRouter
========

[](#sfrouter)

### Info

[](#info)

This is the simple router, implemented in one file, that could be used through traditional composer-dependency or through `require` statement.

### Installation

[](#installation)

- Through Composer: `composer require fahrradkrucken/sf-router`.
- As a separate file: `require('path/to/sf-router.php')`.

### Features

[](#features)

Basically, it allows us to (almost) do everything we usually do with routers:

- Add GET/POST/PUT/PATCH/DELETE routes (or several request methods at once);
- Add route groups;
- Add callbacks to routes/route-groups as well as add before/after actions (callbacks);
- Set custom URI and REQUEST\_METHOD (as FastRoute allows us to do);
- Set simple named params inside your route, smth like
    `my-api/v2/user/{user_id}/actions/{action_id}/view`.

What it can't do for you:

- Handle your route's callback;
- Get you the GET and POST request parameters.

So the only thing it does is takes your URI/REQUEST\_METHOD and returns correct route, based on list of routes, provided by you.

### Usage

[](#usage)

See the `demo.php` file inside this repo to see how to use it.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Unknown

Total

1

Last Release

2249d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bd129e19d5eec6aa8b13fff9dd22a9a1471e2941ad8d32f48509e35eb55e0ce?d=identicon)[fahrradkrucken](/maintainers/fahrradkrucken)

---

Top Contributors

[![fahrradkrucken](https://avatars.githubusercontent.com/u/12850792?v=4)](https://github.com/fahrradkrucken "fahrradkrucken (3 commits)")

### Embed Badge

![Health badge](/badges/fahrradkrucken-sf-router/health.svg)

```
[![Health](https://phpackages.com/badges/fahrradkrucken-sf-router/health.svg)](https://phpackages.com/packages/fahrradkrucken-sf-router)
```

###  Alternatives

[samuell/contenteditor-plugin

Allows you to edit content files on the front-end pages.

403.3k](/packages/samuell-contenteditor-plugin)

PHPackages © 2026

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