diff --git a/README.md b/README.md index 1e7fe6f..2bcd3df 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ end Individual product client documentation: -- [PostgREST](https://github.com/supabase-community/postgres-ex) +- [PostgREST](https://github.com/supabase-community/postgrest-ex) - [Storage](https://github.com/supabase-community/storage-ex) - [Auth](https://github.com/supabase-community/auth-ex) - [Functions](https://github.com/supabase-community/functions-ex) @@ -25,7 +25,7 @@ Individual product client documentation: ### Clients -A `Supabase.Client` holds general information about Supabase, that can be used to intereact with any of the children integrations, for example: `Supabase.Storage` or `Supabase.UI`. +A `Supabase.Client` holds general information about Supabase that can be used to interact with any of the children integrations, for example: `Supabase.Storage` or `Supabase.UI`. ### Usage @@ -35,7 +35,7 @@ There are two ways to create a `Supabase.Client`: #### One off clients -One off clients are clients that are created and managed by your application. They are useful for quick interactions with the Supabase API. +One off clients are created and managed by your application. They are useful for quick interactions with the Supabase API. ```elixir iex> Supabase.init_client("https://", "") @@ -53,21 +53,21 @@ iex> Supabase.init_client("https://", "", iex> {:ok, %Supabase.Client{}} ``` -Initialized clients are elixir structs without any managed state. +Initialized clients are Elixir structs without any managed state. -You can also implement the `Supabase.Client.Behaviour` callbacks to cntralize client init logic. +You can also implement the `Supabase.Client.Behaviour` callbacks to centralize client initialisation logic. #### Self managed clients -Self managed clients are clients that are created and managed by a separate process on your application. They are useful for long running applications that need to interact with the Supabase API. +Self managed clients are created and managed by a separate process in your application. They are useful for long running applications that need to interact with the Supabase API. -If you don't have experience with processes or is a Elixir begginner, you should take a deep look into the Elixir official getting started section about processes, concurrency and distribution before to proceed. +If you don't have experience with processes or are new to Elixir, you should read the getting started section of the official Elixir documentation - specifically about processes, concurrency and distribution before proceeding. - [Processes](https://hexdocs.pm/elixir/processes.html) - [Agent getting started](https://hexdocs.pm/elixir/agents.html) - [GenServer getting started](https://hexdocs.pm/elixir/genservers.html) -- [Supervison trees getting started](https://hexdocs.pm/elixir/supervisor-and-application.html) +- [Supervision trees getting started](https://hexdocs.pm/elixir/supervisor-and-application.html) -So, to define a self managed client, you need to define a module that will hold the client state and the client process as an [Agent](https://hexdocs.pm/elixir/Agent.html). +To define a self managed client, create a module that will hold the client state and the client process as an [Agent](https://hexdocs.pm/elixir/Agent.html). ```elixir defmodule MyApp.Supabase.Client do @@ -75,7 +75,7 @@ defmodule MyApp.Supabase.Client do end ``` -For that to work, you also need to configure the client in your app configuration, it can be a compile-time config on `config.exs` or a runtime config in `runtime.exs`: +For that to work, you will also need to configure the client in your application's configuration. This can be configured as a compile-time entry in `config.exs` or as a runtime entry in `runtime.exs`: ```elixir import Config @@ -91,7 +91,7 @@ config :my_app, MyApp.Supabase.Client, global: [headers: %{"custom-header" => "custom-value"}] ``` -Then, you can start the client process in your application supervision tree, generally in your `application.ex` module: +Then you can start the client process in your application supervision tree, generally in a `application.ex` module: ```elixir defmodule MyApp.Application do