
Explore the basics of TypeScript, a typed superset of JavaScript that compiles to plain JavaScript, with practical examples of types, interfaces, classes, and boolean and string types for web development.
Explore TypeScript’s type system, including the any type, numbers, built-in primitives (string, boolean, void, null, undefined), and user defined types like arrays, classes, and interfaces.
Master declaring and using variables in TypeScript with let and const, and define types like string, number, arrays, tuples, enums, unknown, never, void, null, undefined, and object.
Explore TypeScript operators, including arithmetic, relational, logical, assignment, and type operators. Apply decision making with if, else, nested if, switch, and loops like for, while, and do while.
Explore how functions build rideable, maintainable, and reusable code. Define, call, and return values, use parameters with defaults and rest parameters, and implement anonymous and arrow functions.
Learn how interfaces declare members and enforce contracts for objects, listing properties, methods, and events without implementations. See person interface examples, function types, union types, and optional members.
Explore TypeScript classes, including constructors, this, and instance methods. Learn inheritance, encapsulation, and interfaces through car and circle examples, plus static members and access modifiers.
Learn modular design in a mean stack app by exporting and importing modules, wiring circle and calculator classes, and exporting actions and interfaces to share code across files.
Explore generics in TypeScript, using generic types and identity functions to build reusable components with type parameters like T, U, and interfaces.
Master generics in depth by building generic classes and interfaces, applying constraints, and using multiple types with precise return values, as shown with a generic animal class and logging identity.
Understand decorators as runtime functions attached to class, method, and property, receiving target, key, and descriptor. Build a log decorator and observe calls in a calculator example with experimental decorators.
Explore how to use decorator arguments and the descriptor to intercept method calls, log data, and access original methods in a TypeScript-based MEAN stack app.
Learn to build a configurable decorator with a decorator factory, accept arguments such as a name, an object, and a title, and return a decorator function that uses these values.
Learn how a property decorator automates getters and setters for multiple properties, like first name, by replacing and redefining properties on a person’s prototype with enumerable and configurable attributes.
Master the parameter decorator by configuring target, key, and index to decorate properties like salary and to handle the request body in a MEAN stack app.
Learn to create and apply a class decorator in a mean stack web app, wiring a constructor function to the model decorator and running the project to see the person.
Explore NestJS, a TypeScript-based framework built on Express for scalable server-side applications and APIs. Learn to create a NestJS project, organize controllers and modules, and run with hot reloading at localhost:3000.
Build a product API in NestJS by creating a products controller, configuring routes with decorators, and testing the /products endpoint using Postman.
Access request and response objects in express using decorators, importing them from express to read body, headers, and query parameters, and send json responses.
Define resources by creating post endpoints, update and delete routes, and a find one by id endpoint, test them, and enforce express routing order with regular expressions.
Master how to set status codes and headers with decorators, perform conditional redirection with the redirect decorator, and access route parameters in a mean stack web app.
Build a modern mean stack web app by creating, updating, and listing products, and deleting them via post requests to /products, while connecting to MongoDB or MySQL.
Define a products module and a product service, inject the service into the products controller, and implement a create method that saves new records to an in-memory array.
Learn to extract the request payload in NestJS with a create product dto class. It defines a read-only id, a name, and a price, exported for use in product service.
Implement find all, find one, and delete endpoints in the product service using an array of products and promises, enabling find by id with a predicate and delete by index.
Explore pipes, injectable classes that run before a handler to transform input and validate data, including string to integer transformations and enforcing post request schemas with validation pipes.
Install class-validator and class-transformer, use the built-in ValidationPipe and global pipes to validate a product DTO, enforcing non-empty strings and proper types such as name and price.
Explore the inner workings of the validation pipe, including transform and metadata, and the validate method that converts a plain object to a class instance using class-validator and class-transformer.
Explain how middleware runs before a route handler to enable authentication, logging, and security logic, access request and response objects, support multiple middlewares, and control the response cycle with next.
Create a custom middleware in a common directory, implementing the use method to log a message. Apply it to all product controller handlers or specific routes via the app module.
Implement an HTTP exception filter to catch errors and return a standardized JSON response with a message and status code, optionally logging a timestamp and request details.
Explore interceptors and why they matter in a mean stack app, and build a custom interceptor to modify requests and responses, enabling logging and transforming results.
Implement a transform interceptor to automatically wrap all controller responses in a data property. Use nest interceptors, next(), and map to transform observable responses before sending response to the client.
Connect NestJS to MySQL using TypeORM by defining TypeScript entities, configuring database options in the app module, and enabling automatic schema sync; verify the connection is connected.
Create a TypeORM entity for a products table by exporting a product entity with id, name, and price, using @Entity, @PrimaryGeneratedColumn, and @Column decorators, ready for repository operations.
Learn how to save a new product to a MySQL database using a NestJS TypeORM repository, including dependency injection, forFeature registration, and using create to return the created product.
Define an endpoint to get all products, and implement get by id, delete, and update using promises, repository methods, and update DTOs with validation.
Implement a one-to-one relationship between product and product details. Create a product details entity with part number, dimensions, weight, manufacture and origin.
Implement a one-to-one relationship between product and product details in a mean stack web app, including create, read, update, delete, and synchronization of product details.
Explore building a one-to-many relationship in a mean stack app by linking users to multiple photos, using cascaded create and update, with modules, entities, repositories, and CRUD operations.
learn how to model a many-to-many relationship between questions and categories in a quiz app using a join table, with modules, controllers, services, and repositories in a mean stack setup.
Connect NestJS app to MongoDB using Mongoose. Define user schema and model, implement sign up, store users in the users collection, and encrypt passwords.
Learn how to implement authentication with JSON Web Tokens (JWT) in a blogging app. Verify login credentials and issue a JWT that enables access to protected resources via authorization header.
Implement user signup by checking for existing email, hashing the password with a password hasher service before saving, and returning only the email to confirm account creation.
Implement login by verifying email and password, generate a JWT with user id and email, and return the token to enable authenticated requests.
Protect endpoints with passport by configuring a JWT strategy (passport-jwt) to authenticate requests via JSON Web Tokens, extracting tokens from headers, and leveraging multiple available strategies.
Learn to authenticate users with passport-jwt in a nest.js app, install and configure jwt strategy, implement guards, protect endpoints, and validate tokens and user data.
Install and configure Swagger to generate interactive API documentation for your project, making endpoints, parameters, and authentication visible to front-end and back-end teams, aligned with open API specification.
Document endpoints with swagger by annotating user model with api model decorators, detailing email and password fields, and adding responses (created, forbidden, unauthorized) under the users tag, including token-based auth.
The term MEAN stack refers to a collection of JavaScript based technologies used to develop web applications. MEAN is an acronym for MongoDB, ExpressJS, Angular and Node.js. From client to server to database, MEAN is full stack JavaScript.
The main reason for choosing the MEAN stack over others is because of the use of a common language for both client-side and server-side. Since, all these technologies are written in JavaScript, your web development process becomes neat. Node.js is a platform that brought JavaScript implementation on the server-side. With Angular using JavaScript on the front-end, it becomes easier to reuse code from back-end to front-end.
MEAN stack offers a modern approach to web development. It also makes use of the power of modern SPAs (single-page applications), which does not require entirely refreshing a web page for every server request like most traditional web applications do. Today there is a trend to develop multiple frameworks that correspond to a single programming language and form a full-stack solution. But, as of now, using MEAN stack is a very effective approach to web development.
In this course, we are going to build our backend application Nest.js. Nest.js is a Node.js framework. It is built on the top of Express and Typescript.
Nest.js is a progressive Node.js framework for building efficient, reliable and scalable server-side applications. NestJS is a server-side (backend) application framework beautifully crafted to support developers productivity and make their lives happier. Well, it's not only a framework, it's an enabler of entering the world of advanced engineering concepts such as Domain Driven Design, Event Sourcing, Microservices architecture.
I spent a good few years in my career developing large scale apps and it didn’t let me down any single time. It’s well written, having quality as an objective, modular web framework with a good documentation, delivering nice developer experience. Exactly the same way I’d describe Nest.
NestJs is built on the top of Typescript and Express.js. It also combines some elements of Object Oriented Programming and functional programming.
Here comes NestJS, a framework which is fully written in TypeScript (it supports JS too, but types are good), it’s easily testable and brings in all the necessary stuff you always think about but you don’t know what to choose.
Why NestJs?
NestJS doesn’t try to limit you to a particular way of doing things, it just provides the tooling you need. It doesn’t try to reinvent the wheel, it utilize existing tools you already know. For example, it uses express behind the scenes which makes your app compatible with the majority of express middlewares.
Here are some good reasons why NestJS shines:
Dependency Injection — NestJS provides DI straight out of the box, increasing efficiency, modularity and testability of applications.
Modularisation — NestJS provides a modular structure for organizing code within the same domain boundary into separate modules.
Flexibility — NestJS provides structure, which helps large teams build complex applications and yet comes in as lightweight as possible, so how you want to build is your choice.
Familiar APIs you already know — NestJS is heavily inspired by Angular, it is also quite similar to much established frameworks like Spring and .NET. This provides a shorter learning curve and lower entry threshold for developers.
Community — NestJS is the fastest rising framework, already with 14K stars surpassing HapiJS. Also, with NestJS leveraging on the Angular way of doing things, things can only get better for the community.
In this course, I will teach you the foundations/fundamentals of NestJs. I will teach you how to build RESTFUL APIs step by step. You will also learn how to plan, design and deploy APIs. I have also another separate section of GraphQL.
What you are going to learn in this course?
Typescript Fundamentals
NestJs Fundamentals
Angular Fundamentals
Build RESTFUL APIs with NestJs
Connect REST APIs with Angular
Build Frontend with Angular
Authentication on Angular
Authentication on Backend Application