MENU

Fun & Interesting

Building AI App with NextJS 15 and Shadcn UI: Auth & Database Integration - Part 5

Artem Kirsanov 1,502 lượt xem 3 months ago
Video Not Working? Fix It Now

In this fifth part of our Next.js AI app series, we're implementing essential backend functionality by integrating Supabase for authentication and database management. You'll learn:• How to set up and configure Supabase with Next.js• Implementing Supabase Auth for secure user authentication• Creating and managing database tables in Supabase• Storing and retrieving AI generations history using Supabase's PostgreSQL databaseThis tutorial continues our journey from zero to production, showing you how to build a secure and scalable AI application using Next.js 15 and Supabase. Whether you're new to backend development or looking to strengthen your full-stack skills, this video will guide you through implementing professional-grade authentication and data persistence with Supabase's powerful features.

🔗 Watch the previous parts:
Part 1: https://www.youtube.com/watch?v=ZhR0wRJsdAk
Part 2: https://www.youtube.com/watch?v=p0mN_O6ZPYk
Part 3: https://www.youtube.com/watch?v=1fMkrX8hp_k
Part 4: https://www.youtube.com/watch?v=XKju7n6SjnI

👨‍💻Get the code here - https://github.com/Kirsanow/nextjs-youtube

#nextjs #ai #webdevelopment #javascript #programming

0:00 - Introduction & Overview
- Introduction to Part 5 of the series
- Goals: Database connection, initialization, and AI integration

0:34 - Current State & Goals
- Overview of existing tools page functionality
- Plans for database integration and authentication

2:02 - Setting Up Supabase
- Installing Supabase packages
- Environment variable configuration
- Client and server setup

5:03 - Middleware Configuration
- Setting up Supabase middleware
- Token refresh implementation
- Authentication state management

6:39 - Login Page Implementation
- Creating login page with AI assistance
- Google authentication setup
- Error handling and redirects

11:23 - Google OAuth Configuration
- Setting up Google Cloud Console
- Configuring OAuth credentials
- Adding callback URLs

14:37 - Database Schema & Types
- Creating SQL tables
- Generating TypeScript types
- Setting up database structure

19:56 - Generation Implementation
- Modifying generation logic
- Database integration
- Cookie storage replacement

23:25 - UI Implementation
- Creating generations page
- Adding empty states
- Testing functionality

25:11 - Final Steps & Testing
- Adding sign out functionality
- Testing full workflow
- Final demonstrations

27:11 - Outro & Next Steps
- Summary of achievements
- Preview of next video topics
- Closing remarks


🏗️🔵 WORK with me: https://kirsanov.co

👉🔴 SUBSCRIBE for more: / @kirsnv

🏡 JOIN our Community for Indie developers: https://discord.gg/UWw4brgu

☕️ BUY ME A COFFEE if you like the content: https://buymeacoffee.com/kirsanov

Comment