Replies: 3 comments
-
Thank you for considering my feature request. To complement the request and provide further context, I'd like to detail the steps I took in the process of integrating Twenty with my Supabase instance, leading up to the workspace creation form. The purpose is to underscores the necessity for the proposed enhancements and demonstrates the potential for successful integration with some (small) adjustments.
While I managed to navigate these issues to a certain extent, the process showcase the broader need for flexibility in Twenty's database configuration options, specifically around schema management, extension usage, and storage integration. A comprehensive "How-To" guide in Twenty's documentation for integrating with Supabase would be immensely beneficial, providing step-by-step instructions and highlighting customizable settings for a smoother integration process. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for providing all this. This is a well documented and very clear issue, would be great if they were all like this 😁 Also a big fan of Supabase and would love to collaborate with them at some point, but I wonder what's your use-case exactly? It feels like there'd be overlap and I'm not what would be the long-term vision to support swapping the DB here. We're not really prepared for the fact that things could happen at the DB layer so I'm not sure it would always play well with a supabase setup in parallel (e.g. if you modify an object through supabase api then our application layer wouldn't catch those events because unlike them we don't get them from Postgres - only from our application layer) We plan to support Foreign data wrappers soon with the remote objects feature (e.g. ongoing PRs https://github.com/twentyhq/twenty/pulls?q=remote+objects+is%3Apr+is%3Aclosed) I wonder if that could be a better direction for your use-case. You would be able to plug the supabase DB within a wraper and create crm objects for each table |
Beta Was this translation helpful? Give feedback.
-
Thank you, @FelixMalfait, for your open and constructive feedback. It's great to hear about your interest in Supabase and the ongoing efforts to enhance Twenty's capabilities. Let me address the points you raised and add further context to our use-case and needs:
While some of our needs may be unique to our company, the core requirement to choose our database hosting solution—be it Supabase, Neon Postgres, or any other PostgreSQL provider—is critical. Supabase aligns closely with Twenty's database setup in terms of extensions and functionalities, making it a fitting choice for our environment. A few crucial modifications are needed for seamless integration: enabling configuration for extension schema locations, facilitating connections to external databases complete with configuration guidance and necessary SQL permissions without requiring superuser status, and providing the ability to skip database truncation. Additionally, integrating Supabase (or more generally any S3 compatible) storage support for secure connections to private buckets is vital. Implementing these updates would enhance Twenty's compatibility with current databases and storage systems, significantly boosting its flexibility. Your ORM and data management practices are commendable, and I'm convinced that with these small yet impactful enhancements, Twenty can become even more versatile and powerful. Looking forward to your thoughts and happy to assist in any way I can. |
Beta Was this translation helpful? Give feedback.
-
Scope & Context
We aim to integrate Twenty into an existing ecosystem utilizing a Supabase instance that already supports various applications like Medusa, Strapi, and Directus. The integration requires customization of Twenty's database configurations to ensure compatibility with Supabase's infrastructure, including schemas, user permissions, extensions location, and storage options.
Current Behavior and Process
Adjustments in the database setup and Docker configuration were necessary to align Twenty with our self-hosted Supabase instance. The process highlighted the potential for compatibility with some codebase adjustments:
Database Migration Adjustments: Created a restricted Twenty user to avoid dropping existing schemas. Manually set up required schemas and utilized pre-installed extensions in Supabase, indicating a need for customizable schema and extension locations.
Docker Compose Modifications: Updated the
docker-compose.yml
to connect Twenty to the external PostgreSQL managed by Supabase, including network and storage configuration adjustments. Removed the built-indb
service and tailored environment variables to fit our specific requirements.Supabase Integration Points:
Expected Behavior
For full compatibility with ecosystems utilizing Supabase, we propose several enhancements:
Customizable Database Configurations: Enabling detailed customization in Twenty for database schemas, user permissions, and the location of database extensions. Users should be able to define target schemas and extension locations to align with their Supabase setup.
Bypass Option for Database Reset: Introducing an option to bypass or customize the behavior of the
truncate-db.ts
script to safeguard shared database instances.Supabase Storage Integration: Support for using Supabase's S3-compatible storage as the default option, including configurations for connecting to private buckets using access keys and secrets.
Enhanced Docker Configuration Support: Guidance on customizing
docker-compose.yml
for external service integration, covering network settings, storage options, and environmental variable adjustments.Technical Inputs
Implement a configuration system in Twenty for adjustable database and storage setups required for Supabase integration, including specifying schema and extension locations.
Develop storage configuration options for Supabase's S3-compatible storage, adding necessary fields for a complete and secure connection.
Revise and expand the official documentation to cover these integration scenarios comprehensively, providing step-by-step guidance for Docker and database setup modifications for Supabase compatibility.
By addressing these issues and enabling these adjustments, Twenty can significantly broaden its applicability and value for businesses and developers seeking flexible CRM solutions within a Supabase-powered ecosystem.
Beta Was this translation helpful? Give feedback.
All reactions