Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.
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

Closed

Description

@imVinayPandya

Hello there

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.

Here is video it will give you an idea about this "clear architecture" https://www.youtube.com/watch?v=CnailTcJV_U

Activity

  1. allella commented on Oct 21, 2019

    @allella
    Contributor

    @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.

  2. added
    DiscussionIdeas, feature requests, views on features. Anything which is a discussion.
    on Oct 24, 2019
  3. allella commented on Oct 25, 2019

    @allella
    Contributor

    @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.

  4. allella commented on Nov 14, 2019

    @allella
    Contributor

    @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

  5. imVinayPandya commented on Nov 15, 2019

    @imVinayPandya
    Author

    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

  6. allella commented on Nov 15, 2019

    @allella
    Contributor

    @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.

  7. QuincyLarson commented on Nov 15, 2019

    @QuincyLarson
    Contributor

    @imVinayPandya Thanks for your suggestions, @imVinayPandya. If you have more specific suggestions, I invite you to open more granular issues about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionIdeas, feature requests, views on features. Anything which is a discussion.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions