Development
Last updated 7 months ago
Local development
You can run Supabase locally and simply provide the correct environment variables for it to work locally. Run Supabase from the root directory for the migrations to take place.
You can also access the API reference at `localhost:3000/api/reference` β this is only available locally for testing. The endpoints do exist, if you wish to create your own integrations.
You will need access to the userβs session token, meaning either you set up an api route for authentication or use Supabase to have the user login (eg. use Supabase native if building a mobile app)
Extending the Database
Whenever you update the database, you should run:
Examplepnpm run supabase-typegen
This will update the local types so you get type errors when accessing the database. You also need to sync the api-client with the backend, so whenever you update the backend, run:
Examplepnpm run sync-api
This will update the api client, which is what we use to access the backend in a type-safe way.