t3-oss / create-t3-turbo

Clean and simple starter repo using the T3 Stack along with Expo React Native

Home Page:https://turbo.t3.gg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chore: change default DB provider to one with a free plan

matteobad opened this issue · comments

Describe the feature you'd like to request

Planetscale is removing the hobby tier. Since this is a public template should a change in the DB provider be made?

Describe the solution you'd like to see

A possible solution could be Neon, Postgres and offers a branching model similar to PS

Additional information

I would be willing to create a PR if a change is required

Create t3 app has a create-database.sh

Maybe we could use that?
If we want to support specific database drivers then we would be forced to have to use a init tool for the user to specify what they want in the repo, which isn't ideal

I still think planetscale is the best recommendation one can make, although not ideal for hobbyists anymore ofc

I think the ideal solution would be to write a codemod that you could run to transform the planetscale stuff to either normal mysql2, or postgres.js

I agree with @juliusmarminge we he says that PScale is still one of the best recommendations, unfortunately, I think most of the people using this starting point probably don't want to pay to have a DB.

Codemod is a good idea, clean, simple, and easy to document. Are we sure that PScale should still be the default and not vice-versa though?

I think we shouldn't make the default something that has to be paid. I tried today integrating a local MySQL with the current code but it was failing. I then tried to do the same connection but with PScale and it worked perfectly. I think it's best for the default to be something that works with any provider, and if wanted, have options to use other serverless drivers.

I agree, picking something paid as a starting point, especially $39/mo is a nonstarter for a lot of people. How about integrating in the work from the Supabase fork?

I think the best solution going forward is to switch to Supabase as the default DB provider, with a codemod to revert back to PlanetScale for folks "who have users™️" and can justfiy paying for Scaler Pro plan. Anyone up for making a PR?

Take some inspiration from here: https://github.com/juliusmarminge/t3-supaedge

Can pick up this tomorrow in the afternoon!

Im testing xata atm, they have a very generous free tier with 15gb of data. It seems like they use AWS Aurora Postgress under the hood.

Hi! No sure if it's the right place for this question, but seems reasonable to post it here.

Is there any alternatives to planescale that support edge enviroments? To be clear, I'm not asking for a ready sollution, just for alternatives that I can look into.

commented

Hi! No sure if it's the right place for this question, but seems reasonable to post it here.

Is there any alternatives to planescale that support edge enviroments? To be clear, I'm not asking for a ready sollution, just for alternatives that I can look into.

Turso is another one. SQLite though.

An Edge DB option could be interesting, seeing the typescript support it has and are now offer a free hosting plan.

But would also be best to use their libraries instead of drizzle.