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 · 0 comments
Open

[Feature] Add Supabase integration #417

malisancube opened this issue Jan 25, 2025 · 0 comments
Labels
integration A new .NET Aspire integration

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

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
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
Projects
None yet
Development

No branches or pull requests

2 participants