diff --git a/docs/getting-started/from-example.md b/docs/getting-started/from-example.md index 0291485..a4891bb 100644 --- a/docs/getting-started/from-example.md +++ b/docs/getting-started/from-example.md @@ -49,5 +49,7 @@ pnpm dev ::: ::: tip :tada: Congratulations! -You are done! See [Installation](/modules/installation) to install individual Modules. Remember to run `pnpm db:stop` to save resources once you are done working with your local Supabase Instance. +You are done! See [Installation](/modules/installation) for more information about the Modules. Remember that all modules are installed by default in this example. + +Remember to run `pnpm db:stop` to save resources once you are done working with your local Supabase Instance. ::: \ No newline at end of file diff --git a/docs/modules/auth.md b/docs/modules/auth.md index 8159b3d..e7b667e 100644 --- a/docs/modules/auth.md +++ b/docs/modules/auth.md @@ -2,6 +2,8 @@ ## Installation +### Hooks + Make sure you work in a `/modules` directory from the root repository. ::: code-group @@ -14,3 +16,13 @@ degit iamhectorsosa/supabase-modules/playground/modules/auth auth <<< ../../playground/modules/auth/index.ts [Manual] ::: + +## Usage + +### `useSignInWithEmailPassword` + +<<< ../../playground/app/login/LoginForm.tsx#auth-snippet{4-18} + +::: info +VIP +::: \ No newline at end of file diff --git a/docs/modules/installation.md b/docs/modules/installation.md index 9b53904..b7450e2 100644 --- a/docs/modules/installation.md +++ b/docs/modules/installation.md @@ -1,5 +1,9 @@ # Installation +::: warning Before proceeding +If you are starting from an example project, all types, utilities are modules are installed by default. You can continue reviewing individual modules for more information about usage. +::: + ## Database TypeScript types If you are starting from an example project, your database's TypeScript types are already included. However, if at any point you update your database, you might have to re-generate your database's TypeScript types as well. diff --git a/docs/modules/profile.md b/docs/modules/profile.md index d8dde8a..5882ceb 100644 --- a/docs/modules/profile.md +++ b/docs/modules/profile.md @@ -2,7 +2,9 @@ ## Installation -Make sure you work in a `/modules` directory from the root repository. +### Hooks + +Make sure you work in a `/modules/profile` directory from the root repository. ::: code-group @@ -11,6 +13,30 @@ cd modules degit iamhectorsosa/supabase-modules/playground/modules/profile profile ``` -<<< ../../playground/modules/profile/index.ts [Manual] +<<< ../../playground/modules/profile/index.ts [index.ts] ::: + +### Migration + +Make sure you work in a `/supabase/migrations` directory from the root repository. + +::: code-group + +```bash [Using degit] +cd modules +degit iamhectorsosa/supabase-modules/playground/supabase/migrations + +# degit will copy all migrations, delete the ones you do not need +# you only need `20240214100236_profile.sql` for this module +``` + +<<< ../../playground/supabase/migrations/20240214100236_profile.sql [20240214100236_profile.sql] + +::: + +## Usage + +::: info +VIP +::: \ No newline at end of file