Next.js Discord

Discord Forum

How should my Architecture look like (New to next.js)

Unanswered
Black carp posted this in #help-forum
Open in Discord
Black carpOP
Hey i am new to Nextjs and I have to creaete a Project for someone and right now I am on the Architecture of this project.
The Application will get data from 3 apis and is going to store them in a db and showing them in the frotnend, in the backend the data will be cleaded and other little feature should be there like create a comment, create a label, exporting the data in PDF ....
Do I need a seperate backend with Nodejs or can I have everything in one fullstack project but how does my project -architecture look like then? where is my service layer, Repository layer hanlder... located ?

2 Replies

Weevil parasitoid
Hello there. If you need a seperate backend is gonna depend on the size of your project. But from what you wrote i dont think that youre gonna need a seperate one. Nextjs is a fullstack framework and most probably well capable of what youre working on. Do you already have a structure planned out a little bit or have you not started yet? Check the nextjs docs for projectstructure: https://nextjs.org/docs/app/getting-started/project-structure
American black bear
I would use next.js as a backend here depending on what it does and a single database such as postgresql or mongodb depending on what data you are storing from the api.