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
visionmedia avatar

visionmedia/page.js

0
View on GitHub↗
7,681 stars·684 forks·JavaScript·31 viewsvisionmedia.github.com/page.js↗

Page.js

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 embedded iframes.

The routing surface covers regex-based path matching, URL parameter extraction, and programmatic navigation. It includes support for hashbang URLs, route redirection, and lifecycle hooks such as exit callbacks for state preservation. Global route middleware provides a mechanism to execute universal logic across all transitions.

Configuration options allow for the definition of base path prefixes and the toggling of browser history binding to control how the application intercepts click events.

Features

  • Route-to-Callback Mapping - Maps specific URL paths or patterns to executable functions that run whenever the browser matches that path.
  • Client-side Routing - Provides a framework for managing navigation and view transitions in single-page applications.
  • Route Pattern Matching - Uses regular expression patterns to map URL paths to specific executable handler functions.
  • Route Middleware - Registers global callbacks that execute on every route change to perform universal tasks.
  • Context Sharing - Utilizes a shared context object to pass data and state between different navigation middleware handlers.
  • Single Page Applications - Manages dynamic content updates and browser history transitions for single-page application architectures.
  • View-to-URL Mapping - Associates URL patterns with executable functions to update application state during client-side navigation.
  • Browser History Management - Provides utilities to synchronize application state with browser history and fragment identifiers.
  • Navigation Interception - Intercepts browser navigation events and click actions to update the UI without reloading the page.
  • Navigation Middleware - Implements middleware pipelines to execute global logic and authentication checks during navigation transitions.
  • Client-Side Routers - Functions as a client-side routing library that maps URL patterns to executable functions in the browser.
  • Express-Style Routers - Implements a routing system based on the middleware callback chain and path-matching patterns of the Express framework.
  • Middleware Chains - Implements an Express-style middleware chain to process navigation requests in sequence.
  • URL Parameter Extraction - Extracts named or indexed variables from URL paths using regular expressions or wildcards to drive application logic.
  • Browser History State Caching - Saves context data to browser history to preserve page content and resources when the user navigates backward.
  • Router Instance Binding - Allows binding independent routing logic to different window or iframe objects to manage separate navigation streams.
  • Iframe Routing Management - Enables independent URL mapping and navigation control within embedded windows or iframes.
  • Navigation - Executes specific callbacks upon navigating away from a path to perform cleanup or preserve application state.
  • Context Object Passing - Implements a shared context object that is passed through the route execution chain to maintain state between handlers.
  • Iframe - Manages navigation and URL mapping within a specific window or iframe independently from the primary browser window.
  • Multi-Window Router Instances - Creates separate router instances to handle navigation independently across different windows or embedded iframes.
  • Hash-Based Routing - Supports client-side navigation using URL hash fragments to switch views without triggering full page reloads.
  • Programmatic Navigation - Provides APIs to trigger route changes programmatically via code.
  • Hashbang Routing - Supports routing via fragment identifiers starting with #! to maintain navigation while preserving clean URL structures.
  • Redirection Rules - Implements rules to redirect users from one URL path to another with optional history cleanup.
  • Routing - Small client-side router inspired by Express.
  • Routing Libraries - Micro client-side router inspired by Express.
  • 路由和链接(Routing And URLs) - Listed in the “路由和链接(Routing And URLs)” section of the Awesome Frontend awesome list.

Star history

Star history chart for visionmedia/page.jsStar history chart for visionmedia/page.js

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

Frequently asked questions

What does visionmedia/page.js do?

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.

What are the main features of visionmedia/page.js?

The main features of visionmedia/page.js are: Route-to-Callback Mapping, Client-side Routing, Route Pattern Matching, Route Middleware, Context Sharing, Single Page Applications, View-to-URL Mapping, Browser History Management.

Which projects share features with visionmedia/page.js?

Projects with overlapping indexed features include: flatiron/director — Director is a routing library for JavaScript that handles URL and command-line pattern matching across client-side,… vuejs/vue-router — Vue.js Client-Side Router is a routing library that maps browser URLs to Vue.js components to enable the creation of… reacttraining/react-router — React Router is a client-side routing library for React that maps browser URLs to specific user interface components.… choojs/choo — Choo is a minimalist frontend framework providing a tiny foundation for building web applications. It functions as an… reactjs/react-router-tutorial — This project is a client-side routing tutorial and learning resource for integrating routing into React web… lhorie/mithril.js — Mithril.js is a JavaScript framework for building single page applications. It functions as a virtual DOM library and…

Projects sharing features with Page.js

These projects share indexed features with Page.js. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • flatiron/directorflatiron avatar

    flatiron/director

    5,575View on GitHub↗

    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 authenticatio

    JavaScript
    View on GitHub↗5,575
  • vuejs/vue-routervuejs avatar

    vuejs/vue-router

    18,898View on GitHub↗

    Vue.js Client-Side Router is a routing library that maps browser URLs to Vue.js components to enable the creation of single-page applications. It functions as a navigation engine that manages browser history and URL state to allow page transitions without full browser reloads. The system utilizes a nested route manager to render hierarchical views that match complex URL structures. It includes navigation guard middleware to intercept, validate, or redirect route transitions before components are rendered. A client-side history handler synchronizes application state with the browser URL using

    JavaScript
    View on GitHub↗18,898
  • 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
  • choojs/choochoojs avatar

    choojs/choo

    6,767View on GitHub↗

    Choo is a minimalist frontend framework providing a tiny foundation for building web applications. It functions as an event-driven application core that decouples business logic from rendering and includes a client-side router to manage browser history and URL mapping without page reloads. The project distinguishes itself through an architecture that combines a server-side rendering engine for generating static HTML strings with a stateful UI component library. This allows for the creation of self-contained interface elements that maintain internal data and persist across global renders. The

    JavaScriptchoodominterface
    View on GitHub↗6,767
  • Compare all 30 related projects→