react-router-jam is a file-system/folder-based routing library designed specifically for React Router v7 and Remix frameworks. It provides an intuitive routing system that organizes routes based on your file system structure, making it easier to manage complex routing hierarchies in modern React applications.
The library supports multiple routing conventions including index routes with page.tsx files, nested routes through folder structures, dynamic segments using [param] syntax, splat routes with [...param] for catch-all paths, layout routes with layout.tsx files, route groups using _folder naming, and not-found routes for handling 404 errors. It automatically creates pass-through layouts when directories don't have explicit layouts and supports TypeScript (.tsx, .ts) and JavaScript (.jsx, .js) file formats.
Routes are defined based on the file system structure in the routes directory, with automatic colocation support that ignores files not matching routing conventions. The system uses a specific matching priority where static routes take precedence over dynamic segments, which in turn take precedence over splat routes. This allows developers to co-locate static and dynamic routes within the same directory while maintaining proper route resolution.
The library includes configuration options such as rootDirectory specification and ignoredFilePatterns for excluding specific files or directories from route generation. It uses minimatch for glob pattern matching when ignoring files, enabling developers to safely co-locate components, styles, and tests alongside their route directories without affecting the routing structure.
react-router-jam is particularly useful for React developers working with React Router v7 or Remix who prefer folder-based organization over flat file structures. It provides a more intuitive way to manage complex routing hierarchies while maintaining compatibility with modern React development practices and tooling.
admin
This library is designed for React developers working with React Router v7 or Remix frameworks who prefer intuitive folder-based routing over flat file structures. It targets developers building complex applications that require organized routing hierarchies, dynamic route handling, and shared layout management.