Define routes once.

Navigate everywhere.

Sirou (Simple Router) is a framework-agnostic, universal routing and navigation engine for TypeScript. It provides a single source of truth for your application's architecture, ensuring type safety and consistent logic across Web, Mobile, and Server environments.

$ npm install @sirou/core
router.ts
import { defineRoutes } from "@sirou/core";

export const routes = defineRoutes({
  home:      { path: "/" },
  dashboard: { path: "/dashboard" },
  admin: {
    path:   "/admin/:section",
    guards: [isAdmin],
  },
  profile: {
    path:   "/user/:id",
    params: { id: z.uuid() },
  },
});

router.go("profile", { id: user.id });

Why Sirou?

Eliminate fragmented routing logic. Treat your routes as a Centralized Schema that ensures consistency across your entire stack.

Compile-Time Safety

Zero Runtime Typos .

TypeScript catches typos in route names and params at compile time. Get full type safety across your entire routing system.

Universal Adapter

Write Once, Run Anywhere .

One single router instance works identically across React, Next.js, Svelte, React Native, and Flutter projects.

Visual Debugging

Built-in DevTools .

Monitor navigation state, history, and metadata in real-time with an integrated visual developer console.

Zero Flicker

Integrated Data Loaders .

Fetch data before a route renders. Eliminate loading spinners and content flicker for a premium user experience.

Navigation Guarding

Async Route Protection .

Multi-layer protection (Auth, RBAC) that can block or redirect users before navigation even commits.

Infrastructure

Next.js Edge Middleware .

Run your routing guards directly on the edge for zero-latency authorization and hyper-fast redirects.