Features
Database
ShipNow supports Supabase as the database solution with built-in user management features.
Overview
The main features of Supabase Database include:
- 🔄 Unlimited API requests
- 🚀 Run on Edge Runtime
- 💻 Browser querying data support
- 🔐 Built-in file storage
Setup Supabase Environment Variables
Create a account on Supabase and create a project
Copy Supabase project url, anon key and service role key from the project API Settings
Add project url, anon key and service role key to .env.local
file:
Create Supabase Database Tables
Copy SQL schema from apps/web/migrations/1000_init.sql
Go to Supabase SQL Editor, paste the SQL schema and run it.
Go to Supabase API Settings, add next_auth
to the "Exposed schemas" list.
Database CRUD Operations
Read One User
Read User List
Create User
Update User
Delete User
Using Supabase Client
Server Components
For server-side operations to access the database, use the server client:
Client Components
For client-side operations, use the client-side client:
In the browser, you need to configure RLS policies to read data.
Need Help?
- Check the Supabase documentation
- Join our Discord community
- Open an issue on GitHub