Connecting to Supabase with the Supabase JavaScript client
As you saw in Chapter 1, you could theoretically just fire HTTP requests to the REST API of your Supabase instance for everything you want to do. But firing HTTP requests for everything you want to do is neither convenient nor safe against API changes in future versions of Supabase.
Instead, I’ll introduce you to the Supabase client, which provides a convenient way to access all the features of Supabase so that you can successfully build an application.
In this section, we’ll focus on getting the Supabase JavaScript client up and running within the Next.js framework. We’ll also explore different integration methods, regardless of whether you’re working with the Next.js App Router or the Next.js Pages Router, and whether you’re on the frontend or the backend; we’ll break down the details of each.
What’s interesting is that at no point in this book will we use...