
In this lecture, we will take a look at what our result will be.
What is Clean architecture? Some theoretical knowledge before coding.
In this lecture, we will create a project and a folder structure.
In this lecture, we will create a basic express server for our project.
Set up a node.js user entity by wiring index.js as entry and exporting a user class from user.js, with a constructor accepting an object for id, name, lastName, gender, meta.
Add and export a product entity in the Node.js API course, using a single object for name, description, images, price, and color with defaults like price zero.
In this lecture, we will create an order entity class that will follow us in the next steps.
Add an in-memory orders repository for the order entity, export it, and adapt the existing repository patterns from the products and users to support orders, then run tests.
Learn to implement and validate the get user by id use case with tests, using mocks, fake data, and assertions to ensure correct user retrieval in a Node.js API.
Explore a delete user use case test in a Node.js API, demonstrating straightforward integration checks that verify the function returns the expected user data and aligns with repository logic.
Write a product use case test for a Node.js API. Create a test product, mock dependencies, run the use case, and verify the saved product matches the test data.
Add and export a new update product use case in the Node.js API course, following the existing use case structure and reusing a template to implement update logic.
Develop and test the updated product use case by creating test data, calling the update function, and asserting that the repository returns the updated product.
Learn to design and test the create order use case in a Node.js API, covering four use cases, dependencies, and mocks to validate order data.
Explore service contracts and building a consistent response structure for microservices and rest api, including a response class and an error object with status and reason.
Implement a get user by id controller, wire it to the get user by id use case, manage dependencies, and return a json response.
Implement the delete user controller by routing the request to the delete user use case, wrapping the user in an object, and returning a structured response.
Explore building a Node.js API with express routes and user controllers, using in-memory repositories and a rest API for CRUD on users, with error handling and environment-based configuration.
Begin by creating the product controller, wiring routes and dependencies, and connecting the product use case to execute and respond, with error handling using next.
Create the delete product controller and product use case, wire the flow, execute the use case, and use a breakpoint for debugging before moving the product.
Learn how to implement an express error handler that catches crashes, structures a proper response object with status 500 and message, and tests robust error handling in a Node.js API.
Shape business validations for adding an order by ensuring the user IP exists, handling validation errors with structured messages and fields, and integrating optional validation libraries in a Node.js API.
Initialize a Mongo connection with Mongoose by loading environment variables and the connection string, and exporting a connect function. Install Mongoose and log successful or failed connections.
In this course, we will create Node.js basic shop API using Express.js and MongoDB. We will start this journey by understanding what clean architecture means, and right after will dive deep into coding.
We will start this course using in-memory DB and after that will move our app to MongoDB and Mongoose. I made a decision to make the course this way to show you how it's easy to move from one library to another when you are using good architecture.
We will test out the application using jest with the newest test stack and methodologies.
In this course, you will see how to use dependency injections in a really easy format and what it gives you. We will also make business validations for entity creation and updates. I want to show you how to use the response contracts layer to give one look at your every response from the server.
We will create an Application error handler to handle every exception or error and respond to a formatted response.
After every step of this course, you will have hands-on exercises and an answer right after.
Join this course to make a cool Node.js server. Enjoy and be happy :)