Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
React Next.js Rest API Backend Typescript Course 2025
Rating: 4.0 out of 5(4 ratings)
344 students

React Next.js Rest API Backend Typescript Course 2025

Master Next.js 15, Prisma, MongoDB & TypeScript by Building a Secure Job Board API with Authentication, Zod Validation &
Last updated 11/2025
English

What you'll learn

  • Build a complete RESTful Job Board API using Next.js 15 App Router, with route groups, dynamic routes, and a clean, scalable project structure.
  • Implement secure login with JWT tokens and protect all API routes using Next.js Middleware with support for job seeker and employer roles.
  • Use Prisma with MongoDB to handle models, perform full CRUD operations, and run simple or multi-model transactions like a pro.
  • Validate all request data with Zod schemas to ensure clean, accurate input before saving anything to the database.

Course content

1 section45 lectures6h 58m total length
  • Introduction1:47
  • Create a Next.JS Project4:41

    Open a project folder, install a specific Next.js version (15.2.1) with npx create dash next app, and verify the setup by running npm run dev inside the project folder.

  • Installing PRISMA ORM1:19

    Install Prisma at version 6.4.1 to avoid incompatibilities with different Next.js versions. Run npm i prisma@6.4.1 @prisma/client@6.4.1 and verify the Prisma client and Prisma versions.

  • Creating ROUTE GROPUS1:55

    Learn to create route groups in Next.js by organizing api folders into auth and app, which don't appear in the URL, and access endpoints like get all.

  • GET REQUEST Introduction8:13

    Learn how to create a get request endpoint in Next.js, handle it asynchronously, and return a JSON response with NextResponse.json.

  • POST REQUEST Introduction2:00

    Explore creating a post request alongside get requests, wiring a saving data endpoint in route.ts, and testing with Thunder Client to observe a 405 method not allowed error.

  • Creating MONGO DB PROJECT4:27

    Register a free MongoDB account, create a project and a cluster, choose a free deployment near Cape Town, and connect MongoDB to Prisma using VS Code.

  • Connecting PRISMA with MONGO DB12:25
  • Creating Prisma USER MODEL4:07
  • Creating Prisma USER TYPE ENUM1:54

    Define a Prisma user type enum with values seeker and employer, assign default seeker for new users, and align the type field with the API and UI constraints.

  • Creating Prisma POST MODEL3:51
  • Creating Prisma User and Post RELATIONSHIP8:23
  • Creating a Prism POST CATEGORY ENUM2:45

    Create a category enum for a prism post in a React Next.js TypeScript backend, with a general default and languages like JavaScript, PHP, React, Next.js, React Native, and Python.

  • PUSHING Prisma Models to MONGO DB2:14

    Push Prisma models to MongoDB and sync schemas with Prisma db push, updating Shopify and Post models and refreshing the job B5 project to reflect the new schema.

  • Creating PRISMA CLIENT SINGLETON9:13

    Discover how to implement a prisma client singleton in a Next.js app by creating a lib singleton prisma module that exports one prisma instance to power a sign-up endpoint.

  • Creating SIGNUP ROUTE19:12
  • Receiving SIGNUP data from the CLIENT5:03

    Learn how to receive signup data from the frontend in a Next.js app, extract JSON from the incoming request, await the data, and return it as a JSON response.

  • ZOD VALIDATION - Signup Data10:34
  • USER EXIST VALIDATION - Signup Route16:12

    Validate signup data against the schema to ensure correct structure and data types. Check for an existing user with Prisma find unique on email, and store only if unique.

  • PASSWORD ENCRYPTION - Signup Route8:51
  • Generation JWT - Signup Route14:38

    Learn to generate a JSON web token for signup, sign it with a secret key, set expiration, and return it to secure the API.

  • Creating a Reusable JWT GENERATOR MENTHOD10:34
  • Refining JWT DATA7:03
  • Creating Reusable API SERVER RESPONSES19:53
  • Creating a SIGNIN Route12:52

    Create a sign in route in a Next.js api under auth, validate email and password with Zod, infer client data types, and handle bad requests and user checks with Prisma.

  • SIGNIN continued12:49

    Sign in flow continues by validating the user with bcrypt, generating a jwt token from minimal user data, and returning an unauthorized message for invalid credentials.

  • Creating ADD POST route19:00
  • ADD POST continued6:27

    Use a singleton Prisma to create a post, return the created item when success is true, and verify it in MongoDB while sending API errors for failure.

  • Creating GET ALL POSTS route6:23

    Create a get all posts route using a route.ts file, exporting a sync handler with try/catch, returning API data via prisma find many and testing the get request.

  • Introduction to PAGINATION5:30
  • PAGINATION Query PARAMETERS10:28

    Learn to extract pagination query parameters from the URL using Next.js style search params, convert them to integers, apply defaults for page and limit, and pass them to data fetching.

  • PAGINATION Prisma QUERY12:51
  • PAGINATIONN LOGIC DETAILS16:11

    Develop pagination logic in REST API using page and limit, compute total pages from total posts, and return metadata with next and previous URLs built from the request base URL.

  • PAGINATION Finalization13:44
  • Creating DELETE ACCOUNT Route20:51

    Create a delete account route in Next.js using a dynamic slug to receive the user id, and use Prisma to perform a multi-transaction to delete posts and the user.

  • Creating a DELETE POST Route16:22

    Learn to implement a delete post by ID API route in a Next.js TypeScript app using Prisma, with dynamic routing, existence checks, and proper error handling.

  • Creating a USER UPDATE Route27:59

    Create a dynamic Next.js post route to update user data by id, validate the request body, fetch the user with Prisma, and update fields, hashing the password when it changes.

  • User Update PASSWORD LOGIC8:01

    Validate and refine the user update password logic by testing the endpoint, confirming passwords are hashed, and ensuring name updates apply when a password is provided.

  • Creating POST UPDATE Route10:38

    Create a post update api route with a dynamic post id, validate input against the post schema, and enable optional updates to title, description, salary, location, closing date, and category.

  • UPDATE POST continued3:19

    Learn to align frontend types with the backend schema using Zod validation, fix type mismatches, and implement and test the update post endpoint in a TypeScript React Next.js API project.

  • MIDDLEWARE8:29

    Learn how middleware in Next.js acts as an interceptor between requests and responses, validating JWT tokens before protected endpoints and allowing public routes like sign in and sign up.

  • MIDDLEWARE receive token4:37

    Learn how middleware receives the authorization token from the client via the request header in Next.js server functions and uses a bearer token to secure API endpoints.

  • MIDDLEWARE Extracting TOKEN6:57

    Learn to extract and validate tokens in middleware: detect bearer tokens, split and obtain the jwt, support raw tokens, and apply authorization checks to protect api routes.

  • MIDDLEWARE Verify JWT4:31

    Verify a JWT token in an async middleware using a secret key to validate the payload. Inject user data into the request for endpoint access control and guard against tampering.

  • MIDDLEWARE Completion9:25

Requirements

  • Basic understanding of JavaScript Some familiarity with Node.js or React is helpful, but not required A modern code editor like VS Code Node.js and MongoDB Atlas accounts (we’ll guide you through setup) A willingness to learn by building — step by step, from scratch No advanced knowledge is needed. If you’ve done a bit of frontend or played with JavaScript before, you’re ready to start. This course is designed to guide beginners into full-stack backend development with confidence.

Description

Ready to become a job-ready backend developer? In this hands-on course, you’ll build a fully functional Job Posting REST API using Next.js 15 App Router, Prisma ORM, MongoDB, and TypeScript — a powerful stack used by top companies today.

You’ll learn how to create a modern backend where users can register as Job Seekers or Employers, post jobs, view listings, and manage data with full CRUD functionality. Authentication is handled using JWT tokens with Next.js Middleware to protect routes globally. Passwords are securely hashed with bcryptjs, and all data is validated using Zod schemas to ensure reliability.

We’ll implement pagination to efficiently handle large sets of job posts and improve performance. You’ll also use route groups, dynamic routing, and organize your API using clean architecture and the Prisma Singleton pattern. To simulate real-world development, we’ll explore simple and multi-model transactions for managing complex database operations safely.

This course is beginner-friendly but packed with professional-grade practices that prepare you for freelance work, interviews, or your first developer role.

By the end, you’ll have built a complete backend — and the confidence to build APIs that work in the real world. Course taught by Matthew Msingathi the designer and developer form South Africa

Who this course is for:

  • Beginner and junior developers who want to learn how real-world REST APIs are built using modern tools like Next.js, Prisma, and MongoDB Frontend developers looking to level up and become full-stack by learning backend development fundamentals with TypeScript Self-taught programmers or bootcamp graduates who want to build a solid backend portfolio project that showcases job-ready skills Aspiring full-stack developers preparing for job interviews, freelance gigs, or real startup work Anyone who has basic JavaScript knowledge and wants to learn how to build secure, scalable, production-grade APIs step-by-step