
Learn how WebSockets provide real-time notifications for web and mobile apps, replacing rest-based polling with instant push updates for ride and multi-user events.
Explore how WebSockets maintain a persistent server-to-client connection in NestJS and Prisma backends to push real-time task notifications to assigned users, with a React frontend displaying toasts.
Install and configure websockets by adding socket.io, alongside NestJS WebSockets and NestJS Platform-Socket.io, to enable seamless websockets in a NestJS backend.
Create a WebSocket based notifications gateway in NestJS, organizing a notification gateway service in a common module. Implement onGatewayConnection and onGatewayDisconnect to handle Socket.IO server events.
Register and track active users by mapping user IDs to socket IDs when browsers connect. Dispatch targeted notifications from the nest.js gateway to the React frontend and manage disconnects.
Create a React application named front-end WebSocket to accompany the NestJS WebSocket integration, then install two dependencies; this React example can be integrated with Angular, Vue, or React.
Learn to connect a React frontend to a websocket server with socket.io client, install dependencies, and implement a notification listener that displays toast messages on notification events.
Demonstrates connecting a frontend to a NestJS backend via web sockets, registering a user, emitting a register event, and receiving toast notifications for active users.
Master web socket communication in NestJS by sending login requests to obtain access tokens, assigning tasks, and delivering real-time task notifications using Prisma-backed back-end.
Learn to implement WebRTC for real-time peer-to-peer video and audio calls, enabling one-to-one calls between team members via signaling on a WebSocket gateway, with back-end first and a React front-end.
Explore WebRTC concepts, including media capture with getUserMedia, peer connections, data channels, signaling, and ICE, and compare real-time peer-to-peer communication with WebSockets.
Use the notification gateway to send offers, answers, and candidates, enabling WebRTC signaling and a one-to-one video call between peers.
Build backend video call events with nestjs and prisma: implement call user, incoming call, answer call, and forward ice candidate via sockets between users and the react frontend.
Build a video call frontend component using React hooks, socket events, and peer connections. Handle incoming calls, set up local media streams, and instantiate the RTC peer connection.
Create a WebRTC peer connection by configuring ice servers for nat traversal, adding local tracks, handling remote streams, and exchanging ice candidates with a remote user.
Handle the call answered by setting the remote description, creating and emitting the answer to the target user, and processing callAnswered and ice candidates.
Learn to render a video component with JSX, wire local and remote video refs, apply styling, and implement a start call flow using a target user ID and offer exchange.
Refactor the login flow in app.js to use a dynamic user ID via prompt, render the video call component, export it, and test the application with a connected user.
Demonstrates a WebRTC video call feature by logging in as users, exchanging IDs, and starting calls between team members A and B with notifications.
Review the code for a WebRTC call flow, handling incoming calls, offers and answers, ICE candidates, and establishing a peer-to-peer connection with local and remote video streams.
Integrate Stripe into a NestJS and Prisma backend to power pricing plans and team management in a project management app, detailing free, pro, business, and enterprise tiers.
Explore tier-based limits for admins to create teams and members, implement a subscription guard and validations, and design a separate Stripe-related subscription model with account setup.
Set up a Stripe sandbox, activate test mode, create recurring plans (pro and business), copy price IDs, and configure env keys and webhook secrets for the frontend on port 3001.
Learn how webhooks notify your backend of checkout session and subscription events from Stripe, create and manage webhook secrets, and test with Stripe CLI.
Begin Stripe integration in a NestJS project by installing the Stripe package and its typings, and adding it as a dev dependency.
Create a subscription model to store stripe IDs, relate to teams so admins can buy credits for a team, manage plans (free, pro, business) with status and cancel period fields.
Generate and apply the subscription model migrations with prisma migrate dev, generate the Prisma client, and create the subscription table in the Postgres database.
Create a billing module with a Stripe service, add a billing controller and a checkout DTO, and expose a post /billing/checkout endpoint to generate a Stripe checkout session.
Create a checkout DTO capturing team ID and price ID from the body, then create a Stripe checkout session with success and cancel URLs, returning the session URL and ID.
Destructure input arguments in a method, extracting team ID, price ID, success URL, and cancel URL as strings, and define a checkout input interface to type them.
Verify or create a Stripe customer for team, obtain the customer ID, then create a subscription checkout session with price and urls, including team ID and metadata, inside a try-catch.
Implement the create checkout session method in the stripe service by initializing Stripe with the secret key and API version from config, and use the NestJS logger for testing.
Implement the EnsureCustomer method to fetch a team's subscription with subscription.findunique using the team ID, then retrieve the StripeCustomerID and ensure proper await usage.
Retrieve or create a Stripe customer and attach its ID to a Prisma subscription, then initialize a new subscription with the team ID and the default free plan, status pending.
Configure a stripe webhook route in nestjs, verify signatures with a raw request body, and handle events like checkout.session.completed and subscription.updated to update status via the stripe service.
Read the stripe session to get the subscription and customer IDs, retrieve full subscription to read the plan, and use metadata to obtain the team ID while handling missing IDs.
Explore handling complete session logic in a NestJS and Prisma backend, including resolving team and customer IDs, finding or creating subscriptions, and mapping Stripe statuses.
Map stripe status to subscription status using a switch, handling active, inactive, cancelled, incomplete, expired, and past due statuses, with error for unhandled cases and mapping to uppercase values.
Implement handleSubscriptionUpdated to read teamID from subscription.metadata and update subscriptions via prisma, setting status, mapStatus, and cancelAtPeriodEnd (default false). Build the frontend to consume checkout and webhook endpoints.
Set up the frontend with a React app, install stripe and stripe-js, and configure react-router-dom routes for success and cancel pages, creating home, success, cancel, and pricing components.
Learn to call a checkout API by posting team and price ID, manage loading and errors, and redirect users to the Stripe checkout url.
Render pricing plans with a click checkout using plan id and price id, showing loading or upgrade text. Render price page in the home component and pass the team id.
Debug the Stripe webhook by starting the Stripe CLI and stepping through checkout sessions, customer created events, and subscription lifecycle.
Explore the transaction page to view the latest transaction and the balance, and verify that the transaction was successfully made.
Integrate paypal into the application to support paypal, pay later, and debit or credit card payments with create order and capture flows, plus a paypal module with webhooks.
Create a PayPal developer account, copy your client id and secret, set sandbox credentials in your env, use ngrok to expose localhost, and configure a /paypal/webhooks route with webhook id.
Install Axios to enable PayPal REST API requests, then configure NestJS main.ts to expose the raw body for PayPal webhooks, ensuring Express raw body handling.
Generate a NestJS paypal module with a controller and service, define a createOrder route using createOrderDTO (amount and currency), import the DTO, and implement paypalService.createOrder.
Create an access token method using axios to call PayPal's auth token endpoint, get the url from config, use client credentials grant with id and secret, and return the token.
learn to obtain an oauth 2.0 access token using client credentials and apply it to axios authentication by sending html form data as a key-value pair to the PayPal api.
Create and capture orders via a token-based API by fetching access tokens, building order bodies with amount and currency (USD default), and using checkout/orders v2 with proper headers.
Capture order with a PayPal webhook endpoint by validating the webhook signature using request headers, extracting the raw body, and verifying transmission details before handling the event.
Implement an async verify and handle event flow for a PayPal webhook by destructuring the raw body and headers, verifying the signature, and handling the event.
Learn to handle PayPal webhook events in a NestJS backend by parsing the raw body, switching on event types like order approved and capture completed, and updating order status.
Integrate PayPal on the frontend with a React checkout button, linked to backend create-order and capture endpoints, using axios and a client ID from env.
Test the backend and frontend by running the backend on port 3001, verify PayPal buttons, and configure a running ng-rock webhook for checkout order approved and checkout order completed events.
Demonstrates loading the PayPal checkout form, creating an order for 10 in the sandbox, and testing with PayPal test cards to confirm a successful transaction.
Debug the complete PayPal flow by tracing create order, capture order, and verify webhook calls, while fixing data orderId case sensitivity and signature validation errors.
Fix the header parameter and test webhook in a NestJS and Prisma backend, detailing create and capture order flows, webhook verification, and checkout order events.
You’ve built a secure, tested, and scalable API. Now, it's time to transform it into a complete product. Part 3 focuses on the high-value features that modern users expect—real-time collaboration, secure payments. This is the course where your project leaves the local machine and becomes a revenue-generating asset available globally.
The Modern Backend Toolkit
This final installment covers the three most challenging and high-demand aspects of modern development:
Real-Time Capabilities: How do applications collaborate instantly, like a live chat or document editor?
Solution: You will master WebSockets and use the NestJS Gateway to enable live, bi-directional communication across your application.
Monetization & Payments: How do you securely handle financial transactions?
Solution: You will integrate Stripe and Paypal, the industry-standard payment processor, to handle subscriptions and checkout flows, turning your API into an e-commerce ready platform.
What You Will Achieve—The Global Launch
By the end of Part 3, you won't just have a portfolio project; you'll have a fully deployed, high-value, multi-service application:
Live Collaboration: Implement real-time updates for your team projects, user status, and notifications using WebSockets.
Video Call: You will learn how to do video-based collaboration using WebRTC
Secure Payment Integration: Develop a full payment module using Stripe, PayPal to manage user subscriptions, checkout sessions, and webhook processing.
This course closes the loop. It turns theory into practice, code into revenue, and your learning into a launched product. If you're ready to add "Full-Stack Deployment," "Payment Integration," and "Real-Time Architecture" to your resume, Part 3 is the essential finale.
Enroll now to launch your Masterclass project globally and prove your full-stack capability!