πŸ”΄ Lets build an AI Collaborative App with NEXT.JS 14! (Realtime Collab, Cloudflare, Clerk, Firebase)

Sonny Sangha β€’ July 16, 2024
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

1️⃣ Get Started with Cloudflare Workers πŸ‘‰ https://links.papareact.com/cloudflare 2️⃣ Get Started with Clerk Authentication πŸ‘‰ https://go.clerk.com/H0xwGD8 3️⃣ Get the Cloudflare Workers Code for free πŸ‘‰ https://www.papareact.com/cloudflare-workers-code 🚨 Join the world’s BEST developer community & course Zero to Full Stack Hero: https://www.papareact.com/course πŸ› οΈ Looking for the Code for my other builds? (Over 50+ others!) https://links.papareact.com/github Join me as I show you how to build it from scratch with the latest Next.js 14. You'll learn the following in this build: πŸ‘‰ How to Deploy serverless Cloudflare workers in SECONDS, combining them with Hono to enable for a full Backend API with cors protection (EASY to follow for beginners) πŸ‘‰ How to implement Real-time collaboration with Live Cursors and Live Rich Text Editing feature using Liveblocks πŸ‘‰ How to create a Sleek Rich Text Editor which embraces realtime conflict-free data types to allow for realtime collaboration! πŸ‘‰ How to build an authentication API route using the app router Route Handler syntax in Next.js πŸ‘‰ How to use Next.js Server Components & Client Components and when/where to use them! πŸ‘‰ How to Integrate OpenAI and Cloudflare AI Models via the use of Cloudflare Workers (To support Chat-To-Document & Summary Translation AI features) πŸ‘‰ How to Integrate Cloudflare AI Workers to translate the Document Summary to any other language! πŸ‘‰ How to Implement Firebase Firestore to store the user’s documents! πŸ‘‰ How to use Clerk Authentication to add User Authentication with ease! πŸ‘‰ Create a Beautiful UI & UX for our Frontend using the highly Popular Shadcn & Tailwind CSS πŸ‘‰ How to use TypeScript to reduce the overall number of Bugs and Errors πŸ‘‰ Create beautiful Dialog prompt’s, Toast Notifications & so much more with ShadCn Components! πŸ‘‰ How to deploy the final build on Vercel 🎡 WANT TO LISTEN TO THE EXCLUSIVE PAPAFAM PLAYLIST? Sign up for the PAPAFAM Newsletter here πŸ‘‰ https://links.papareact.com/newsletter πŸ• TIMESTAMPS: 0:00 Introduction 1:05 Build Demo 6:58 Build Tech & Explanation 11:42 Explaining Cloudflare Workers 19:37 Initialising the Build 23:41 Implementing Shadcn/ui 25:45 Setting Up Clerk for Authentication 31:18 Building the Header Component 42:13 Building the Sidebar Component 52:56 Setting Up Cloudflare & Firebase 56:03 Setting Up Cloudflare Workers with C3 (create-cloudflare-cli) 1:00:19 Implementing Firestore Database 1:03:45 Implementing Firebase Admin 1:09:19 Implementing the Create a New Document Functionality 1:23:59 Building the Sidebar Component for Displaying All Documents 1:40:10 Building the Sidebar Option Component 1:47:17 Building the Home Page 1:47:49 Building the Document Page 1:51:54 Building the Document Component 2:03:04 Implementing the Breadcrumbs Feature 2:10:59 Implementing Liveblocks 2.0 for the Real-time Collaboration Feature 2:18:43 Building the Live Blocks Provider Higher Order Component 2:24:26 Building the Room Provider Component 2:28:26 Implementing the Live Cursor Functionality with Liveblocks 2:35:46 Implementing the Follow Pointer Functionality with Liveblocks 2:48:11 Creating an API Endpoint 2:57:11 Building the Collaborative Document Editor 3:16:57 Implementing the Document Owner Features 3:20:46 Implementing the Delete Document Feature 3:33:51 Implementing the Invite to Document Feature 3:43:01 Implementing User Management Features 3:55:01 Implementing User Avatars 3:59:53 Implementing Cloudflare Workers AI with Hono 4:04:48 Implementing OpenAI API for the Document Translation Functionality 4:27:18 Implementing the Chat to Document Feature with OpenAI Completions API 4:40:49 Live Debugging 4:53:22 Deploying to Vercel 4:59:37 Final Deployed Build Demo 5:04:09 Zero to Full Stack Hero 5:04:40 Outro Let’s get it PAPAFAM πŸ”₯. DISCLAIMER: This Video is made for informational and educational purposes only. We do not own or affiliate with Notion and/or any of its subsidiaries in any form. Copyright Disclaimer Under section 107 of the Copyright Act 1976, allowance is made for β€œfair use” of this video for educational purposes. #nextjs #nextjs15 #realtime #ai #cloudflare #reactjs #notion #javascript #tailwindcss #shadcn #openai #reactjstutorial #coding #tutorial #beginner #programming #chatgpt

You May Also Like

iPhone 13 Must-Haves

AI-recommended products based on this video

Loading...
ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

(5,773)
9.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
1K+ bought in past month
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...
ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

(13,939)
109.99
FREE delivery Saturday, June 14
9K+ bought in past month
Loading...
Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(BlackοΌ‰οΌŒ1pack) ClimatePartner certified

Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(BlackοΌ‰οΌŒ1pack) ClimatePartner certified

(109,961)
$17.99$17.81
FREE delivery Fri, Aug 8 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
amFilm Tempered Glass Screen Protector Compatible with Nintendo Switch 2 7.9" 2025 Alignment Installation Frame Transparent HD Clear Case Accessories Anti-Scratch (3-Pack) (SWTCH2-7.9")

amFilm Tempered Glass Screen Protector Compatible with Nintendo Switch 2 7.9" 2025 Alignment Installation Frame Transparent HD Clear Case Accessories Anti-Scratch (3-Pack) (SWTCH2-7.9")

(15,051)
$7.19
FREE delivery Tue, Jun 24 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
daydayup Switch Case and Tempered Glass Screen Protector Compatible with Nintendo Switch - Deluxe Hard Shell Travel Carrying Case, Pouch for Nintendo Switch Console & Accessories, Streak Red
Amazon's Choice

daydayup Switch Case and Tempered Glass Screen Protector Compatible with Nintendo Switch - Deluxe Hard Shell Travel Carrying Case, Pouch for Nintendo Switch Console & Accessories, Streak Red

(6,725)
$13.89
FREE delivery Mon, Jun 16 on $35 of items shipped by Amazon
1K+ bought in past month
Loading...
JSAUX 3-Pack Tempered Glass Screen Protector for Nintendo Switch 2 (2025), Easy to Install with Guiding Frame Ultra HD Glass Protector 9H Hardness Scratch Resistant Accessories for Switch2

JSAUX 3-Pack Tempered Glass Screen Protector for Nintendo Switch 2 (2025), Easy to Install with Guiding Frame Ultra HD Glass Protector 9H Hardness Scratch Resistant Accessories for Switch2

(178)
$7.58
FREE delivery Sun, Jun 15 on $35 of items shipped by Amazon
4K+ bought in past month
Loading...
ivoler 4-Pack Tempered Glass Screen Protector Designed for Nintendo Switch 2 2025 with [Alignment Frame] Transparent HD Clear[Updated Version] Screen Protector for Switch 2 7.9'' Global Recycled Standard ClimatePartner certified

ivoler 4-Pack Tempered Glass Screen Protector Designed for Nintendo Switch 2 2025 with [Alignment Frame] Transparent HD Clear[Updated Version] Screen Protector for Switch 2 7.9'' Global Recycled Standard ClimatePartner certified

(32,577)
$6.99
FREE delivery Sun, Jan 4 on $35 of items shipped by Amazon
20K+ bought in past month
Loading...
ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

(5,773)
9.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
1K+ bought in past month
Loading...
PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]

PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]

(151,641)
$7.99$6.39
FREE delivery Mon, Sep 29 on $35 of items shipped by Amazon
New on Amazon in past month
Loading...
Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film

Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film

(362,029)
$7.63
FREE delivery Wed, Aug 20 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
Soundcore by Anker Liberty 4 NC Wireless Earbuds, 98.5% Noise Reduction, Adaptive Noise Cancelling to Ears and Environment, Hi-Res Sound, 50H Battery, Wireless Charging, Bluetooth 5.3

Soundcore by Anker Liberty 4 NC Wireless Earbuds, 98.5% Noise Reduction, Adaptive Noise Cancelling to Ears and Environment, Hi-Res Sound, 50H Battery, Wireless Charging, Bluetooth 5.3

(17,954)
89.99
PrimeFREE delivery Saturday, June 14
2K+ bought in past month
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...
ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

(5,773)
9.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
1K+ bought in past month
Loading...
ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

(5,773)
9.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
1K+ bought in past month
Loading...
ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

ESR 3 Pack for iPhone 16e/ iPhone 14/ iPhone 13/ iPhone 13 Pro Privacy Screen Protector, Anti-spy Tempered-Glass Privacy Screen Protector, Micro-curved Edges, Case Friendly

(5,773)
9.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
1K+ bought in past month
Loading...
iPhone Charger Cord [MFi Certified] 3Pack 0.9M Lighting Cable Power Delivery Charging Cord Compatible with iPhone 14 13 13 Pro Max 12 12 Pro Max 11 XS XR X 8 iPad,White

iPhone Charger Cord [MFi Certified] 3Pack 0.9M Lighting Cable Power Delivery Charging Cord Compatible with iPhone 14 13 13 Pro Max 12 12 Pro Max 11 XS XR X 8 iPad,White

(4,813)
7.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
Loading...
VOLTME Portable Charger, Slim 10000mAh 5V/3A Power Bank, USB C in&Out High-Speed Charging Battery Pack, Travel Essentials Dual Output Compatible with iPhone 16 15 14 13 12 Samsung Google iPad etc

VOLTME Portable Charger, Slim 10000mAh 5V/3A Power Bank, USB C in&Out High-Speed Charging Battery Pack, Travel Essentials Dual Output Compatible with iPhone 16 15 14 13 12 Samsung Google iPad etc

(51)
19.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
Loading...
Kaistyle for Magsafe Car Mount【20 Strong Magnets】 Magnetic Phone Holder for Car Phone Holder Mount Dash Cell Phone Holders for Your Car Accessories for Women Men for iPhone 17 Pro Max 16 15 14 13 12 ClimatePartner certified
Best Seller

Kaistyle for Magsafe Car Mount【20 Strong Magnets】 Magnetic Phone Holder for Car Phone Holder Mount Dash Cell Phone Holders for Your Car Accessories for Women Men for iPhone 17 Pro Max 16 15 14 13 12 ClimatePartner certified

(16,688)
$9.99
FREE delivery Sun, Sep 21 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
PQRQP 3 in 1 Professional Wireless Lavalier Microphone for iPhone, Android, Camera, Wireless Microphones, Mini Microphone, Crystal Clear Sound Quality for Recording, Live Streaming, YouTube, TikTok
Best Seller

PQRQP 3 in 1 Professional Wireless Lavalier Microphone for iPhone, Android, Camera, Wireless Microphones, Mini Microphone, Crystal Clear Sound Quality for Recording, Live Streaming, YouTube, TikTok

(675)
$29.98
FREE delivery Thu, Sep 4 on $35 of items shipped by Amazon
9K+ bought in past month