# dannyvankooten/AltoRouter

PHP routing class. Lightweight yet flexible. Supports REST, dynamic and reversed routing.

Repository: https://github.com/dannyvankooten/AltoRouter
Canonical: https://ross.abutalabs.com/products/altorouter
Homepage: https://dannyvankooten.github.io/AltoRouter/
Language: PHP
License: MIT
License Family: permissive
Topics: php, routing
Last push: 2025-01-11T19:21:45+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 1, release rhythm 8, longevity 100
- inputs: {"age_days": 5146, "days_push": 599, "days_rel": 603, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1258, forks 230 (observed 2026-08-28T04:04:09.594470+00:00)

## What it is
AltoRouter is a small, lightweight PHP routing class supporting REST, dynamic named parameters, and reversed routing. It offers flexible regex-based route matching inspired by Sinatra and klein.php.

## Use cases
- route http requests in a small php application
- map dynamic url parameters to controllers
- generate urls from named routes
- support rest-style routing without a full framework
- match custom regex patterns in urls

## When to choose
- you want a tiny, dependency-free router for a php project
- you need reversed routing to generate urls from named routes
- you're building a small app or microsite without a full framework

## When to avoid
- you need a full-featured framework with middleware, dependency injection, and ecosystem
- you're building a large application needing advanced routing features like route groups or automatic caching

## Facets
- artifact type: library
- maturity: maintenance
- function: routing, http-server, middleware
- domain: web-development, backend, apis
- platform: php, self-hosted
- tags: rest-routing, reversed-routing, dynamic-routing, lightweight, sinatra-inspired, web-server

## Member repositories
- dannyvankooten/AltoRouter (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:09.594470+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:05:35.034032+00:00, confidence not recorded.
  - readme: https://github.com/dannyvankooten/AltoRouter (fetched 2026-08-28T04:04:09.594470+00:00, sha 3deb9144010c)
  - homepage: https://dannyvankooten.github.io/AltoRouter/ (fetched 2026-08-29T12:17:10.566205+00:00, sha 29b6b317c440)
- Data as of 2026-08-30T08:39:29.467469+00:00.
