Skip to content

Improve the initial infrastructure for the database #59

@maxcell

Description

@maxcell

As a user there are a lot of steps to setting up the project before you can fully get it operational currently:

  • You need to go to Supabase and create a project
  • You need to get the environment variable keys
  • You need to set a session secret
  • You need to run the SQL commands for establishing the schema
  • You need to run the SQL commands for establishing the Postgres trigger functions
  • You need to deploy the project

Previously back when we implemented login (#23), we used Supabase's auth system. It might make more sense to use Supabase to do the database but we roll the auth work ourselves. The big reason why we didn't do it before is that there were some complications with how Prisma cross join schemas (supabase/supabase#1502) like the one you'd get from Supabase's auth.users which was our initial approach (#37).

Taking prior art into how other Remix Stacks implement auth, I think it is fair to say they have it figured out!


By taking this approach though we offer ourselves the opportunity to scaffold the entire database with Prisma, seed the database with ease, allow for different implementations of a database to come in for local development versus production, and reduce the number of environment variables and potential errors we can come across.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions