Learn NextJS 13 by Building a Modern Full-Stack OpenAI Chatbot @joshtriedcoding
Learn NextJS 13 by Building a Modern Full-Stack OpenAI Chatbot  @joshtriedcoding
Uploaded April 2023 | Updated December 2026, 3 hours ago
Let's become amazing web devs together! In this single video, we'll build a super useful customer support chatbot using OpenAI's ChatGPT. It's an awesome portfolio piece to have because it shows your ability to create interactive web apps that solve real-world problems.

The best features:
- Real-time streamed chatbot responses
- Optimistic updates for the best UX
- Secured, rate-limited API routes to prevent abuse
- Graceful error handling
.. and many more!


--- Project links
⭐ Upstash for API route security: upstash.com/?utm_source=Josh2
⭐ GitHub repository (star if you're cool): github.com/joschan21/bookbuddy
⭐ OpenAI: openai.com
⭐ My GitHub: github.com/joschan21
⭐ Discord: discord.gg/4vCRMyzgA5

Thank you to Upstash for sponsoring this video. I've used their rate-limiting service before they reached out and it fits super well into this build to secure our OpenAI API route.

How to use the "FC" snippet I keep using in the video:
Step 1: Paste the following into your Settings; User Snippets; typescriptreact.json: pastebin.com/PWzQGH08
Step 2: Type "fc" and hit TAB.
Step 3: If you still can't figure it out, here's me explaining it in detail: youtube.com/watch?v=Dert_kpLWE0&ab_channel=Joshtriedcoding

Timestamps:
0:00 Introduction
0:47 What you'll learn & demonstration
4:17 Project setup
10:28 Creating our collapsed chat
26:51 Creating our chat input
54:38 Setting up our API route
1:03:47 Prompting & metadata for the chatbot
1:06:40 Implementing real-time response streaming
1:35:50 Creating our context & why bother
1:57:00 Creating our ChatMessages component
2:14:57 Properly rendering the chat responses
2:30:10 Implementing graceful error handling
2:33:27 Last tweaks
2:36:53 API rate-limitation with Upstash
2:46:15 We're all done! Good job.
Learn NextJS 13 by Building a Modern Full-Stack OpenAI ChatbotI Wish I Had Done This WAY EarlierThis is TypeScripts Most Powerful KeywordReact Server Components Are WeirdMake Your Website Look MUCH Better in MinutesSemantic Search: Find What You Mean, Not What You Type!Build a Modern Analytics Dashboard with Next.js 14, React, Tailwind - 2024I Got a Job at Upstash...Web Design vs Web Development: Why I chose the latterBuild and Deploy a Full Stack Realtime Chat Messaging App with NextJS 13I Never Want To Fetch Data Any Other WayTypeScript Got a New Utility Type
Josh tried coding |

Learn NextJS 13 by Building a Modern Full-Stack OpenAI Chatbot

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER