I can't get prismic dynamic pages and routing to work in next.js

First of all, I like prismic so far.
But... it is really hard to find good documentation. I have been struggling for 3 hours now just trying to set up a link from my landing page to a dynamic sub-page (document) i don't know what it is called anymore..
I have set up my routing:

const routes: prismic.ClientConfig['routes'] = [
  { type: 'service', path: '/services/:uid' },
  { type: 'page', path: '/', uid: 'home' },
];

i am using

                  <PrismicNextLink field={item.link}>Learn more → </PrismicNextLink>

to link to the 'document' and clicking recently started working as the href actually contains some information after i changed the type parameter in the routing to the type of the page/document.
Where can i find this documentation? I had to figure it out by trial error.

now, the routing started working but i'm getting 404's. I have published all pages/documents and I am sure i am not running production mode.

did i forget something else? i am not sure because i can't find any documentation on this.

Thank you

Hi @jestersimpps,

Can you tell me which documentaiton you've been using? Have you tried the route resolver documentation?

Best,
Sam