Setting up the database
We’ll start by fulfilling our database needs. We already have a free account (see Chapter 6). We’ll create a new project called expense-tracker
, set a strong database password, and assign a geographically close region.
You’ll be redirected to a view that provides you with Project URL and API Key details, as shown in Figure 7.1:
Figure 7.1 – API settings for our expense-tracker project
Since our application isn’t ready, we need to note the URL and API key down in a safe place or simply revisit this page once we get to the application.
For this project, I’ve prepared a script to create the required tables and settings for our database called example-structure.sql
. Open the SQL Editor in Supabase, then paste and run the contents of the script:
Figure 7.2 – Success message after running the example-structure.sql script
Our expense tracker will be able...