Next: vsf classic routing

Does anyone know how to setup classic routing with next? I can easily do the server side logic to determine if an url is a category or product. What I’m having trouble with is how to do the nuxt side.

In my case this means

/Cat1/cat2
/Cat1
/Cat1/red
/Cat1/cat2/cat3
/Cat1/product slug
/Cat1/cat2/cat3/product slug

All combination overlap. I’ve got the serverside done, just need help and best practices for the server.