πŸ”΄ Let’s build a ChatGPT Messenger with REACT.JS! (Next.js 13, Firebase, Tailwind CSS, TypeScript)

Sonny Sangha β€’ February 7, 2023
Video Thumbnail
Sonny Sangha Logo

Sonny Sangha

@sonnysangha

About

I'm Sonny. πŸ’― You might also know me as PAPA React! I've been coding for over 10 years now. As a Full Stack developer I've worked both with startups and large corporations to help build & scale their companies. Along the journey I realised my passion existed in helping others excel and pursue their dreams as upcoming developers and if that’s not enough I have cloned most of the applications you have used in your life! 🌟 🚨 Join the world’s BEST developer community β€œZero to Full Stack Hero” NOW: https://www.papareact.com/course

Video Description

πŸ”₯ Save 10% on Hostinger using code SONNY here πŸ‘‰ https://www.hostinger.com/sonny 🚨 Join the world’s BEST developer community & course Zero to Full Stack Hero: https://www.papareact.com/course πŸ«‚ Join my Community, "University of Code" for FREE: https://www.universityofcode.com πŸ”΄ LOOKING FOR THE CODE? πŸ› οΈ https://links.papareact.com/github πŸ“© Want coding problems (with solutions!) delivered to your inbox daily? https://www.papareact.com/dailycodingchallenges Join me as show you how to build a ChatGPT Messenger 2.0 app with Next.js 13. You'll learn the following in this build: πŸ‘‰ How to use the ChatGPT API to create your own AI chat bot! πŸ‘‰ How to use different ChatGPT models when prompting the OpenAI API's πŸ‘‰ Create API endpoints in your Next.js app to securely manage requests πŸ‘‰ Connect Firebase v9 to your Next.js 13 application to create & store REALTIME chats with chatGPT πŸ‘‰ How to build a fully responsive site with Tailwind CSS πŸ‘‰ Leverage the power of Server components in Next.js 13 (and how to use client components alongside them correctly!) πŸ‘‰ How to use the new App folder structure in Next.js 13! πŸ‘‰ Dynamic page routing in Next.js 13 πŸ‘‰ Add HeroIcons to level up your app's UI! πŸ‘‰ How to use TypeScript to reduce the overall number of Bugs and Errors πŸ‘‰ How to deploy the final build on Vercel! πŸ‘‰ How to connect the deployed domain name to a CUSTOM domain name with Hostinger + So Much More! 🎡 WANT TO LISTEN TO THE EXCLUSIVE PAPAFAM PLAYLIST? Sign up for the PAPAFAM Newsletter here πŸ‘‰ https://links.papareact.com/newsletter πŸ‘‡πŸ» FOLLOW ME HERE: Instagram: https://links.papareact.com/instagram Facebook: https://links.papareact.com/facebook LinkedIn: https://links.papareact.com/linkedin Twitter: https://links.papareact.com/twitter Discord: https://links.papareact.com/discord πŸ’° WANT TO SUPPORT THE CHANNEL? Donate here: https://links.papareact.com/donate Grab some PAPA Merch: https://links.papareact.com/merch πŸ• TIMESTAMPS: 00:00 Introduction 01:03 Build Showcase 06:01 Build Tech 08:35 Hostinger Sponsorship 09:50 Zero to Full Stack Hero & University of Code 11:08 Setting up OpenAI API Key (1/3) 13:00 Setting up Firebase 14:45 Setting up Next.js & Tailwind CSS 17:16 Implementing Next.js v13 Features 23:18 Build Layout 27:49 Building the Home Page (1/2) 31:57 Implementing Heroicons 33:59 Building the Home Page (1/2) 39:03 Building the Side Bar Component (1/5) 42:40 Building the New Chat Component 46:16 Building the Side Bar Component (2/5) 49:31 Implementing NextAuth Authentication with Firebase 1:04:23 Building the Login Screen & Functionality 1:14:01 Building the Side Bar Component (3/5) 1:18:01 Setting up & Implementing Cloud Firestore 1:23:34 Implementing Create New Chat Functionality 1:33:13 Connecting to the Cloud Firestore Database 1:37:43 Building the Chat Row Component 1:50:32 Building the Side Bar Component (4/5) 1:52:09 Implementing Delete Chat Functionality 1:55:11 Building the Chat Section of the Home Page 1:58:50 Building the Chat Component (1/3) 1:59:11 Building the Chat Input Component (1/2) 2:08:15 Implementing Messaging Functionality (1/2) 2:11:58 Setting up Type Definitions 2:12:27 Implementing Messaging Functionality (2/2) 2:13:48 Implementing React Hot Toast Library for Notifications 2:21:19 Setting up OpenAI API Key (2/3) 2:35:12 Setting up Firebase Admin 2:43:56 Setting up OpenAI API Key (3/3) 2:50:56 Building the Chat Component (2/3) 2:53:33 Building the Message Component 2:59:03 Building the Chat Component (3/3) 3:05:26 Creating the Model Selection Component 3:05:57 Explaining & Implementing useSWR 3:09:18 Implementing React Select Library 3:15:05 Building the Side Bar Component (5/5) 3:16:43 Building the Chat Input Component (1/2) 3:19:38 Testing Different ChatGPT Models 3:23:33 Deploying to Vercel 3:28:37 Final Build Demo 3:30:20 Implementing a Custom Domain Name using Hostinger 3:36:28 Build Summary 3:38:45 Outro Let’s get it PAPAFAM πŸ”₯. DISCLAIMER: This Video is made for informational and educational purposes only. We do not own or affiliate with ChatGPT, OpenAI or/and any of it's subsidiaries in any form. Copyright Disclaimer under section 107 of the Copyright Act 1976, allowance is made for β€œfair use” of this video for education purposes. #chatgpt #reactjs #nextjs #javascript #openai #javascript #tailwindcss #tutorial #android #reactjs #ai

You May Also Like

Upgrade Your Gaming Setup Now

AI-recommended products based on this video

Loading...
acer Predator Helios Neo 16 Gaming Laptop,16" WQXGA IPS 240Hz 500 nits Display, 14th Gen Intel i9-14900HX, GeForce RTX 4070, 64 GB DDR5, 4 TB SSD, Backlit KB, Win 11 Pro, with Designed Accessories

acer Predator Helios Neo 16 Gaming Laptop,16" WQXGA IPS 240Hz 500 nits Display, 14th Gen Intel i9-14900HX, GeForce RTX 4070, 64 GB DDR5, 4 TB SSD, Backlit KB, Win 11 Pro, with Designed Accessories

(49)
$2,499.99
FREE delivery Jun 17 - 20
Loading...
acer Predator Helios Neo 18 Gaming Laptop, Intel i7-14700HX, NVIDIA GeForce RTX 4070, 18" WQXGA 2560 x 1600 165Hz Display, 64GB DDR5, 4TB Gen 4 SSD, Backlit Keyboard, Windows 11 Pro & MS Office Pro

acer Predator Helios Neo 18 Gaming Laptop, Intel i7-14700HX, NVIDIA GeForce RTX 4070, 18" WQXGA 2560 x 1600 165Hz Display, 64GB DDR5, 4TB Gen 4 SSD, Backlit Keyboard, Windows 11 Pro & MS Office Pro

(34)
$2,499.99
FREE delivery Jun 17 - 20
Loading...
acer Predator Helios Neo 16 Gaming Laptop, GeForce RTX 4070, Intel i9-14900HX, 16" IPS 240Hz 500 nits Display, 64 GB DDR5 RAM, 4 TB SSD, Windows 11 Pro, Office Pro Lifetime License

acer Predator Helios Neo 16 Gaming Laptop, GeForce RTX 4070, Intel i9-14900HX, 16" IPS 240Hz 500 nits Display, 64 GB DDR5 RAM, 4 TB SSD, Windows 11 Pro, Office Pro Lifetime License

(3,551)
$2,499.99
FREE delivery Jun 17 - 20
Loading...
Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

(38,487)
$199.00$187.32
FREE delivery Fri, Oct 3
10K+ bought in past month
Loading...
Mini Mic Pro (Latest Model) - Professional Wireless Microphone for iPhone, iPad, Android, Lavalier Microphone for Video Recording - iPhone Mic Crystal Clear Recording with USB-C for Content Creators
Best Seller

Mini Mic Pro (Latest Model) - Professional Wireless Microphone for iPhone, iPad, Android, Lavalier Microphone for Video Recording - iPhone Mic Crystal Clear Recording with USB-C for Content Creators

(4,360)
$24.99$24.74
FREE delivery Thu, Sep 4 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
Lenovo V15 Laptop | 15.6" FHD Anti-Glare Display | AMD Ryzen 7 7730U | 40GB RAM | 1TB PCIe SSD | HDMI | Type-C | Webcam | Wi-Fi | THUNDEROBOT Wireless Ergonomic Mouse | Windows 11 Pro | Black

Lenovo V15 Laptop | 15.6" FHD Anti-Glare Display | AMD Ryzen 7 7730U | 40GB RAM | 1TB PCIe SSD | HDMI | Type-C | Webcam | Wi-Fi | THUNDEROBOT Wireless Ergonomic Mouse | Windows 11 Pro | Black

(26)
$649.00$636.02
FREE delivery Jun 18 - 23
Loading...
Soundcore Liberty 4 Pro by Anker, Noise Cancelling Wireless Earbuds, 7-Sensor and Real-Time Adaptive Noise Cancelling, 2Γ— Faster Charging, Studio-Level Hi-Fi Music, Clear Calls with 6 Mics and AI

Soundcore Liberty 4 Pro by Anker, Noise Cancelling Wireless Earbuds, 7-Sensor and Real-Time Adaptive Noise Cancelling, 2Γ— Faster Charging, Studio-Level Hi-Fi Music, Clear Calls with 6 Mics and AI

(1,105)
149.99
PrimeFREE delivery Saturday, June 14
1K+ bought in past month
Loading...
DTECH HDMI to VGA Adapter Cable for Computer Monitor PC TV 1080P HD Video (Male HDMI Input to VGA Output Female Connector)

DTECH HDMI to VGA Adapter Cable for Computer Monitor PC TV 1080P HD Video (Male HDMI Input to VGA Output Female Connector)

(40)
3.49
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
Loading...
Lenovo Ideapad Laptop, 15.6" Touchscreen FHD Computer, Intel 10-Core i5-1235U (Beat i7-1195G7), 40GB DDR4 RAM, 2TB PCIe SSD, WiFi 6, Type-C, HDMI, Abyss Blue, Windows 11 Pro S, BEF-ectoy Cable

Lenovo Ideapad Laptop, 15.6" Touchscreen FHD Computer, Intel 10-Core i5-1235U (Beat i7-1195G7), 40GB DDR4 RAM, 2TB PCIe SSD, WiFi 6, Type-C, HDMI, Abyss Blue, Windows 11 Pro S, BEF-ectoy Cable

(11)
$699.99
FREE delivery Jun 17 - 20
Loading...
Funny Cute Mouse Pad with Wrist Rest, Dumpster on Fire Ergonomic Mouse Pads Wrist Support for Desk, Mousepad for Wireless Mouse Gaming Laptop Work Home Desk Accessories Office Supplies Decor

Funny Cute Mouse Pad with Wrist Rest, Dumpster on Fire Ergonomic Mouse Pads Wrist Support for Desk, Mousepad for Wireless Mouse Gaming Laptop Work Home Desk Accessories Office Supplies Decor

(1,045)
7.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
500+ bought in past month
Loading...
acer Nitro V 15 Gaming Laptop, 15.6" 144Hz FHD Display, Intel 10-Core i7-13620H, NVIDIA GeForce RTX 4060, 64 GB DDR5 RAM, 4 TB SSD, Backlit Keyboard, Microsoft Office Lifetime License, Windows 11 Pro

acer Nitro V 15 Gaming Laptop, 15.6" 144Hz FHD Display, Intel 10-Core i7-13620H, NVIDIA GeForce RTX 4060, 64 GB DDR5 RAM, 4 TB SSD, Backlit Keyboard, Microsoft Office Lifetime License, Windows 11 Pro

(827)
$1,659.99
FREE delivery Jun 17 - 20
Loading...
acer Nitro V16 Gaming Laptop, Microsoft Office 2024 Lifetime License, 16" WUXGA 165Hz, AMD Ryzen 7 8845HS Up to 5.10 GHz, GeForce RTX 4060, 64 GB DDR5 RAM, 4 TB SSD, Backlit Keyboard, Win 11 Pro

acer Nitro V16 Gaming Laptop, Microsoft Office 2024 Lifetime License, 16" WUXGA 165Hz, AMD Ryzen 7 8845HS Up to 5.10 GHz, GeForce RTX 4060, 64 GB DDR5 RAM, 4 TB SSD, Backlit Keyboard, Win 11 Pro

(0)
$1,769.99
FREE delivery Jun 17 - 20
Loading...
acer Nitro V 15 Gaming Laptop, Microsoft Office Lifetime License & Windows 11 Pro, 15.6" 144Hz FHD Display, Intel 10-Core i7-13620H, NVIDIA GeForce RTX 4060, 64GB DDR5 RAM, 4TB SSD, Backlit Keyboard

acer Nitro V 15 Gaming Laptop, Microsoft Office Lifetime License & Windows 11 Pro, 15.6" 144Hz FHD Display, Intel 10-Core i7-13620H, NVIDIA GeForce RTX 4060, 64GB DDR5 RAM, 4TB SSD, Backlit Keyboard

(348)
$1,579.99
FREE delivery Jun 17 - 20
Loading...
Ozeino Gaming Headset for PC, Ps4, Ps5, Xbox Headset with 7.1 Surround Sound Gaming Headphones with Noise Canceling Mic, LED Light Over Ear Headphones for Switch, Xbox Series X/S, Laptop, Mobile White

Ozeino Gaming Headset for PC, Ps4, Ps5, Xbox Headset with 7.1 Surround Sound Gaming Headphones with Noise Canceling Mic, LED Light Over Ear Headphones for Switch, Xbox Series X/S, Laptop, Mobile White

(26,227)
$16.14
FREE delivery Sat, Nov 29 on $35 of items shipped by Amazon
7K+ bought in past month
Loading...
Wireless Gaming Headset for PS5, PS4, PC, Mac, Switch, 2.4GHz Gaming Headsets with Bluetooth 5.4, Hidden ENC Noise Canceling Mic, 35H Battery, 3D Spatial Sound, 3.5mm Wired - Black

Wireless Gaming Headset for PS5, PS4, PC, Mac, Switch, 2.4GHz Gaming Headsets with Bluetooth 5.4, Hidden ENC Noise Canceling Mic, 35H Battery, 3D Spatial Sound, 3.5mm Wired - Black

(132)
$14.99
FREE delivery Jul 2 - 6 on $35 of items shipped by Amazon
2K+ bought in past month
Loading...
Funny Cute Mouse Pad with Wrist Rest, Dumpster on Fire Ergonomic Mouse Pads Wrist Support for Desk, Mousepad for Wireless Mouse Gaming Laptop Work Home Desk Accessories Office Supplies Decor

Funny Cute Mouse Pad with Wrist Rest, Dumpster on Fire Ergonomic Mouse Pads Wrist Support for Desk, Mousepad for Wireless Mouse Gaming Laptop Work Home Desk Accessories Office Supplies Decor

(1,045)
7.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
500+ bought in past month
Loading...
UPERFECT Portable Monitor 18.5 inch 120 Hz 100% sRGB 1080P Portable Screen for Laptop w/Smart Cover, VESA & Speakers, Frameless IPS HDR USB-C HDMI Port Gaming Monitor for Smart Phone, Tablet, MacBook

UPERFECT Portable Monitor 18.5 inch 120 Hz 100% sRGB 1080P Portable Screen for Laptop w/Smart Cover, VESA & Speakers, Frameless IPS HDR USB-C HDMI Port Gaming Monitor for Smart Phone, Tablet, MacBook

(1,775)
129.99
PrimeFREE delivery Saturday, June 14
50+ bought in past month