# kriasoft/universal-router

A simple middleware-style router for isomorphic JavaScript web apps

Repository: https://github.com/kriasoft/universal-router
Canonical: https://ross.abutalabs.com/products/universal-router
Homepage: https://kriasoft.com/universal-router/
Language: TypeScript
License: MIT
License Family: permissive
Topics: react, reactjs, routing, router, routes, spa, single-page-app, ssr, server-side-rendering, vuejs
Last push: 2026-01-20T02:40:42+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 63, release rhythm 40, longevity 100
- inputs: {"age_days": 4102, "days_push": 225, "days_rel": 243, "gap_med": 146, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1784, forks 109 (observed 2026-08-28T04:05:35.933437+00:00)

## What it is
Universal Router is a small, middleware-style routing library for isomorphic JavaScript applications, usable on both client and server. Routes are plain JavaScript objects with path, action, and children properties, and it works with any framework such as React or Vue.

## Use cases
- route urls in a single-page app
- share routing logic between server and client
- add routing to a react or vue app without a framework-specific router
- handle nested routes with middleware-style actions
- render pages server-side based on url path
- build a lightweight spa router with plain object routes

## When to choose
- you want a tiny, framework-agnostic router for client and/or server
- you prefer express/koa-style middleware routing
- you need full control over route matching and history handling

## When to avoid
- you need a batteries-included router with data loading, code splitting, and scroll restoration built in
- you want deep framework integration like react-router or vue-router provide

## Facets
- artifact type: library
- maturity: stable
- function: routing, middleware
- domain: web-development, frontend, backend, apis
- platform: browser, cross-platform
- tags: isomorphic, universal-router, spa, ssr, path-to-regexp, framework-agnostic, typescript, nodejs, web-server

## Member repositories
- kriasoft/universal-router (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:35.933437+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-30T03:24:15.802755+00:00, confidence not recorded.
  - readme: https://github.com/kriasoft/universal-router (fetched 2026-08-28T04:05:35.933437+00:00, sha e8ac5cad3999)
  - homepage: https://kriasoft.com/universal-router/ (fetched 2026-08-29T11:03:02.008628+00:00, sha d4a29af2e7a5)
  - site_page: https://kriasoft.com/universal-router/getting-started (fetched 2026-08-29T11:03:02.019099+00:00, sha d1d4a37910c0)
  - registry_npm: https://registry.npmjs.org/universal-router (fetched 2026-08-29T11:03:02.021701+00:00, sha 7ab82121c084)
- Data as of 2026-08-30T08:39:29.467469+00:00.
