DEV Community

oliverlevay
oliverlevay

Posted on

Tips of open source projects that use Next.js?

Hey there,

I've been working on a simple npm package simplifying Next.js routing by creating a routes.js file that reflects the file structure.

A /pages folder that looks like this:

pages
├── users
│   └── [user].js
├── about-us.js
└── index.js
Enter fullscreen mode Exit fullscreen mode

generates a routes.js that looks like this

export const routes = {
  aboutUs: '/about-us',
  home: '/',
  users: { user: { getRoute: (user) => `/user/${user}}` } }
}
Enter fullscreen mode Exit fullscreen mode

The problem that I have is that I'm not sure if it will work correctly for every use case, so I'd like to find some open-source projects that have large and complicated /pages folder that I can test on. Any tips?

Also, would this be useful for any of you?

Latest comments (0)