awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
flatiron avatar

flatiron/director

0
View on GitHub↗
5,575 stars·477 forks·JavaScript·MIT·19 viewsgithub.com/flatiron/director↗

Director

Director is a routing library for JavaScript that handles URL and command-line pattern matching across client-side, server-side, and CLI environments. It provides a unified approach to defining routes as nested object literals, where each key maps to a URL segment and its handler, supporting both hash fragment monitoring and the HTML5 History API for browser navigation without page reloads.

The library distinguishes itself through its ability to operate in multiple contexts with a single routing paradigm. It supports asynchronous handler queue execution for sequential tasks like authentication, lifecycle hooks that run before, after, or once per route match, and recursive route evaluation that fires parent handlers when deeper nested routes are matched. Resource binding maps route definitions to named methods on separate objects for better encapsulation, while path scoping groups related handlers under common URL prefixes.

Director also handles server-side HTTP request dispatching by method and path, with automatic request body parsing and context enrichment for handler functions. Its CLI mode matches command-line arguments against defined patterns and executes corresponding handlers. The router supports token-based URL pattern matching with named parameters and regular expressions, wildcard captures for catch-all routes, and ad-hoc route registration after initialization. Configuration options include recursion direction, strict matching, delimiter choice, and fallback handlers for unmatched routes.

Features

  • Object Literal Route Trees - Defines routes as nested JavaScript object literals where each key maps to a URL segment and its handler.
  • Routers and URL Utils - Matches URL patterns and dispatches requests to handler functions in browser and server environments.
  • CLI Command Dispatchers - Parses command-line arguments against defined patterns and dispatches to corresponding handler functions.
  • Route Pattern Matching - Matches dynamic URL segments using named tokens and regular expressions inside route definitions.
  • Token-Based URL Matchers - Matches dynamic URL segments using named tokens and regular expressions embedded in route definitions.
  • HTTP Request Routing - Matches incoming HTTP request method and path against a routing table and dispatches the associated handler function.
  • HTTP Request Routers - Matches HTTP methods and paths to handler functions for server-side request dispatching.
  • CLI Argument Matchers - Ships a CLI router that parses command-line arguments against defined patterns and executes matching handlers.
  • CLI Argument Matchers - Parses command-line arguments against defined patterns and dispatches to matching handler functions.
  • History API Navigators - Uses the HTML5 History API for cleaner URL navigation without hash fragments in single-page applications.
  • Client-Side Routers - Provides client-side navigation using hash fragments and HTML5 History API without page reloads.
  • Hash Change Detectors - Implements hash fragment change detection to trigger client-side route transitions without page reloads.
  • Hash-Based Routing - Provides hash-based client-side routing that switches views without triggering page reloads.
  • History API Navigators - Provides HTML5 History API navigation for cleaner URLs in single-page applications without hash fragments.
  • Nested Routing - Supports hierarchical route definitions with nested object literals and shared prefixes for modular application design.
  • Client-Side URL Rewriting - Provides client-side URL routing using hash fragments and HTML5 History API for single-page applications.
  • HTTP Route Handlers - Matches incoming HTTP request methods and paths to handler functions for server-side request dispatching.
  • CLI Routers - Ships a CLI mode that matches command-line arguments against defined patterns and executes corresponding handlers.
  • Async Route Handlers - Runs route handlers sequentially with async control flow for tasks like authentication or animations.
  • Path Prefix Groupers - Groups related route handlers under a common URL prefix for shared base path and context.
  • Route-to-Method Binders - Maps route definitions to named methods on separate objects for encapsulated handler organization.
  • Lifecycle Hooks - Runs functions before, after, or once when a route is matched for authentication and cleanup side effects.
  • Handler Execution Queues - Provides a queue-based mechanism for executing route handlers sequentially with async control flow.
  • Sequential Handler Queues - Supports asynchronous handler queue execution where each function passes control to the next for sequential tasks.
  • Dynamic Route Registration - Supports adding route handlers dynamically from different parts of an application after initialization.
  • Recursive Route Evaluators - Fires parent route handlers in forward or backward order when deeper nested routes are matched.
  • Request Body Parsing - Parses incoming request bodies automatically or streams them to handlers without waiting for the end event.
  • Catch-All Path Captures - Supports wildcard captures that collect all remaining path segments after a fixed prefix for catch-all routes.
  • Router Configurators - Configures routing options including recursion direction, strict matching, delimiter, and fallback handlers.
  • Routing - Small, isomorphic URL router.
  • Routing Libraries - Tiny, isomorphic URL router.
  • 路由和链接(Routing And URLs) - Listed in the “路由和链接(Routing And URLs)” section of the Awesome Frontend awesome list.

Star history

Star history chart for flatiron/directorStar history chart for flatiron/director

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Director

These projects share indexed features with Director. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • visionmedia/page.jsvisionmedia avatar

    visionmedia/page.js

    7,681View on GitHub↗

    page.js is a client-side JavaScript router for single-page applications that maps URL patterns to executable functions. It functions as a navigation engine and browser history manager, implementing a middleware-based path-mapping system similar to the Express web framework. The library distinguishes itself through an Express-style router model, utilizing a middleware callback chain and a shared context object to pass data between navigation handlers. It supports advanced window management, allowing for multiple router instances to handle navigation independently across different windows or em

    JavaScript
    View on GitHub↗7,681
  • faceyspacey/redux-first-routerfaceyspacey avatar

    faceyspacey/redux-first-router

    1,554View on GitHub↗

    Redux-first-router is a state-driven JavaScript router library that maps URL paths, query parameters, and browser history directly to actions within a Redux application store. Instead of manipulating components or relying solely on declarative links, it updates the address bar and navigates the application by dispatching and receiving state container actions. The library translates bidirectionally between URL strings and action payloads using expressive route patterns, supporting dynamic path parsing, parameter constraints, wildcards, query strings, and custom formatting rules. It handles asy

    JavaScript
    View on GitHub↗1,554
  • reacttraining/react-routerReactTraining avatar

    ReactTraining/react-router

    56,473View on GitHub↗

    React Router is a client-side routing library for React that maps browser URLs to specific user interface components. It functions as a declarative navigation framework used to manage application state and navigation paths within single-page applications. The library handles the extraction of dynamic URL parameters to render content based on the current browser path. It synchronizes application state with the browser URL, enabling the use of the back and forward buttons and allowing for bookmarking. The framework covers declarative UI navigation and browser history management. It employs URL

    TypeScript
    View on GitHub↗56,473
  • vuejs/routervuejs avatar

    vuejs/router

    4,638View on GitHub↗

    Vue.js Client-Side Router is a routing library for Vue.js that synchronizes the browser URL with application state to enable single-page application navigation. It functions as a URL-to-component mapper, rendering specific components based on the current URL path and dynamic route patterns. The project serves as a browser history manager that controls how internal routes map to the browser URL using various history strategies. It also provides a navigation guard framework to execute logic and access control during route transitions. The library covers dynamic route management, programmatic U

    TypeScriptvuevue-router
    View on GitHub↗4,638
Compare all 30 related projects→

Frequently asked questions

What does flatiron/director do?

Director is a routing library for JavaScript that handles URL and command-line pattern matching across client-side, server-side, and CLI environments. It provides a unified approach to defining routes as nested object literals, where each key maps to a URL segment and its handler, supporting both hash fragment monitoring and the HTML5 History API for browser navigation without page reloads.

What are the main features of flatiron/director?

The main features of flatiron/director are: Object Literal Route Trees, Routers and URL Utils, CLI Command Dispatchers, Route Pattern Matching, Token-Based URL Matchers, HTTP Request Routing, HTTP Request Routers, CLI Argument Matchers.

Which projects share features with flatiron/director?

Projects with overlapping indexed features include: visionmedia/page.js — page.js is a client-side JavaScript router for single-page applications that maps URL patterns to executable… faceyspacey/redux-first-router — Redux-first-router is a state-driven JavaScript router library that maps URL paths, query parameters, and browser… reacttraining/react-router — React Router is a client-side routing library for React that maps browser URLs to specific user interface components.… vuejs/router — Vue.js Client-Side Router is a routing library for Vue.js that synchronizes the browser URL with application state to… chenshenhai/koa2-note — koa2-note is a project focused on Koa2 web server development and Node.js asynchronous programming. It provides a… molefrog/wouter — Wouter is a minimalist client-side routing library for React and Preact. It uses a hook-based system to map URL paths…