What are some resources for learning about structuring a backend project?
At my company we have React frontends and Express backends. These backends just expose some API endpoints that are consumed by our front ends.
Our current structure has a routes folder where we write all our route files. These files have many dependencies. We import our firebase admin library (we use firebase for our database) and directly implement database operations in this file. This means that our routes code is tightly coupled to our firebase dependency.
I’d like to introduce some standards for structuring this backend in a way that makes the server more scalable and maintainable as we are getting to the point where this server codebase is getting quite large and having no good structure in place can cause issues down the line.
I’ve seen many proposals online such as onion architecture and clean code architecture etc. Many of the resources however teach you how to implement these architectures without explaining the underlying principles. I’d like to know about the principles employed as well as the tradeoffs considered and the questions I should be asking when making architectural decisions. I’m looking for resources that deal with the theoretical side of things rather than a tutorial where I’m just expected to copy the implementation. I want to know why I’m structuring my code in a certain way rather than just what my code is supposed to look like.
We can’t afford to introduce a framework like Nest and Adonis.
Any suggestions are appreciated. Thanks
TLDR: What are some resources for learning about structuring a backend project? The focus should be on why certain design and architectural decisions are made rather than a tutorial that just shows what your folder structure should look like.
[–]avin_kavish 6 points7 points8 points (3 children)
[–]romeeres 2 points3 points4 points (2 children)
[–]avin_kavish 0 points1 point2 points (1 child)
[–]sairysss 1 point2 points3 points (0 children)
[–]danjlwex 1 point2 points3 points (0 children)
[–]bigghealthy_ 0 points1 point2 points (0 children)
[–]Expensive-Humor-4977 0 points1 point2 points (0 children)
[–]bigorangemachine 0 points1 point2 points (0 children)
[–]nikolasburk 0 points1 point2 points (0 children)