You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
Consider using uncle bob's clean architecture for Api #116
I am happy that freeCodeCamp has taken this initiative, and i am very glad to contribute in this awesome project. Recently i have come across "uncle bob's clean architecture". I found it very developer friendly and it will help to use TDD (Test Driven Development) process. I am curious that, what kind of Api architecture we will be using in this project?
I am suggesting "uncle bob's clean architecture" for chapter.
If you'd like to review the current API and make suggestions then #47 and #17 are higher level issues where you might get more attention if offering specific frameworks, tools, or suggestions that help to enforce a clean architecture.
@imVinayPandya the tech stack is still being tweaked, but the core elements are defined in the README.
Can you provide information in if any of the frameworks being used are significantly lacking in any of the "clean architecture" facets?
Just skipping through the video I got the impression a lot of the suggestion are based around depencency injection and not coupling dependencies and logic. I suspect most modern frameworks, particularly those which allow for testing, have at least the basics covered in this regard.
@imVinayPandya unless we see specific suggestions then I don't see keeping this issue open.
Are there issues with the current tools which don't follow Uncle Bob's clean architecture? These are popular JS frameworks and tools, so it would seem a lot of best practices would be baked in.
Data Layer -> Postgres w/ Sequelize ORM on top
Frontend -> React or NextJS (comes with NodeJS server API layer option - we can choose to use it or ignore it and use a different ExpressJS backend)
Backend -> Node.js w/ ExpressJS with Swagger for API documentation and (possibly) API contracts
The main goal to use uncle bob's architecture is, writing business logic which is not coupled, use node modules/dependencies in a way which is also not coupled(in future easy to replace with other module), put each and every business logic in separate file and write unit and integration testing (which you have already mentioned).
TL;DR Write future proof code.
For example: If we are considering to use Express.js framework, so framework it self does not suggest or provide coding architecture, that developer need to handle it.
Here is github code from that video https://github.com/dev-mastery/comments-api. i just wanted you to look into their code management along with folder and file structure. I hope it will give you a more idea about this architecture.
@imVinayPandya can you commit to following the related code and suggesting these best practices as the project develops?
I'm afraid reminding people to "use best practices" or "build a secure site" is too general for action and someone will need to be looking out for these concerns on an ongoing basis.
I'm not a JS developer so I don't feel I'll be able to properly ensure these best practices are followed, so we could use the help of someone like you with more experience and a passion for making sure the code is written with Uncle Bob's suggestions in mind.
@imVinayPandya Thanks for your suggestions, @imVinayPandya. If you have more specific suggestions, I invite you to open more granular issues about this.
Activity
allella commentedon Oct 21, 2019
@imVinayPandya the API documentation is being generated by swagger and can be viewed at
https://github.com/freeCodeCamp/chapter/blob/master/api/swagger.json
That came out of #46.
If you'd like to review the current API and make suggestions then #47 and #17 are higher level issues where you might get more attention if offering specific frameworks, tools, or suggestions that help to enforce a clean architecture.
allella commentedon Oct 25, 2019
@imVinayPandya the tech stack is still being tweaked, but the core elements are defined in the README.
Can you provide information in if any of the frameworks being used are significantly lacking in any of the "clean architecture" facets?
Just skipping through the video I got the impression a lot of the suggestion are based around depencency injection and not coupling dependencies and logic. I suspect most modern frameworks, particularly those which allow for testing, have at least the basics covered in this regard.
allella commentedon Nov 14, 2019
@imVinayPandya unless we see specific suggestions then I don't see keeping this issue open.
Are there issues with the current tools which don't follow Uncle Bob's clean architecture? These are popular JS frameworks and tools, so it would seem a lot of best practices would be baked in.
Data Layer -> Postgres w/ Sequelize ORM on top
Frontend -> React or NextJS (comes with NodeJS server API layer option - we can choose to use it or ignore it and use a different ExpressJS backend)
Backend -> Node.js w/ ExpressJS with Swagger for API documentation and (possibly) API contracts
imVinayPandya commentedon Nov 15, 2019
Sorry for late reply @allella
The main goal to use uncle bob's architecture is, writing business logic which is not coupled, use node modules/dependencies in a way which is also not coupled(in future easy to replace with other module), put each and every business logic in separate file and write unit and integration testing (which you have already mentioned).
TL;DR Write future proof code.
For example: If we are considering to use Express.js framework, so framework it self does not suggest or provide coding architecture, that developer need to handle it.
Here is github code from that video https://github.com/dev-mastery/comments-api. i just wanted you to look into their code management along with folder and file structure. I hope it will give you a more idea about this architecture.
Bonus Node.js best practice guide https://github.com/goldbergyoni/nodebestpractices
allella commentedon Nov 15, 2019
@imVinayPandya can you commit to following the related code and suggesting these best practices as the project develops?
I'm afraid reminding people to "use best practices" or "build a secure site" is too general for action and someone will need to be looking out for these concerns on an ongoing basis.
I'm not a JS developer so I don't feel I'll be able to properly ensure these best practices are followed, so we could use the help of someone like you with more experience and a passion for making sure the code is written with Uncle Bob's suggestions in mind.
QuincyLarson commentedon Nov 15, 2019
@imVinayPandya Thanks for your suggestions, @imVinayPandya. If you have more specific suggestions, I invite you to open more granular issues about this.