{"id":32167503,"url":"https://github.com/bartotten/routex","last_synced_at":"2025-10-21T15:32:29.463Z","repository":{"id":160089990,"uuid":"634888385","full_name":"BartOtten/routex","owner":"BartOtten","description":"Build powerful Phoenix routes: localize, customize, and innovate","archived":false,"fork":false,"pushed_at":"2025-10-02T20:31:07.000Z","size":1093,"stargazers_count":50,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T01:10:20.136Z","etag":null,"topics":["elixir","elixir-library","extensible","i18n","internationalization","l10n","locale","localization","phoenix","phoenix-framework","phoenix-liveview","router","translation"],"latest_commit_sha":null,"homepage":"https://bartotten.github.io/routex/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BartOtten.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-01T13:23:06.000Z","updated_at":"2025-10-02T20:26:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"a54fe24c-cbe2-465b-9421-9c1a3a869930","html_url":"https://github.com/BartOtten/routex","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/BartOtten/routex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartOtten%2Froutex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartOtten%2Froutex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartOtten%2Froutex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartOtten%2Froutex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BartOtten","download_url":"https://codeload.github.com/BartOtten/routex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BartOtten%2Froutex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280286369,"owners_count":26304713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","elixir-library","extensible","i18n","internationalization","l10n","locale","localization","phoenix","phoenix-framework","phoenix-liveview","router","translation"],"created_at":"2025-10-21T15:31:59.049Z","updated_at":"2025-10-21T15:32:29.452Z","avatar_url":"https://github.com/BartOtten.png","language":"Elixir","readme":"# \n![Logo of Routex](assets/logo_horizontal.png \"Routex Logo\")\n\n![Coveralls](https://img.shields.io/coveralls/github/BartOtten/routex)\n[![Build Status](https://github.com/BartOtten/routex/actions/workflows/elixir.yml/badge.svg?event=push)](https://github.com/BartOtten/routex/actions/workflows/elixir.yml)\n[![Last Updated](https://img.shields.io/github/last-commit/BartOtten/routex.svg)](https://github.com/BartOtten/routex/commits/main)\n[![Hex.pm](https://img.shields.io/hexpm/v/routex)](https://hex.pm/packages/routex)\n![Hex.pm](https://img.shields.io/hexpm/l/routex)\n\n# Routex: Phoenix route localization and beyond....\n\nRoutex is a comprehensive, batteries included framework built on top of Phoenix,\ndesigned to streamline and empower your routing workflows. By simplifying route\nmanipulation at compile time and enabling the use of custom route attributes\nduring runtime, Routex provides the granular control needed to tackle the most\ncomplex routing challenges.\n\nIts modern, extensible architecture allows for effortless creation of custom\nsolutions, extending its functionality far beyond standard routing.\n\n## Localize Phoenix\nFor developers seeking robust Phoenix localization solutions, Routex excels. It\noffers a suite of extensions enabling internationalization (i18n) and\nlocalization (l10n), including but not limited to seamless support for\ntranslated (multilingual) URLs, locale preference detection at run time and\nsupport for multiple backends.\n\nThe included extension `Localize Phoenix` simplifies Phoenix localization by\ndetecting already used localization packages (Cldr, Gettext or Fluent) and\nautomatically generate routes based on their existing configuration for a\nseamless experience or using your manual configuration for powerful\ncustomization.\n\nThe extension includes an `IANA` based locale registry\nfor robust locale validation and conversion to display names.\n\nForget any notion of difficult setup – localizing your Phoenix application with\nRoutex is a breeze. Just copy the example configuration from our [Localize\nPhoenix using Routex guide](docs/guides/LOCALIZE_PHOENIX.md) for an effortless\nstart.\n\n\u003cp class=\"hidden-at-hexdocs\"\u003e\nThis documentation reflects the main branch. For the latest\nstable release, refer to \u003ca href=\"https://hexdocs.pm/routex/readme.html\"\u003eHexDocs\u003c/a\u003e).\n\u003c/p\u003e\n\n## Benefits and Features:\n\n* **Simplify development:** Routex combines compile-time code generation with\n  dynamic runtime behavior by seamlessly integrating LiveView lifecycle hooks\n  and pipeline Plugs. This enables extensions to provide powerful runtime\n  features such as automatically locale detection and synchronization between\n  the server, client, and LiveView processes- without requiring modifications\n  throughout your codebase.\n\n* **Drop-in solution:** Extensions are highly configurable, allowing you to use\n  Routex features as drop-in solution. For example: Routex can be configured to\n  remain compatible with Phoenix' template generators. As such, it doesn't\n  disrupt standard Phoenix development practices lowering the learning curve. It\n  can also be configured to mimic Cldr-Routes with its tight integration wirth\n  Cldr and use of custom sigils.\n\n* **Optimized Performance:** Positioned between route configuration and\n  compilation, Routex core enhances Phoenix routes without incurring additional\n  runtime costs. Extensions too are optimized for runtime performance, making\n  use of Elixirs superb pattern matching.\n\n* **No dependencies, no state**: Routex is unique in not depending on other\n  libraries and works out-of-the-box without process state. An extension to\n  control third-party libraries that do rely on state such as Gettext is\n  included.\n\n* **Detailed documentation**: Comprehensive, well-organized documentation\n  provides clear guidance on installation, configuration, and best practices,\n  making Routex approachable for developers at all levels.\n\n\n## Give it a try!\n\n**[Online demo](https://routex.fly.dev/)** - have a look or get the\n[code](https://github.com/BartOtten/routex_example/).\n\n\n## Installation and usage\n\n**[Usage Guide](USAGE.md)** - requirements and installation.\ninstructions.\n\n**[Documentation](https://hexdocs.pm/routex)** - from step-by-step guides till in-depth explanations.\n\n\n## Knowledge Base\n\nTo better understand how Routex integrates with Phoenix Router and where it fits\ninto the broader ecosystem, take a look at our in-depth guides:\n\n**[How Routex and Phoenix Router Work Together](docs/ROUTEX_AND_PHOENIX_ROUTER.md)** - \nDiscover the mechanics behind the integration and the benefits of a unified routing system.\n\n**[Routex compared to Phoenix Router and Cldr Routes](docs/COMPARISON.md)** - \nUnderstand the differences, strengths, and tradeoffs when deciding which\nrouting solution best fits your needs.\n\n\n## Extensions\n\nRoutex comes equipped with a extensions that cater to common and advanced use\ncases in Phoenix applications. Each extension is designed to operate\nindependently yet harmoniously with other extensions through the shared\n`Routex.Attrs` system. This flexibility allows you to tailor your routing system\nto your specific needs without resorting to extensive modifications or the\nburden of maintaining a fork.\n\n### Benefits:\n- **Modularity**: Each feature is encapsulated in its own extension, making\n  it easier to manage and maintain.\n- **Flexibility**: Extensions can be enabled or disabled as needed, allowing\n  for a customizable and adaptable routing system.\n- **Interoperability**: By using `Routex.Attrs` to share attributes, extensions\n  can work together seamlessly without being tightly coupled, promoting a\n  decoupled and scalable architecture.\n- **Customizability**: If you have a unique requirement, you can adapt an\n  existing extension -or create your own- without the need to fork or reach\n  upstream consensus on the need and purpose.\n\n### Index\n#### Specialized suites\n- [Localize Phoenix](docs/EXTENSIONS.md#localize-phoenix): Simple localization of Phoenix using auto-detection of \n  localization libs. Combines [Localize Phoenix Routes](docs/EXTENSIONS.md#localize-phoenix-routes) and\n  [Localize Phoenix Runtime](docs/EXTENSIONS.md#localize-phoenix-runtime).\n\n#### Adapters for third-parties\n- [Cldr Adapter](docs/EXTENSIONS.md#cldr-adapter): tight integration with `:ex_cldr` (mimics `cldr-routes` and `cldr-plugs`).\n\n#### Phoenix shims\n- [Verified Routes](docs/EXTENSIONS.md#verified-routes): (Locale) Branch aware variant of Phoenix.VerifiedRoutes.\n- [Route Helpers](docs/EXTENSIONS.md#route-helpers): (Locale) Branch aware Phoenix Helpers.\n\n#### Feature extensions\n- [Alternatives](docs/EXTENSIONS.md#alternatives): Create (nested) alternative routes.\n- [Alternative Getters](docs/EXTENSIONS.md#alternative-getters): List all alternative routes for the current route.\n- [Assigns](docs/EXTENSIONS.md#assigns): Use route attributes as assigns in templates (e.g. `@custom_attribute`).\n- [Attribute Getters](docs/EXTENSIONS.md#attribute-getters): Fetch all custom attributes of any route.\n- [Interpolation](docs/EXTENSIONS.md#interpolation): Use route attributes in route definitions at any place (e.g. `live /page/products/#{language}/:id`.\n- [LiveView Hooks](docs/EXTENSIONS.md#liveview-hooks): Integrate LiveView Lifecycle hooks provided by other extensions.\n- [Localize Phoenix Routes](docs/EXTENSIONS.md#localize-phoenix-routes): Localize Phoenix routes with the help of an [IANA](https://www.iana.org/) based locale registry).\n- [Localize Phoenix Runtime](docs/EXTENSIONS.md#localize-phoenix-runtime): Highly configurable locale detection using multiple sources (StaticView and LiveView).\n- [Plugs](docs/EXTENSIONS.md#plugs): Integrate plugs provided by other extensions.\n- [Runtime Dispatcher](docs/EXTENSIONS.md#runtime-dispatcher): Dispatch to arbitrary functions at runtime using route attributes as arguments.\n- [Translations](docs/EXTENSIONS.md#translations): Translate route segments / full localized URLs.\n\n#### Showcases\n- [Cloak](docs/EXTENSIONS.md#cloak-showcase):  Demonstrates Routex' support for extreme route transformations.\n\n## Development\nContributions to Routex are highly appreciated! Whether it's a simple typo fix,\na new extension or any other improvement.\n\nWant to validate your idea? [Use our discussion\nboard](https://github.com/BartOtten/routex/discussions)\n\n- **clone Routex: https://github.com/BartOtten/routex**  \n  The main branch is the active development branch.\n\n- **clone Routex Example app: https://github.com/BartOtten/routex_example**  \n  Use either the main branch or watch for branches indicating a newer version\n\n- **copy or symlink `routex` into `routex_example`**  \n  This causes the example to use the locale routex\n\n- **enable AST insight in the example app**  \n  Inspecting the helpers generated by Routex' extensions helps a lot\n\n  ```elixir\n  # In routex_example/config/dev.ex\n  config :routex, helper_mod_dir: \"/tmp\"\n  ```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartotten%2Froutex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartotten%2Froutex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartotten%2Froutex/lists"}