Routex is a powerful routing framework build on top of Phoenix Router. It is designed to simplify route manipulation —giving developers a new level of control over route management.
Due to its focus on flexibility, Routex is suited for both small and large-scale projects, allowing for seamless integration into existing codebases or entirely new applications. You simply enable the extensions your project needs or write them yourself without having to worry about the plumbing.
Top Features and Benefits
-
No dependencies, no state: Routex does not require any external dependency and works by default without proces state (e.g. no need for
Gettext.put_locale/1
). -
Powerful transformations: Routex supports advanced route transformations, including everything needed for internationalization (i18n) and localization (l10n).
-
Extension driven: Being extension driven, Routex can be adapted to your specific needs. It’s architecture allows you to write your own routing features without having to worry about breaking existing functionality. Routex ships with extensions covering a wide range of use cases. Have a look at a summary of extensions.
-
Optimized for performance: Built to fit between route configuration and route compilation. Routex enhances Phoenix routing without adding runtime overhead, ensuring that applications run as fast as ever.
-
Detailed documentation: Comprehensive, well-organized documentation provides clear guidance on installation, configuration, and best practices, making Routex approachable for developers at all levels. For example: If you are interested in internationalization (i18n) or localization (l10n) have a look at the Localized Routes Guide.
Drop-in for Phoenix Routes and Cldr Routes
Routex can be configured as a drop-in replacement for both the native Phoenix Routes and Cldr Routes (using an adapter extension). You can give it a try without modifications to your templates, paths and links!
Requirements and Installation
See the Usage Guide for the requirements and installation instructions.
Demo
An app demonstrating various extensions working together to have drop-in support for localized (translated!) url’s without changing a single template.
Demo App - online
Demo App - source code
Links
Hex
Documentation
Source
Comparison with Cldr Routes and Phoenix Routes >= 1.8