What this book covers
Chapter 1, Unveiling the Inner Workings of Supabase and Introducing the Book’s Project, explains why Supabase is the stack you want for your next project, demystifies its inner workings, and explores its interconnected services. You will also be introduced to the Multi-Tenant Ticket System project that we will be working on throughout the book.
Chapter 2, Setting Up Supabase with Next.js, covers setting up and connecting to Supabase, running local instances, managing multiple instances, and integrating Supabase with your Next.js application, laying the groundwork for your ticket system project.
Chapter 3, Creating the Ticket Management Pages, Layout, and Components, explains how to build the foundational design of your ticket system project using mock data, creating solid-looking pages and components with Next.js only.
Chapter 4, Adding Authentication and Application Protection, integrates user authentication with Supabase, protecting your application, and you will also learn about sending customized authentication emails.
Chapter 5, Crafting Multi-Tenancy through Database and App Design, covers how to design your database and the application to support multi-tenancy, including defining permissions and making the application tenant aware.
Chapter 6, Enforcing Tenant Permissions with RLS and Handling Tenant Domains, focuses on implementing row-level security (RLS) to secure tenant-specific data, streamlining RLS with Custom Claims, and adapting your application to use domain-based tenant identification.
Chapter 7, Adding Tenant-Based Signups, Including Google Login, takes you through implementing tenant-based user registration, enabling OAuth sign-in with Google, and handling invalid user registrations to enhance the onboarding process.
Chapter 8, Implementing Dynamic Ticket Management, shows you how to create and manage tickets, implement ticket details and related data, and enhance the ticket list with paging, sorting, and searching features.
Chapter 9, Creating a User List with RPCs and Setting Ticket Assignees, explores how to create a user list using remote procedure calls (RPCs), add assignees to tickets, and implement UPDATE
RLS policies for enhanced security.
Chapter 10, Enhancing Interactivity with Realtime Comments, guides you through creating a comments table, implementing real-time comment functionality, and optimizing RLS policies to enhance user interactivity and experience.
Chapter 11, Adding, Securing, and Serving File Uploads with Supabase Storage, explains how to implement file uploads within ticket comments, secure files with RLS policies, and serve images using Supabase Storage and Image Transformations
Chapter 12, Avoiding Unwanted Data Manipulation and Undisclosed Exposures, discusses advanced security techniques to protect your Supabase application, including managing roles, using Supabase Vault, implementing column-level security (CLS), and much more.
Chapter 13, Adding Supabase Superpowers and Reviewing Production Hardening Tips, unleashes the full potential of your Supabase application with powerful techniques. You’ll discover how to integrate database extensions, optimize performance, implement AI-based features, and secure your workflows like never before.