Integrate backend into frontend with Next.com
Unanswered
Himalayan posted this in #help-forum
HimalayanOP
Hey guys, I already have a Fastify backend ready with the routes set up, everything's fine. Now I want to call these routes on the Next frontend, but I don't want to just create a use-hook.ts file and call fetch() and be done with it. I'd like project examples, like in the pictures. Something well-structured.
6 Replies
@Himalayan Hey guys, I already have a Fastify backend ready with the routes set up, everything's fine. Now I want to call these routes on the Next frontend, but I don't want to just create a use-hook.ts file and call fetch() and be done with it. I'd like project examples, like in the pictures. Something well-structured.
you can do it exactly like you see it on your pictures. Nextjs is nothing special in that point of view
HimalayanOP
but i didn't this example of picture nor files
@Himalayan but i didn't this example of picture nor files
there are some common patterns, that people using all over the world. Some of the most attractive ones are here: https://nextjs.org/docs/app/getting-started/project-structure#examples
@Cuban Crocodile https://github.com/Ilya-Valasiuk/nextjs-react-query-structure
Like this?
HimalayanOP
yeah like that
@B33fb0n3 there are some common patterns, that people using all over the world. Some of the most attractive ones are here: https://nextjs.org/docs/app/getting-started/project-structure#examples
HimalayanOP
no, not like "how to structure folders"