This documentation is for a legacy version of Remix Supabase. For the latest version, please visit the Remix Supabase Turbo documentation

Extending Organizations

There are many ways you can extend the organization's data model in your applications: you will use this entity for the objects that are shared among the group's users.

For example, here is a popular scenario: we assume users can install integrations for their organizations. Integrations can have the following interface:

integration.ts
enum IntegrationType { Zapier, Notion, // etc } interface Integration<IntegrationData = unknown> { type: IntegrationType; data: IntegrationData; }

Then, you can extend the organization's interface and add an integrations property to Organization, and initialize it as an empty array [] when you create a new integration:

organization.ts
interface Organization { // ... integrations: Integration[]; }

Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS