Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A dev-friendly, SEO-optimized router for modern React applications (github.com/nerds-with-keyboards)
4 points by floydnoel 50 days ago | hide | past | favorite | 1 comment
Hello HN! I wanted to share my open-source project I've been working on, called Routerino. It's an ultra-lightweight, zero-dependency router built specifically for React client-side rendered websites. If you're building with modern tooling like Vite.js or focusing on JAMStack architectures, Routerino aims to be the simplest routing solution. I built it in response to the common frustration of overcomplicated web development. With just React and Routerino, you can ship a full website or application in HTML, just like we used to.

Beyond just routing, Routerino has some powerful built-in features to help make your React sites more SEO and social media sharing friendly right out of the box:

- Automatic support for Prerender tags, allowing your client-side app to serve up proper 301 redirects and 404 status codes to web crawlers for better indexing. No relying on fragile SSR hydration or hash-based routing!

- An integrated CLI tool to generate a sitemap.xml directly from your defined application routes. Keep your sitemap always in sync with your routes with a single command. I use this to generate a fresh sitemap with each build. I couldn't find another router that tackles this (only some abandoned plugins).

- Automatic social media Open Graph (OG) tag population based on your route props, making social sharing of your app's pages look great on Facebook, Twitter, etc.

- Best practice nudges like canonical URL management and robots.txt generation to help your app avoid common SEO pitfalls. My goal is to include support and documentation sufficient for any developer to easily handle SEO concerns.

The goal with Routerino is to create a routing solution that lets React devs focus on building great apps and websites without having to worry about the SEO and social sharing aspects as an afterthought. By baking this functionality in from the start, Routerino helps you build more visible and shareable web applications with minimal extra effort.

I've kept the API surface small and focused, so if you know React, you'll feel right at home with Routerino. The core fits in a single file for easy integration into your build process.

Check out the project on GitHub and give it a star if you think it could be useful! I'd love to hear feedback from the HN community on how to make Routerino an even better tool for the React ecosystem. PRs and suggestions are most welcome.

Happy routing!




Generating a sitemap seems like a good use case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: