
Install Node.js and NestJS CLI, generate a NestJS project, and run it on port 3000, then inspect main.ts, app module, controller, and service with Postman.
Create a tag module and tag controller in NestJS, bind the module to the app module with dependency injection, and expose /tags endpoint that returns a mocked array of tags.
Move business logic from the tag controller to a dedicated tag service. Register it as an injectable provider and inject it into the controller to expose a typed find all.
Install Postgres on your machine, choose Postgres over MongoDB for relational data, and set up a database named Medium Clone with a user and privileges via the SQL console.
Configure a Postgres database in a NestJS app using the type or ram wrapper, define host, port, user, password, and database, install postgres package, and bind the module with forRoot.
Define a tag entity as a class decorated with @Entity, including a primary generated id and a name column, to model the tags table in Postgres with automatic synchronization.
Finish implementing the get tags API by wiring a tag repository in NestJS, fetching tag entities from Postgres, and returning a tags array of strings in the API response.
Create a register API in NestJS by building a user module with a post /api/users route, a controller and service, and wiring module, controller, and provider for registration.
Create a user entity in NestJS from scratch, map it to a users table, and hash passwords before insert using a repository pattern, migrations, and a dedicated service and controller.
Generate a jwt token with NestJS by signing a payload using the jsonwebtoken library and a secret, then build a user response that includes the token.
Implement a login endpoint at /api/user/login that accepts email and password, uses same validation pipes, verifies the password via hashing, and returns the user response with a token as registration.
NestJS auth middleware that decodes token from the authorization header, fetches the current user via a user service, and attaches it to the request.
Create a custom user decorator in NestJS that extracts the current user from the request using create param decorator and execution context.
Create the article module in a NestJS project, wiring a controller and service, and define the article entity with fields and timestamps, then generate migrations and test the create route.
Implement a complete create article flow in NestJS: authenticate, read current user, map the create article dto to an article entity, and save with a user relation.
Polish create article by adding an article response wrapper and a build article response function, then implement a backend slug generator using slugify for unique, lowercase, dash-separated slugs.
Implement a dynamic get article by slug API in NestJS by reading the slug with the Param decorator and fetching the article from the service to return the article data.
Update an article using a put request to /api/articles/{slug}, enforcing all fields. Read slug and user id, validate, update via the article service, and return a normalized article.
Learn to build a dynamic article feed in NestJS using TypeORM's query builder, enabling tag and author filtering, pagination (limit and offset), sorting by recent, and optional authentication.
Implement delete article from favorites in the NestJS API, mirroring add-to-favorites logic. Add a favorited filter for article queries and compute the current-user favorited flag.
Learn to seed a NestJS database by creating a seeds folder, configuring a seed migration, and running a seed command to populate users, tags, and articles.
Learn to build a profile endpoint in NestJS API from scratch by creating a profile module, controller, and service that returns a user profile with username, biography, image, and following.
Learn how to implement user following in NestJS by creating a dedicated follows table, handling follow and unfollow endpoints, authenticating requests, and returning profile with follow status.
Implement the current user feed by returning articles from followed users, gated by login, with limit and offset, ordered by recent.
Learn to build a custom backend validation pipe in NestJS that formats validation errors for frontend consumption, transforming and normalizing error output across controllers.
Learn frontend testing by wiring an Angular frontend to a NestJS api, enabling cors, configuring development urls, and validating registration, login, article creation, and feed interactions.
Master the NestJS course by applying controllers, services, and Postgres migrations with data seeding. Tackle the homework to implement article comments and start own project with roles or admin features.
In this course we will build a Medium clone API using NestJS, Typescript, Typeorm and PostgreSQL. This course is fully focused on fast and deep dive into creation of API for real application with NestJS. We will start from scratch and step by step you will get close to finished real application. You will deeply understand how to structure your application, build reusable and understandable modules and services and split code into smaller chunks of code. We will write code together in efficient way to make it pure and avoid data complexity.
For each lesson you'll get source code of the lesson, so it's easy to see the progress and get a working app on any lesson you want.
What you will learn in this course:
Structure and configure project
Write high quality code with NestJS on real project
Create reusable modules, controllers and services
Implementing authentication
Deeply understand NestJS design patterns
No prior knowledge except of Javascript is needed (because I will teach you everything from basics) but if you have experience with any of this (Angular/NodeJS/Express/Typescript/Typeorm/PostgreSQL) it will be easier for you to go through this course.
If you are feeling like you learned NodeJS but you still still missing knowledge of how to build your own real application this course is what you need. This course is fully focused on creating the application without getting deep into basic knowledge of NodeJS!