# tighten/ziggy

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tighten-ziggy).**

4,291 stars · 269 forks · JavaScript · mit

## Links

- GitHub: https://github.com/tighten/ziggy
- awesome-repositories: https://awesome-repositories.com/repository/tighten-ziggy.md

## Topics

`javascript` `laravel` `routes` `ziggy`

## Description

Ziggy is a frontend routing bridge that exports server route definitions to JavaScript or JSON for use in browser-based applications. It acts as a named route resolver, synchronizing server-defined routes with the client to generate full URLs from named routes without hardcoding paths.

The project includes a TypeScript route generator that creates type definitions for backend routes, providing static type checking and autocompletion. It also provides dedicated integration hooks and plugins for React and Vue to make routing capabilities available within component-based frameworks.

Beyond URL generation, the tool covers frontend route inspection to identify active routes and extract parameters from the URL. It handles model binding resolution to map objects to route parameters and supports Content Security Policy configurations through nonces or JSON output.

Route definitions can be limited using inclusion or exclusion lists to reduce the client-side payload.

## Tags

### Web Development

- [Server-to-Client Route Synchronization](https://awesome-repositories.com/f/web-development/server-to-client-route-synchronization.md) — Synchronizes server-defined routes with the client to generate full URLs without hardcoding paths in the browser.
- [URL Generators](https://awesome-repositories.com/f/web-development/url-generators.md) — Programmatically constructs full application URLs using server-defined named routes and parameters. ([source](https://github.com/tighten/ziggy/blob/2.x/CHANGELOG.md))
- [Backend-Frontend Bridges](https://awesome-repositories.com/f/web-development/backend-frontend-bridges.md) — Acts as a bridge that exports server route definitions to JavaScript or JSON for use in browser applications.
- [React Hooks](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/component-authoring/react-ecosystem/react-hooks.md) — Provides a dedicated React hook to access routing capabilities within functional components. ([source](https://github.com/tighten/ziggy/blob/2.x/CHANGELOG.md))
- [Route Definition Exporting](https://awesome-repositories.com/f/web-development/rendering-templating/server-side-rendering-utilities/server-routing/server-driven-routing/route-definition-exporting.md) — Converts backend routing configurations into JSON or JavaScript files for use by frontend frameworks.
- [Route Manifest Generators](https://awesome-repositories.com/f/web-development/route-manifest-generators.md) — Generates a static JavaScript or JSON manifest of server-defined routes for client-side consumption.
- [Route Definition Strategies](https://awesome-repositories.com/f/web-development/routing-systems/routing/route-definition-strategies.md) — Exports server-side route definitions into formats usable by frontend frameworks to synchronize routing logic. ([source](https://github.com/tighten/ziggy/blob/2.x/README.md))
- [Route Naming Systems](https://awesome-repositories.com/f/web-development/routing-systems/routing/route-naming-systems.md) — Resolves predefined backend route names into full URLs on the client side to avoid hardcoding paths.
- [Server Route Synchronization](https://awesome-repositories.com/f/web-development/server-route-synchronization.md) — Synchronizes server-defined route definitions with client-side scripts to ensure consistent URL generation. ([source](https://github.com/tighten/ziggy/blob/2.x/.gitattributes))
- [Query Parameter Binding](https://awesome-repositories.com/f/web-development/query-parameters/query-parameter-binding.md) — Maps JavaScript objects to URL parameters using registered binding keys or fallback identifiers.
- [Route Validation](https://awesome-repositories.com/f/web-development/route-validation.md) — Ensures that route names and parameters are valid during development using static type checking.
- [Route Parameter Extraction](https://awesome-repositories.com/f/web-development/routing-systems/routing/parameter-handling-utilities/path-parameter-converters/route-parameter-extraction.md) — Retrieves current route parameters and query string values from the URL as strings. ([source](https://github.com/tighten/ziggy/blob/2.x/CHANGELOG.md))
- [Route Model Bindings](https://awesome-repositories.com/f/web-development/routing-systems/routing/parameter-handling-utilities/route-model-bindings.md) — Maps objects to route parameters by resolving identifiers through registered binding keys. ([source](https://github.com/tighten/ziggy#readme))
- [Route Inspection Utilities](https://awesome-repositories.com/f/web-development/url-routing-utilities/route-inspection-utilities.md) — Provides utilities to identify the currently active route and extract parameters from the URL in the browser.

### Part of an Awesome List

- [Frameworks and Integration](https://awesome-repositories.com/f/awesome-lists/devtools/frameworks-and-integration.md) — Integrates server-side routing capabilities into React and Vue through specialized hooks and plugins.
- [Vue Integrations](https://awesome-repositories.com/f/awesome-lists/devtools/vue-integrations.md) — Offers dedicated Vue plugins to make routing available across components via provide and inject. ([source](https://github.com/tighten/ziggy/blob/2.x/CHANGELOG.md))

### Development Tools & Productivity

- [Type Definition Generators](https://awesome-repositories.com/f/development-tools-productivity/type-definition-generators.md) — Automatically generates TypeScript type definitions for backend route names and parameters to enable autocompletion. ([source](https://github.com/tighten/ziggy/blob/2.x/README.md))
- [Manifest-Based Route Matching](https://awesome-repositories.com/f/development-tools-productivity/regular-expressions/route-pattern-matching/manifest-based-route-matching.md) — Matches the browser's current URL against an exported route list to identify the active named route.

### Programming Languages & Runtimes

- [Route Type Generators](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/type-system-tools/type-safety/route-type-generators.md) — Generates type definitions for backend routes to provide static type checking and autocompletion in the frontend.

### Software Engineering & Architecture

- [Framework-Specific Integrations](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/framework-specific-integrations.md) — Provides dedicated integration layers to inject routing capabilities into React and Vue components.
- [Route Name Validations](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/icon-name-validations/route-name-validations.md) — Uses static type definitions and branded types to ensure that only valid route names are passed to routing functions. ([source](https://github.com/tighten/ziggy/blob/2.x/CHANGELOG.md))
