Skip to content

Commit 3eab22d

Browse files
committed
[docs] first update to the docs
1 parent 7c0c298 commit 3eab22d

7 files changed

Lines changed: 44 additions & 27 deletions

File tree

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sidebar_position: 1
33
---
4-
# Getting Started 1
4+
# Getting Started
55

66
To get started, choose which frontend you need and go from there:
77

docs/asset/image-1.png

145 KB
Loading

docs/asset/image.png

295 KB
Loading

docs/loops.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
sidebar_position: 6
3+
---
4+
# Email (Loops)
5+
6+
## Setup
7+
8+
1. Buy a domain, I recommend [Cloudflare](https://developers.cloudflare.com/registrar/get-started/register-domain/)
9+
2. Create a loops account and follow these [instructions](https://postmarkapp.com/support/article/1002-getting-started-with-postmark)
10+
3. On [loops](https://loops.so/docs/smtp/supabase) go to settings under integrations and choose supabase:
11+
![alt text](asset/image.png)
12+
4. Then when you come back to the loops page select Setup SMTP
13+
5. This should automatically setup your authentication service, you should be able to go to Supabase > Authentication > Email > SMTP Settings.
14+
6. You need to setup your domain settings before being able to send emails through loops, navigate to [https://app.loops.so/sending-domain](https://app.loops.so/sending-domain) add the required records in your DNS settings of your personal domain.
15+
7. Now its time for creating a template, navigate to [https://app.loops.so/templates](https://app.loops.so/templates) and select the account verification template.
16+
8. Design the template to match your website’s branding.
17+
9. After your design is done you can press publish. Note that you have to setup your domain before this stage, if you don’t the Publish button is gonna remain inactive.
18+
10. At this step you connect your email template in supabase. Navigate to your supabase project, then click the Authentication Section on the left side, after that select Confirm Sign up button.
19+
11. In the body you need to fill the following vairables
20+
```
21+
{
22+
"transactionalId": "cmkh7o6lp09kx0iyv7cee6nhd",
23+
"email": "{{ .Email }}",
24+
"addToAudience": true,
25+
"dataVariables": {
26+
"confirmationUrl": "{{ .ConfirmationURL }}"
27+
}
28+
}
29+
```
30+
Note: you can get the email template id from the url of the specific transaction on loops, for example: [https://app.loops.so/transactional/cmkh7o6lp09kx0iyv7cee6nhd](https://app.loops.so/transactional/cmkh7o6lp09kx0iyv7cee6nhd)
31+
12. Inside the email template on loop click on the button, then press the data variable field next to Link and add confirmationURL there, this is the confirmationURL that will be sent from the supabase url.
32+
![alt text](asset/image-1.png)
33+
13. Next go to [https://app.loops.so/settings](https://app.loops.so/settings) and to the API Keys section, then select the key and paste the key inside the root .env file’s LOOPS_API_KEY file.
34+
35+
You are all done now.

docs/nextjs/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ cp .env.example .env
2121

2222
4. Install the required libraries
2323
```
24-
npm install
24+
pnpm install
2525
```
2626
5. Run the local development server
2727

2828
```
29-
npm run dev
29+
pnpm run dev
3030
```

docs/nextjs/setup-supabase.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@ sidebar_position: 2
44
# Setup Supabase
55
## Setup backend
66
1. Setup [NextJS](quickstart.md) and [Supabase](../supabase/README.md)
7-
2. Go to Project Settings > API. Then copy the project url and anon key into the variables `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` respectively in the `nextjs/.env` file.
7+
2. To connect your project to the supabase deployed environment, navigate to Project Settings > Data API, copy the project url and put it in `NEXT_PUBLIC_SUPABASE_URL`. Then navigate to Project Settings > API Keys, create a Publishable and secret Key api. Finally copy the default key's value from the Publishable key in `NEXT_PUBLIC_SUPABASE_ANON_KEY`.
88
```
99
NEXT_PUBLIC_SUPABASE_URL="https://crnytzptlghehxsarjxm.supabase.co"
10-
NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNybnl0enB0bGdoZWh4c2FyanhtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDkyMjQxNjgsImV4cCI6MjAyNDgwMDE2OH0.UW1dHRt4hGF6uCdPXimxv0Ggwq5uJ1WoQuCZ1_ixmCU"
10+
NEXT_PUBLIC_SUPABASE_ANON_KEY="sb_publishable_5kkxiPW8Oq6dAbn4qeF4Cw_iUZBqmSf"
1111
```
1212
3. Now running the local development server will connect to your Supabase backend
1313
```
1414
cd nextjs
1515
npm run
1616
```
17+
:::info
18+
Supabase used to have a Legacy anon key, and service_role API key which could only be created once. This key was not rollable. Having a service role key that is generated once during project creation and cannot be changed, has consequence. Specifically, if your key gets exposed, its gonna create a lot of headaches for you. Having a rollable key allows you to switch the keys if anything happens. I recommend using the publishable and secret API keys. If you have an old project using Legacy keys, please switch the keys.
19+
:::
1720

1821

1922
## Local Setup (Optional)
@@ -25,7 +28,7 @@ cp .env.local.example .env.local
2528
```
2629
3. Run the local development server
2730
```bash
28-
npm run
31+
pnpm run
2932
```
3033
:::note
3134
`.env.local` variables will override the `.env` variables when running nextjs locally. [Click here for more info](https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#default-environment-variables)

docs/postmark.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)