Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add Supabase integration #417

Open
malisancube opened this issue Jan 25, 2025 · 1 comment
Open

[Feature] Add Supabase integration #417

malisancube opened this issue Jan 25, 2025 · 1 comment
Labels
integration A new .NET Aspire integration Stale

Comments

@malisancube
Copy link

malisancube commented Jan 25, 2025

Related to an existing integration?

Yes

Existing integration

https://github.com/dotnet/aspire/tree/main/src/Aspire.Hosting.PostgreSQL

Overview

.NET Aspire issue link

dotnet/aspire#4271

Scenario

I have a couple of services that are running on Supabase and others that are one Azure Containers. I need to have all the services on the same infrastructure. Supabase docker image is available freely.

Overview

The Aspire framework does not currently support Supabase, a modern, open-source serverless PostgreSQL-compatible database. It has .NET client packages for C# here https://supabase.com/docs/reference/csharp/introduction

Usage example

To integrate open source Supabase as a hosted resource in a .NET Aspire application:

Install the 'Aspire.Hosting.Supabase' NuGet package:

dotnet add package Aspire.Hosting.Supabase

Add the Supabase server resource in the app host project:

var builder = DistributedApplication.CreateBuilder(args);

// Add Supabase server resource
var sb = builder.AddSupabase("supabase");

// Add a Supabase database
var sbDb = sb .AddDatabase("supabasedb");

// Reference the Supabase database in a project
var exampleProject = builder.AddProject<Projects.ExampleProject>()
                            .WithReference(sbDb);

// Initialize and run the application
builder.Build().Run();

To enable client projects to connect to Supabase :

Install the Aspire.Supabase NuGet package:

dotnet add package Aspire.Supabase

Add the Supabase client to the Program.cs file in the client project:

builder.AddSupabaseDataSource("sbdb"));

Both integrations should align with Aspire's existing conventions and provide a similar experience to the PostgreSQL integration.

Breaking change?

No

Alternatives

Not that I can find.

Additional context

Links

https://supabase.com/docs
https://supabase.com/docs/guides/self-hosting/docker

Help us help you

No, just wanted to propose this

@malisancube malisancube changed the title Add Supabase integration [Feature] Add Supabase integration Jan 25, 2025
@Alirexaa Alirexaa added the integration A new .NET Aspire integration label Jan 25, 2025
Copy link

github-actions bot commented Mar 9, 2025

We have noticed this issue has not been updated within 21 days. If there is no action on this issue in the next 14 days, we will automatically close it. You can use /stale-extend to extend the window.

@github-actions github-actions bot added the Stale label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration A new .NET Aspire integration Stale
Projects
None yet
Development

No branches or pull requests

2 participants