Hi everyone ๐
If you enjoy Fastify’s performance but sometimes miss the developer experience of file-system routing, this project might interest you.
I’ve been working for some time on @syora/fastify, a library that brings the Convention over Configuration approach to Fastify.
๐ How it works
Instead of manually declaring and importing routes, hooks, and plugins, everything is inferred from your project’s directory structure.
The key idea is that everything happens ahead of runtime. During startup, @syora/fastify scans your project, generates optimized manifests and TypeScript type definitions, and then Fastify only loads those generated files.
๐ The result is no filesystem scanning while handling requests, while preserving Fastify’s API and performance characteristics.
For example, this structure:
api/
users/
index.ts
[id].ts
[id].post.ts
middlewares/
auth.ts
plugins/
cors.ts
Enter fullscreen mode Exit fullscreen mode
…automatically generates the corresponding routes, middleware registrations, and plugin registrations.
The goal isn’t to replace Fastify, but to provide a convention layer for developers who enjoy this style of developmentโsimilar to frameworks like Nuxt or Next.jsโwhile staying true to Fastify’s philosophy.
The project has just reached v1.1.0, and I’d really appreciate your feedback:
- Do you think this approach makes sense for real-world applications?
- Can you spot any technical limitations, edge cases, or trade-offs that I may have overlooked?
- What features would you consider essential for the project’s next steps?
If you’re curious, you can find the project here:
๐ GitHub Repository
Feedback, suggestions, and contributions are all very welcome.
And a huge thank you to the entire Fastify team for building such an amazing ecosystem. โค๏ธ
fastify typescript node opensource
๋ต๊ธ ๋จ๊ธฐ๊ธฐ