Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Mastering NextJS 14 & OpenAI
Rating: 4.6 out of 5(557 ratings)
4,629 students

Mastering NextJS 14 & OpenAI

Build GeniusGPT Full-Stack App with Next.js 14+, OpenAI , Clerk Auth, Prisma, Tailwind, Shadcn-ui DaisyUI, Typescript
Created byYanis Smilga
Last updated 1/2025
English

What you'll learn

  • Build modern Next JS applications
  • Authenticate your Next JS applications with Clerk
  • Store data in database with Prisma and PlanetScale
  • Use OpenAI API in your Next JS Applications

Course content

4 sections153 lectures13h 39m total length
  • Course Resources0:07
  • Discord Channel0:17
  • Introduction to Next.js1:07

    Next.js, the popular react framework, lets you build full-stack apps quickly with routing and server components and server actions, all within a single project.

  • Tutorial Overview1:59

    Build a small Next.js 14 app from boilerplate to deployment on vercel, covering all major building blocks and guiding you through the readme with explanations and challenges.

  • Update !!!0:15
  • Create New Next.js App1:58

    Bootstraps a brand new Next.js 14 app with npx create next app at latest, selects tailwind and app router, skips TypeScript and ESLint, then opens the project for structure review.

  • Files and Folder Structure1:46

    Explore the Next.js 14 project structure, from the app folder for routes and layouts to public assets, node_modules, git ignore, and essential config files and scripts.

  • Home Page4:34

    Explore the Next.js app structure, including favicon, global css, layout.js, and the home page as a server component, exported by default, with tailwind styles on localhost 3000.

  • More Pages1:51

    Learn to add more pages in a Next.js 14 app by creating folders in the app directory, naming them for URL segments, and adding a page file, then test locally.

  • Link Component2:00

    Master the Next.js 14 link component by importing next/link, applying hrefs to navigate between home and about pages, and styling with Tailwind CSS for accessible, responsive navigation.

  • Nested Routes1:51

    Set up nested routes in Next.js by placing an info folder inside about and adding a page.js for the about/info page, noting that missing parent pages yield a 404.

  • Fundamentals Quiz
  • First Challenge3:08

    In the first challenge, build several Next.js pages (client, drinks, Prisma example, query, tasks) and set up the folder structure, then fetch data in a server component.

  • CSS2:30

    Apply global styles using tailwind directives or vanilla css, and speed up styling with Daisy UI built on tailwind, while configuring tailwind plugins and installing necessary dependencies.

  • TailwindCSS9:31

    Apply Tailwind CSS utility classes directly in JSX to control padding, colors, spacing, and layout; explore responsive prefixes, hover effects, and flexbox and grid basics.

  • DaisyUI9:48

    Explore how the Daisy UI library, built on Tailwind, speeds development with components like buttons, dropdowns, modals, and carousels. Learn to switch themes using data-theme for light and dark modes.

  • Layout File4:03

    Explore how the layout.js root layout shares UI across the app, enables nested layouts, and customizes metadata, while noting its non-rerender behavior and data-fetching limits.

  • Navbar Challenge9:37

    Create a navbar component in a components folder and render it in layout.js. Map an array of links with next/link to build the menu, using Daisy UI and Tailwind.

  • Server Component VS Client Component2:06

    compare server components and client components in Next.js, explaining that server components render on the server and client components enable browser features and interactivity with the use client directive.

  • Counter Challenge7:37

    Explore building an interactive counter in Next.js 14, learn to create a client component with use state, fix server versus client rendering, and implement client-side interactivity with daisy ui styling.

  • Fetch Data4:31

    Explore server component data fetching in nextjs 14, using async fetch with options, optionally with axios, and connect to a database to render data and images as ready html.

  • Loading Component3:58

    Learn to implement a loading component in Next.js by creating a loading.js for server components, simulate delay with a promise, handle data fetch and errors, and display a loading spinner.

  • Error Component4:59

    Explore how to implement loading and error states when fetching data in Next.js, including creating a client error component, handling response.ok, and displaying error messages.

  • Nested Layouts3:08

    Set up nested layouts for the drinks segment in Next.js by creating a segment-specific layout.js that wraps children and applies a shared, narrower width for drinks pages.

  • Dynamic Routes3:19

    Learn to implement dynamic routes in Next.js. Build a single drink page under drinks/[id], using the params id to render each item and navigate with a unique identifier.

  • Drinks List - Challenge5:07

    Render a dynamic drinks list in Next.js by wrapping each item in a link to a single drink page, using drink id and name to build routes and display information.

  • Single Drink - Challenge6:16

    Build a single drink page in Next.js 14 by using URL params to fetch a specific drink, then display its title and thumbnail and link back to the drinks list.

  • Static Images5:15

    Discover how the next/image component optimizes static images to speed page loads and prevent layout shifts, demonstrated with a local drink image and alt text.

  • Remote Images5:51

    Configure next.config.js to enable remote images with remote patterns, then restart the server. Provide width and height for aspect ratio and layout stability, and apply tailwind styling with priority.

  • Responsive Images4:31

    Use the fill prop with a display-block, relative parent to create a responsive two-column drinks grid, configuring Next.js image sizes for 768px and 1200px breakpoints with object-cover styling.

  • More Routing6:18

    Master nextjs routing techniques by creating private folders, grouping routes with parentheses, and using catch-all and optional catch-all segments, demonstrated through an auth flow with the Clark library.

  • Prisma Setup5:38

    Set up Prisma with Next.js server actions, configure SQLite for development, switch to SQL in production, install Prisma CLI and client, run npx prisma init, and configure env and gitignore.

  • Prisma Model4:37

    Create a task model in Prisma with id as string primary key and uuid default, content, createdAt with now, and completed false; migrate and open Prisma Studio to manage database.

  • Prisma CRUD9:31

    Learn Prisma crud with a task model: create tasks, fetch all with find many ordered by created at descending, and explore update, delete, and upsert via Prisma client.

  • Display Tasks - Challenge10:43

    Build a dynamic tasks page using server actions and Prisma to add, edit, and delete tasks, while rendering a live list with links to individual task pages in Next.js 14.

  • Server Actions - Info2:13

    Discover Next.js server actions, async server functions called directly from components. Learn how to bypass endpoints and update or create database records using server components with the use server directive.

  • First Server Action8:14

    Learn to implement a first server action in Next.js 14, using form data to create a Prisma task on the server and revalidate the route to refresh the page.

  • Refactor App3:12

    Refactor the app by centralizing get all tasks and create task logic into a server actions file, using use server at the top, Prisma, and revalidate path for cache invalidation.

  • Delete Task5:09

    Learn to implement a delete task server action in NextJS 14, passing id via a hidden form field and revalidating with Prisma, even when JavaScript is disabled.

  • Edit Task - Setup4:50

    Build the edit task workflow by creating an edit form component and an edit page, with actions to fetch task via Prisma findUnique and to submit edits as form data.

  • Edit Task - Complete9:39

    Design an edit task form in a Next.js 14 app, wiring id, content, and completed fields with default values, then update via prisma and redirect to tasks.

  • Pending State5:39

    Implement a pending state to inform users during form submissions, validate inputs, handle errors, and disable the submit button using use form status and server actions in Next.js 14.

  • Error Checking5:37

    Implement robust error checking in Next.js server actions by wrapping prisma calls in try and catch, returning a message object, and showing feedback via use form state.

  • Zod Library2:56

    Master complex input validation with the Zod library in NextJS by installing, importing, and defining an object schema for content with a five-character minimum, plus error handling.

  • Providers5:40

    Learn to implement beautiful in-app notifications with a global providers wrapper, using the React Hot Toast library and configuring libraries like React Query and Redux Toolkit for task feedback.

  • Delete Button - Challenge3:27

    Mastering NextJS 14 & OpenAI teaches adding interactivity to the delete button, implementing a pending state, and disabling it via a separate component.

  • Route Handlers - Info2:34

    Learn how route handlers in Next.js serve as quick serverless endpoints for database actions from the client, alongside server actions. Test these endpoints directly in VS Code using Thunder Client.

  • Route Handlers - GET6:02

    Create an api route with a route.js file inside an api directory, export a get handler to fetch tasks from the database using Prisma, and return the data as json.

  • Route Handlers - POST4:26

    Implement a post route handler in Next.js 14 that reads the request body via await request.json, creates a task with content at /api/tasks, and returns the created task.

  • Middleware5:23

    Learn how to create and configure Next.js middleware to run code before a request, log activity, and selectively redirect or block routes like about and tasks using a matcher.

  • Render (optional)2:18

    Discover how to host your database on the render platform as a free alternative to Planetscale, using a Postgres instance and Prisma to push schema updates to the cloud.

  • PlanetScale5:46

    Host your database on PlanetScale and connect with Prisma. Create a cloud database, configure the dot env and schema.prisma, and push migrations with Prisma DB push.

  • Local Build6:24

    Build and test a Next.js 14 app locally, update build command with npx prisma generate and next build, and compare pre rendered versus server rendered pages before deploying to Vercel.

  • Force Dynamic5:06

    Master dynamic rendering in Next.js by using force dynamic to render the tasks page on the server, addressing static versus dynamic pages, loading states, and accurate real-time updates.

  • Deploy6:24

    Deploy your Next.js app to Vercel, set up GitHub integration, manage env variables, monitor build logs, and understand how pre-rendered static HTML contrasts with loading spinners and caching.

Requirements

  • Knowledge of React

Description

Embark on a journey to mastering modern web development with our comprehensive video course on building applications using Next JS 14 and the OpenAI API. This course is meticulously designed for beginners and intermediate developers who are keen to elevate their skills. You'll start from the ground up by learning how to create a new Next.js app, understand its files and folders structure, and explore the intricacies of routing including link components, nested routes, and dynamic routes.

Immerse yourself in front-end design with TailwindCSS and DaisyUI, and learn to craft responsive layouts, manage themes, and create a unified look for your entire app with layout components. Dive into the backend mechanics with server vs client components, fetching data in server components, handling loading and errors gracefully, and implementing nested layouts

Discover how to enhance your app's functionality with CRUD operations using Server Actions, manage user interactions, and validate data using the Zod library. You'll also learn to integrate a database by hosting with Planetscale and add essential features like authentication with CLERK Service.

By the end of this course, you'll be adept at deploying your NextJS application on Vercel, setting up and toggling themes with DaisyUI, and enriching your app with powerful APIs from OpenAI and Unsplash. Learn how to send prompts, receive responses, and even generate images within your application.

With a hands-on approach, tackle numerous challenges throughout the course to immediately apply your newfound knowledge. This is not just a tutorial; it's a transformative learning experience that will arm you with the tools and confidence to build cutting-edge web applications.

Who this course is for:

  • React developers who want to learn Next JS 14 with OpenAI API integration