PHPackages                             sinso/app-routes - 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. [API Development](/categories/api)
4. /
5. sinso/app-routes

ActiveTypo3-cms-extension[API Development](/categories/api)

sinso/app-routes
================

Easy way to route rest-like URLs to your code

5.0.1(2mo ago)23110.0k↓14.3%6[2 issues](https://github.com/sinso/app_routes/issues)1GPL-2.0-onlyPHP

Since Dec 14Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/sinso/app_routes)[ Packagist](https://packagist.org/packages/sinso/app-routes)[ RSS](/packages/sinso-app-routes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (51)Used By (1)

TYPO3 App Routes
================

[](#typo3-app-routes)

Route any URL to your application.
----------------------------------

[](#route-any-url-to-your-application)

You use this package if you want to route certain URLs directly to your controllers, completely ignoring the TYPO3 page routing.
This is especially useful to create REST APIs.

### Installation

[](#installation)

```
composer req sinso/app-routes
```

### Configuration

[](#configuration)

This package will look for `Configuration/AppRoutes.yaml` files in any loaded extension. Creating this file is all you need to get started:

```
myApp:
  prefix: /myApi/v2
  routes:
    - name: orders
      path: /orders
      defaults:
        handler: MyVendor\MyExtension\Api\OrdersEndpoint
    - name: order
      path: /order/{orderUid}
      defaults:
        handler: MyVendor\MyExtension\Api\OrderEndpoint
```

The class you provide as `defaults.handler` has to implement `\Psr\Http\Server\RequestHandlerInterface`. The routing parameters will be available in `$request->getQueryParams()`.

### Options

[](#options)

Under the hood [symfony/routing](https://github.com/symfony/routing) is used.

Everything that is available as YAML configuration option in `symfony/routing` should work with this package out of the box.

This package offers these additional options:

- `defaults.cache: true` - If true, then responses are cached (see more details below). (default: `false`)
- `defaults.requiresTypoScript: true` - If true, then the `frontend.typoscript` request attribute will be initialized before your handler is called (default: `false`).

### Generate Route URLs

[](#generate-route-urls)

To generate URLs you can use the `Sinso\AppRoutes\Service\Router`:

```
$router = GeneralUtility::makeInstance(\Sinso\AppRoutes\Service\Router::class);
$url = $router->getUrlGenerator()->generate('myApp.order', ['orderUid' => 42]);
// https://www.example.com/myApi/v2/order/42
```

If you need to generate a URL in a Fluid template, there's also a ViewHelper for that:

```

{ar:route(routeName: 'myApp.order', parameters: {orderUid: '42'})}

```

### Configuration Module

[](#configuration-module)

In the configuration module there's an entry "App Routes", that shows all configured routes.

### Server Side Caching

[](#server-side-caching)

- Caching can be enabled per route via configuration `defaults.cache: true`.
- The TYPO3 `pages` cache is used to cache API responses.
- Your request handler will not be called at all if the request can be served from cache.
- Only responses for `GET` and `HEAD` requests can be cached.
- The cache key is built from all query parameters that were matched by your route.
- Any cache tags added to TYPO3's `CacheDataCollector` (`$request->getAttribute('frontend.cache.collector')`) are applied to the cache entry.
- If you have `$GLOBALS['TYPO3_CONF_VARS']['FE']['debug']` enabled, the HTTP response contains headers describing its cache status.
- Responses with `Cache-Control: no-cache` or `Cache-Control: no-store` are not cached.
- Responses with `Cache-Control: max-age=300` overwrite the default TTL of the `pages` cache.

### ETag

[](#etag)

Setting an `ETag` header in your response will enable conditional requests, i.e. the client doesn't need to download the response body if it already has the latest version.

- If your response contains an `ETag` header and it matches the `If-None-Match` header of the request, the response HTTP status will be `304 Not Modified` and the response body will be empty.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance86

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 84.5% 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 ~83 days

Recently: every ~12 days

Total

24

Last Release

67d ago

Major Versions

1.5.0 → 2.0.02023-12-04

2.0.3 → 3.0.02025-06-24

3.0.0 → 4.0.02026-01-22

4.0.0 → 5.0.02026-03-03

v4.x-dev → 5.0.12026-03-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf46b2b60d10ab3445a88c0a03ef66a766199b97f57391281ed3c551a155873a?d=identicon)[sinso](/maintainers/sinso)

---

Top Contributors

[![smichaelsen](https://avatars.githubusercontent.com/u/912435?v=4)](https://github.com/smichaelsen "smichaelsen (49 commits)")[![georgringer](https://avatars.githubusercontent.com/u/1905663?v=4)](https://github.com/georgringer "georgringer (4 commits)")[![amirarends](https://avatars.githubusercontent.com/u/48568142?v=4)](https://github.com/amirarends "amirarends (3 commits)")[![Konafets](https://avatars.githubusercontent.com/u/363363?v=4)](https://github.com/Konafets "Konafets (1 commits)")[![mbrodala](https://avatars.githubusercontent.com/u/5037116?v=4)](https://github.com/mbrodala "mbrodala (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sinso-app-routes/health.svg)

```
[![Health](https://phpackages.com/badges/sinso-app-routes/health.svg)](https://phpackages.com/packages/sinso-app-routes)
```

###  Alternatives

[hn/typo3-mcp-server

TYPO3 extension that provides a Model Context Protocol (MCP) server for interacting with TYPO3 pages and records

708.9k](/packages/hn-typo3-mcp-server)[kitodo/presentation

Base plugins, modules, services and API of the Digital Library Framework. It is part of the community-based Kitodo Digitization Suite.

436.1k5](/packages/kitodo-presentation)[friendsoftypo3/interest

REST and CLI API for adding, updating, and deleting records in TYPO3. Tracks relations so records can be inserted in any order. Uses remote ID mapping so you don't have to keep track of what UID a record has gotten after import. Data is inserted using backend APIs as if a real human did it, so you can can inspect the record history and undo actions.

111.3k1](/packages/friendsoftypo3-interest)

PHPackages © 2026

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