Category: NestJS

JavaScript NestJS TypeScript

API with NestJS #36. Introduction to Stripe with React

This entry is part 36 of 37 in the API with NestJS

Nowadays, a lot of web applications accept online payments. Although this is not straightforward to implement, there are some ready-to-use solutions that we can take advantage of. In this article, we look into Stripe. It serves as a payment processing platform that does the heavy lifting for us. To implement it, we use NestJS and […]

JavaScript NestJS TypeScript

API with NestJS #33. Managing PostgreSQL relationships with Prisma

This entry is part 33 of 37 in the API with NestJS

As applications grow, the number of different entities also increases. A crucial part of learning how to design a database is creating relationships between them. This is because our entities will often relate to each other in some way. Relational databases such as PostgreSQL are an industry standard for quite some time now. Although there […]

JavaScript NestJS TypeScript

API with NestJS #31. Two-factor authentication

This entry is part 31 of 37 in the API with NestJS

While developing our application, security should be one of our main concerns. One of the ways we can improve it is by implementing a two-factor authentication mechanism. This article goes through its principles and puts them into practice with NestJS and Google Authenticator. Adding two-factor authentication The core idea behind two-factor authentication is to confirm […]

JavaScript NestJS TypeScript

API with NestJS #30. Scalar types in GraphQL

This entry is part 30 of 37 in the API with NestJS

With GraphQL, we model our API as a graph. Within a schema, we have various types of nodes that can relate to each other. While the fields in our query might have sub-fields, at some point, we want to work on concrete data. We refer to the type that describes an individual value as the […]

JavaScript NestJS TypeScript

API with NestJS #29. Real-time updates with GraphQL subscriptions

This entry is part 29 of 37 in the API with NestJS

So far, in this series, we’ve used GraphQL both to fetch and modify data. While this covers many real-life cases, modern applications often include situations in which users need immediate feedback when some event occurs. One of the solutions suggested by the GraphQL team is polling. In this technique, the client periodically requests the API for […]