Dive into the world of real-time, full-stack web development with this hands-on course. You’ll learn how to build a chat application using Fauna Streams and Next.js 14, focusing on the essentials and best practices.
Next.js is seeing big updates with version 14 and beyond thanks to the ‘app’ router (previously the ‘pages’ router).
With Next.js App router, you now have to manage whether you are in the server or client. There are trade-offs to both with the primary difference being the server is fast and caches data to be served efficiently while the client can hold state for more advanced front-end user interactions.
You’ll learn how to navigate these decisions as you build your full-stack application with Fauna on the backend.
While doing so, you’ll iteratively build out your database schema as you create rooms, messages, and users to serve up from your database.
**What You’ll Learn:**
- **Next.js Best Practices:** Master Next.js best practices for building fast, maintainable apps
- **Server-Side Rendering (SSR):** Learn SSR techniques like server actions and server side form submission
- **Database Access Patterns:** Efficiently connect and retrieve data using Fauna
- **Real-Time Updates:** Implement real-time updates with Fauna Streams
- **Basic Authentication:** Secure your chat app with authentication methods
By the end of this course, you’ll have a working real-time chat app and a solid grasp of the tools and techniques used to build it.
Overview
Syllabus
- Set up a Next 14 Project with create-next-app
- Initialize and Configure a Fauna Database inside a Next.js project with fauna-shell
- Create a Fauna Room Collection in Next.js with the fauna Client
- List Available Chat Rooms in Real-time in Next.js from Fauna
- Create Dynamic Routes in Next.js for Chat Rooms
- Explore Faunas one-to-many Relationships between Collections in the Terminal
- Create and Display Messages using Fauna within a Room in Next.js
- Stream Chat Messages in Real-time in Next.js from Fauna
- Understand Server and Client Rendering and Data-fetching
- Refactor a Next.js 14 Page to Utilize Both Server and Client-side Rendering
- Add Fauna User Authentication to a Next.js App
- Implement Signup Functionality through Fauna with Next.js 14 Server Actions
- Implement Fauna Signin with Next.js Server Actions and useFormState React Hook
- Implement Auth Guards with Tokens throughout an Next.js App
- Update Fauna Messages Collection with Authors
- Challenge: Implement a NavBar for the Application with Logout Functionality
Taught by
Shadid Haque