К списку видео

Supabase

Getting Started with Supabase Locally

Платформа
YouTube
Длительность
4:49
Язык в кадре
американский английский
Просмотры
17,9 тыс.
Медианная склейка
6.09s
Лицо в кадре
91%
Тёмные кадры
49%
Supabase Getting Started with Supabase Locally at 0:00medium presenter
SupabaseGetting Started with Supabase Locally
0:00
Supabase Getting Started with Supabase Locally at 0:02
SupabaseGetting Started with Supabase Locally
0:02
Supabase Getting Started with Supabase Locally at 0:02
SupabaseGetting Started with Supabase Locally
0:02
Supabase Getting Started with Supabase Locally at 0:03medium presenter
SupabaseGetting Started with Supabase Locally
0:03
Supabase Getting Started with Supabase Locally at 0:08
SupabaseGetting Started with Supabase Locally
0:08
Supabase Getting Started with Supabase Locally at 0:10
SupabaseGetting Started with Supabase Locally
0:10
Supabase Getting Started with Supabase Locally at 0:12
SupabaseGetting Started with Supabase Locally
0:12
Supabase Getting Started with Supabase Locally at 0:13medium presenter
SupabaseGetting Started with Supabase Locally
0:13
Supabase Getting Started with Supabase Locally at 0:23medium presenter
SupabaseGetting Started with Supabase Locally
0:23
Supabase Getting Started with Supabase Locally at 0:24
SupabaseGetting Started with Supabase Locally
0:24
Supabase Getting Started with Supabase Locally at 0:26
SupabaseGetting Started with Supabase Locally
0:26
Supabase Getting Started with Supabase Locally at 0:27medium presenter
SupabaseGetting Started with Supabase Locally
0:27
Supabase Getting Started with Supabase Locally at 0:29medium presenter
SupabaseGetting Started with Supabase Locally
0:29
Supabase Getting Started with Supabase Locally at 0:29medium presenter
SupabaseGetting Started with Supabase Locally
0:29
Supabase Getting Started with Supabase Locally at 0:30wide presenter
SupabaseGetting Started with Supabase Locally
0:30
Supabase Getting Started with Supabase Locally at 0:32wide presenter
SupabaseGetting Started with Supabase Locally
0:32
Supabase Getting Started with Supabase Locally at 0:39medium presenter
SupabaseGetting Started with Supabase Locally
0:39
Supabase Getting Started with Supabase Locally at 0:40medium presenter
SupabaseGetting Started with Supabase Locally
0:40
Supabase Getting Started with Supabase Locally at 0:41wide presenter
SupabaseGetting Started with Supabase Locally
0:41
Supabase Getting Started with Supabase Locally at 0:47wide presenter
SupabaseGetting Started with Supabase Locally
0:47
Supabase Getting Started with Supabase Locally at 0:48wide presenter
SupabaseGetting Started with Supabase Locally
0:48
Supabase Getting Started with Supabase Locally at 0:50wide presenter
SupabaseGetting Started with Supabase Locally
0:50
Supabase Getting Started with Supabase Locally at 0:50wide presenter
SupabaseGetting Started with Supabase Locally
0:50
Supabase Getting Started with Supabase Locally at 0:51wide presenter
SupabaseGetting Started with Supabase Locally
0:51
Supabase Getting Started with Supabase Locally at 0:52wide presenter
SupabaseGetting Started with Supabase Locally
0:52
Supabase Getting Started with Supabase Locally at 0:53wide presenter
SupabaseGetting Started with Supabase Locally
0:53
Supabase Getting Started with Supabase Locally at 0:55medium presenter
SupabaseGetting Started with Supabase Locally
0:55
Supabase Getting Started with Supabase Locally at 0:55medium presenter
SupabaseGetting Started with Supabase Locally
0:55
Supabase Getting Started with Supabase Locally at 0:58wide presenter
SupabaseGetting Started with Supabase Locally
0:58
Supabase Getting Started with Supabase Locally at 1:06wide presenter
SupabaseGetting Started with Supabase Locally
1:06
Supabase Getting Started with Supabase Locally at 1:08medium presenter
SupabaseGetting Started with Supabase Locally
1:08
Supabase Getting Started with Supabase Locally at 1:10medium presenter
SupabaseGetting Started with Supabase Locally
1:10
Supabase Getting Started with Supabase Locally at 1:13medium presenter
SupabaseGetting Started with Supabase Locally
1:13
Supabase Getting Started with Supabase Locally at 1:14medium presenter
SupabaseGetting Started with Supabase Locally
1:14
Supabase Getting Started with Supabase Locally at 1:18medium presenter
SupabaseGetting Started with Supabase Locally
1:18
Supabase Getting Started with Supabase Locally at 1:18wide presenter
SupabaseGetting Started with Supabase Locally
1:18
Supabase Getting Started with Supabase Locally at 1:26wide presenter
SupabaseGetting Started with Supabase Locally
1:26
Supabase Getting Started with Supabase Locally at 1:30wide presenter
SupabaseGetting Started with Supabase Locally
1:30
Supabase Getting Started with Supabase Locally at 1:34wide presenter
SupabaseGetting Started with Supabase Locally
1:34
Supabase Getting Started with Supabase Locally at 1:38wide presenter
SupabaseGetting Started with Supabase Locally
1:38
Supabase Getting Started with Supabase Locally at 1:46wide presenter
SupabaseGetting Started with Supabase Locally
1:46
Supabase Getting Started with Supabase Locally at 1:49medium presenter
SupabaseGetting Started with Supabase Locally
1:49
Supabase Getting Started with Supabase Locally at 1:50medium presenter
SupabaseGetting Started with Supabase Locally
1:50
Supabase Getting Started with Supabase Locally at 2:05wide presenter
SupabaseGetting Started with Supabase Locally
2:05
Supabase Getting Started with Supabase Locally at 2:10wide presenter
SupabaseGetting Started with Supabase Locally
2:10
Supabase Getting Started with Supabase Locally at 2:11medium presenter
SupabaseGetting Started with Supabase Locally
2:11
Supabase Getting Started with Supabase Locally at 2:14medium presenter
SupabaseGetting Started with Supabase Locally
2:14
Supabase Getting Started with Supabase Locally at 2:17wide presenter
SupabaseGetting Started with Supabase Locally
2:17
Supabase Getting Started with Supabase Locally at 2:18wide presenter
SupabaseGetting Started with Supabase Locally
2:18
Supabase Getting Started with Supabase Locally at 2:22wide presenter
SupabaseGetting Started with Supabase Locally
2:22
Supabase Getting Started with Supabase Locally at 2:26medium presenter
SupabaseGetting Started with Supabase Locally
2:26
Supabase Getting Started with Supabase Locally at 2:30medium presenter
SupabaseGetting Started with Supabase Locally
2:30
Supabase Getting Started with Supabase Locally at 2:30wide presenter
SupabaseGetting Started with Supabase Locally
2:30
Supabase Getting Started with Supabase Locally at 2:34wide presenter
SupabaseGetting Started with Supabase Locally
2:34
Supabase Getting Started with Supabase Locally at 2:38wide presenter
SupabaseGetting Started with Supabase Locally
2:38
Supabase Getting Started with Supabase Locally at 2:42wide presenter
SupabaseGetting Started with Supabase Locally
2:42
Supabase Getting Started with Supabase Locally at 2:44medium presenter
SupabaseGetting Started with Supabase Locally
2:44
Supabase Getting Started with Supabase Locally at 2:46medium presenter
SupabaseGetting Started with Supabase Locally
2:46
Supabase Getting Started with Supabase Locally at 2:49medium presenter
SupabaseGetting Started with Supabase Locally
2:49
Supabase Getting Started with Supabase Locally at 2:53wide presenter
SupabaseGetting Started with Supabase Locally
2:53
Supabase Getting Started with Supabase Locally at 2:58wide presenter
SupabaseGetting Started with Supabase Locally
2:58
Supabase Getting Started with Supabase Locally at 3:02wide presenter
SupabaseGetting Started with Supabase Locally
3:02
Supabase Getting Started with Supabase Locally at 3:18wide presenter
SupabaseGetting Started with Supabase Locally
3:18
Supabase Getting Started with Supabase Locally at 3:22wide presenter
SupabaseGetting Started with Supabase Locally
3:22
Supabase Getting Started with Supabase Locally at 3:26wide presenter
SupabaseGetting Started with Supabase Locally
3:26
Supabase Getting Started with Supabase Locally at 3:30wide presenter
SupabaseGetting Started with Supabase Locally
3:30
Supabase Getting Started with Supabase Locally at 3:34wide presenter
SupabaseGetting Started with Supabase Locally
3:34
Supabase Getting Started with Supabase Locally at 3:36medium presenter
SupabaseGetting Started with Supabase Locally
3:36
Supabase Getting Started with Supabase Locally at 3:38medium presenter
SupabaseGetting Started with Supabase Locally
3:38
Supabase Getting Started with Supabase Locally at 3:38wide presenter
SupabaseGetting Started with Supabase Locally
3:38
Supabase Getting Started with Supabase Locally at 3:42wide presenter
SupabaseGetting Started with Supabase Locally
3:42
Supabase Getting Started with Supabase Locally at 3:46wide presenter
SupabaseGetting Started with Supabase Locally
3:46
Supabase Getting Started with Supabase Locally at 3:54wide presenter
SupabaseGetting Started with Supabase Locally
3:54
Supabase Getting Started with Supabase Locally at 3:55medium presenter
SupabaseGetting Started with Supabase Locally
3:55
Supabase Getting Started with Supabase Locally at 3:58medium presenter
SupabaseGetting Started with Supabase Locally
3:58
Supabase Getting Started with Supabase Locally at 4:07wide presenter
SupabaseGetting Started with Supabase Locally
4:07
Supabase Getting Started with Supabase Locally at 4:10wide presenter
SupabaseGetting Started with Supabase Locally
4:10
Supabase Getting Started with Supabase Locally at 4:14wide presenter
SupabaseGetting Started with Supabase Locally
4:14
Supabase Getting Started with Supabase Locally at 4:18wide presenter
SupabaseGetting Started with Supabase Locally
4:18
Supabase Getting Started with Supabase Locally at 4:22wide presenter
SupabaseGetting Started with Supabase Locally
4:22
Supabase Getting Started with Supabase Locally at 4:26wide presenter
SupabaseGetting Started with Supabase Locally
4:26
Supabase Getting Started with Supabase Locally at 4:30medium presenter
SupabaseGetting Started with Supabase Locally
4:30
Supabase Getting Started with Supabase Locally at 4:34medium presenter
SupabaseGetting Started with Supabase Locally
4:34
Supabase Getting Started with Supabase Locally at 4:35
SupabaseGetting Started with Supabase Locally
4:35
Supabase Getting Started with Supabase Locally at 4:38
SupabaseGetting Started with Supabase Locally
4:38
Supabase Getting Started with Supabase Locally at 4:41medium presenter
SupabaseGetting Started with Supabase Locally
4:41

Расшифровка: Getting Started with Supabase Locally

Расшифровано речевой моделью по звуку самого ролика, а не написано брендом. Нажмите на строку, чтобы перейти к этому моменту.

  1. 0:00When your Superbase project only lives in the dashboard,
  2. 0:03it works, but a lot of the context lives in clicks, toggles, and memory.
  3. 0:07In this video, we're going to move all that context into code,
  4. 0:11your database schema and config will be stored as project files
  5. 0:14so that your human and AI teammates can understand the project better,
  6. 0:19review changes more clearly, and help you ship with confidence.
  7. 0:23Let's dive in.
  8. 0:27Here's the flow we're building toward.
  9. 0:29You will deal up against a local Superbase project, keep the important project state
  10. 0:34in your repo, review changes through GitHub, and then deploy from main to production.
  11. 0:40Let's start by installing the Superbase CLI.
  12. 0:42Once you have it installed, you can verify it by running Superbase version.
  13. 0:47Then inside your project, run Superbase init.
  14. 0:50This creates a Superbase folder including the config.toml file.
  15. 0:55Next, let's start the local Superbase stack.
  16. 0:58Superbase start spins up the local Superbase project
  17. 1:01with all the features using Docker.
  18. 1:04We can verify that the local Superbase project is running
  19. 1:06by heading to its dashboard.
  20. 1:08Now let's talk about the database schema.
  21. 1:11For this workflow, I would steer you towards declarative schema
  22. 1:14instead of manually writing every migration file from scratch.
  23. 1:18That means you describe the desired database state in SQL files,
  24. 1:23then let the CLI generate the migration diff.
  25. 1:26Create a file inside the schemas directory,
  26. 1:29define your table, and run the diff command.
  27. 1:32This generates the database migration.
  28. 1:35Apply the migration to the local project,
  29. 1:38and simply update the table definition when you want to make edits.
  30. 1:43Running the diff command will automatically pick up those changes
  31. 1:46and generate the necessary migration files.
  32. 1:49The nice part is that your schema becomes a readable source of truth.
  33. 1:53Your teammates and your AI assistant can open the repo,
  34. 1:57understand the database structure without reading through multiple migration files.
  35. 2:02There's also a single newer command you can run after making changes
  36. 2:06to handle the database diff and apply the migrations.
  37. 2:10I want to warn that this command is in alpha as of the recording of this video,
  38. 2:15so there might be changes coming.
  39. 2:17You can get started by enabling PGDelta,
  40. 2:20and it walks you through when you are first setting up the declarative schema
  41. 2:24and sets up everything for you.
  42. 2:27Next, let's see your local database so that when you start or reset your database,
  43. 2:31you have some test data to work with.
  44. 2:34Create a C.SQL file and write your insert statements for the C data.
  45. 2:40Resetting the database will bring up those data in your local project.
  46. 2:44If you created your dummy data through the dashboard, you can create the seed file by
  47. 2:48dumping those data.
  48. 2:50Now let's look at config.toml file.
  49. 2:52The file controls local super-based settings, auth providers, storage behaviors, email settings,
  50. 2:58and other project configurations.
  51. 3:00One important distinction is configuration versus secrets.
  52. 3:04Configuration can live in the config.toml file.
  53. 3:08Secrets should come from environment variables.
  54. 3:10For local config secrets, create a .env file and manage them there.
  55. 3:15Adding the OpenAI API key allows you to use the Superbase AI assistance locally.
  56. 3:22The config.tml files way you manage your local Superbase buckets.
  57. 3:26You can also seed the buckets with files as well.
  58. 3:30Restarting Superbase reloads the environment variables,
  59. 3:33and resetting the database will reset the buckets.
  60. 3:36Once the local project is working, let's connect it to a remote Superbase project.
  61. 3:41I will create a brand new Superbase project and link the local project to my remote project.
  62. 3:48Next, let's push the local database changes.
  63. 3:51And now our remote database is in sync with our local state.
  64. 3:55Lastly, let's set up the Superbase GitHub integration.
  65. 3:58You can open a GitHub pull request.
  66. 4:01and upon merging, the migration will be applied to prod automatically.
  67. 4:06Add the GitHub integration to your project.
  68. 4:09Then push a migration update to the branch and open a pull request.
  69. 4:15Superbase creates a database branch automatically if you have branching enabled.
  70. 4:19Note that branching is a paid feature.
  71. 4:22After you test things out and merge the pull request,
  72. 4:26the migration is applied to the production database automatically.
  73. 4:30So that's how you can get started with Superbase locally.
  74. 4:34When your Superbase configuration lives in the repo, your human and AI teammates can better
  75. 4:39understand the project, which is a key to writing good software, whether you or AI writes it.
  76. 4:45I'll see you around in another video.
  77. 4:47Bye!
77 строк · 733 слов