{"id":16588364,"url":"https://github.com/mikearnaldi/next-flexible-routes","last_synced_at":"2025-03-21T13:31:07.267Z","repository":{"id":34481332,"uuid":"179695693","full_name":"mikearnaldi/next-flexible-routes","owner":"mikearnaldi","description":"Painless routing for next.js in typescript, strong type inference and flexibility of custom codecs. Ready for serverless too!","archived":false,"fork":false,"pushed_at":"2022-12-10T17:09:03.000Z","size":3980,"stargazers_count":9,"open_issues_count":41,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-18T01:42:38.966Z","etag":null,"topics":["fp-ts","io-ts","nextjs","react","routing","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikearnaldi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-05T14:19:02.000Z","updated_at":"2022-07-28T00:46:50.000Z","dependencies_parsed_at":"2023-01-15T07:30:46.317Z","dependency_job_id":null,"html_url":"https://github.com/mikearnaldi/next-flexible-routes","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikearnaldi%2Fnext-flexible-routes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikearnaldi%2Fnext-flexible-routes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikearnaldi%2Fnext-flexible-routes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikearnaldi%2Fnext-flexible-routes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikearnaldi","download_url":"https://codeload.github.com/mikearnaldi/next-flexible-routes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244806076,"owners_count":20513374,"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","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":["fp-ts","io-ts","nextjs","react","routing","typescript"],"created_at":"2024-10-11T22:56:33.354Z","updated_at":"2025-03-21T13:31:06.751Z","avatar_url":"https://github.com/mikearnaldi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next Flexible Routes [![Build Status](https://travis-ci.org/mikearnaldi/next-flexible-routes.svg?branch=master)](https://travis-ci.org/mikearnaldi/next-flexible-routes) [![Coverage Status](https://coveralls.io/repos/github/mikearnaldi/next-flexible-routes/badge.svg?branch=master)](https://coveralls.io/github/mikearnaldi/next-flexible-routes?branch=master) [![npm version](https://img.shields.io/npm/v/next-flexible-routes.svg?style=flat)](https://www.npmjs.com/package/next-flexible-routes) \nNext Flexible Routes is a library to takle the pain of routing in a next.js app.\n\nWe have been using alternative libraries internally at [CreditSCRIPT](https://www.creditscript.com) for a while and we have fund them very easy to start with but very hard to scale.\n\nThe reason is routing maps tend to change over time and it gets progressively hard to refactor without a strictly typed environment.\n\nWe decided to takle the pain and build a library for our own usage and we ended up deciding to open-source it thinking the community could benefit from it.\n\n## Features\n* Strongly typed link generation\n* Strongly typed parameters and query extraction\n* Minimal API to define routes\n* Maximum Flexibility on deployment\n* Custom (pluggable) codec to encode parameters (Date/UUID/etc)\n* Hash anchor management\n\n## Usage\nExamples can be found in the [with-next-flexible-routes](./packages/with-next-flexible-routes) package\n\n## Showcase\n![Showcase](./docs/images/preview.gif)\n\n## Documentation\nPlease refer to [api-docs](./docs/api.md) and [middleware-docs](./docs/middleware.md)\n\n## Installation\n```bash\nyarn add next-flexible-routes\n```\n\nyou will need additional peer dependencies to be installed:\n\n```\n\"express\": \"^4.16.4\",\n\"fp-ts\": \"^1.15.0\",\n\"fp-ts-contrib\": \"^0.0.2\",\n\"io-ts\": \"^1.8.4\",\n\"lodash\": \"^4.17.11\",\n\"next\": \"^8.0.3\",\n\"path-to-regexp\": \"^3.0.0\",\n\"query-string\": \"^6.4.2\",\n\"react\": \"^16.8.5\",\n\"react-dom\": \"^16.8.5\"\n```\n\nquickly:\n\n```\nyarn add express fp-ts fp-ts-contrib io-ts lodash next path-to-regexp query-string react react-dom\n```\n\n## Contributing\nPull requests are welcome. Please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n\n## Thanks\nHuge thanks goes to the authors of [fp-ts](https://github.com/gcanti/fp-ts), [io-ts](https://github.com/gcanti/io-ts), [fp-ts-contrib](https://github.com/gcanti/fp-ts-contrib), [next.js](https://github.com/zeit/next.js/), and any used library","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikearnaldi%2Fnext-flexible-routes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikearnaldi%2Fnext-flexible-routes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikearnaldi%2Fnext-flexible-routes/lists"}