Skip to content

Commit 7dc8537

Browse files
committed
Fixing some issues
1 parent dadc4e5 commit 7dc8537

File tree

1 file changed

+15
-26
lines changed

1 file changed

+15
-26
lines changed

docs/integrations/supabase.md

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Edge Functions are ideal for:
178178
- **Calling external APIs securely** (e.g., Stripe, Twilio, OpenAI) without exposing keys in the client app
179179
- **Generating personalized AI content** such as product recommendations, support replies, onboarding guides, weekly usage summaries, or tailored learning suggestions
180180
- **Running scheduled or on-demand automations**
181-
- **Performing complex business logic** thatt is not suitable for client-side execution
181+
- **Performing complex business logic** that is not suitable for client-side execution
182182
- **Enforcing secure access rules** using Supabase Auth (require logged-in user)
183183

184184
:::info
@@ -199,6 +199,9 @@ To create and deploy the Edge Function, follow these steps:
199199

200200
1. Open the **Supabase module** from the left sidebar.
201201
2. Scroll to **Edge Functions** and click **+** to create a new one.
202+
:::note
203+
The agent may also determine when parts of your feature implementation should live in the backend and proactively create Edge Function code on your behalf.
204+
:::
202205
3. This opens the **Agent Panel** on the right with a prefilled starter prompt. Simply continue describing what you want your function to do. For example:
203206

204207
```jsx
@@ -208,35 +211,29 @@ Create a Supabase Edge Function that uses OpenAI api to generate a motivational
208211

209212
![create-edge-functions.avif](imgs/create-edge-functions.avif)
210213

211-
The agent will scaffold a complete Edge Function, including folders and `index.ts`. You will now see the function generated under the following structure:
214+
The agent will create a complete Edge Function using Typescript, including folders and `index.ts`. You will now see the function generated under the following structure:
212215

213216
![edge-function-file.avif](imgs/edge-function-file.avif)
214217

215218
:::info
216-
217219
You can open and edit the function like any other file in Dreamflow.
218-
219220
:::
220221

221222
#### 2. Add Required Secrets
222223

223224
If your Edge Functions require secrets like API keys, Dreamflow automatically detects them from your generated code and allows you to add the required values.
224225

225-
To configure your function’s secrets, open the **Supabase > Secrets** section and add the following:
226-
227-
- **YOUR_API_KEY**: Enter your own API key.
228-
- **SUPABASE_URL**: Copy the **API URL** from the **Project Details** section at the top.
229-
- **SUPABASE_ANON_KEY**: Copy the **Anon Key** from the same **Project Details** section.
226+
To configure your function’s secrets, open the **Supabase > Secrets** section in Dreamflow and add the values specific to your edge function.
230227

231-
Once added, Dreamflow will rewrite the deployment environment so your function can access these secrets at runtime.
228+
Saving these values in Dreamflow pushes them to your Supabase project.
232229

233230
![add-secrect.avif](imgs/add-secrect.avif)
234231

235232
#### 3. Deploy the Function
236233

237-
After reviewing your function and adding secrets:
234+
After reviewing your function and adding secrets you are ready to deploy your function.
238235

239-
1. Return to **Supabase > Edge Functions** section.
236+
1. Open the **Supabase > Edge Functions** section.
240237
2. Click **Deploy Function**.
241238
3. A confirmation dialog appears; click **Deploy**.
242239

@@ -245,7 +242,7 @@ After reviewing your function and adding secrets:
245242

246243
#### 4. Verify Deployment
247244

248-
After deployment, open the **Supabase Dashboard > Edge Functions** page. You should now see your function listed.
245+
After deployment, you can open the **Supabase Dashboard > Edge Functions** page to ensure your function has been properly deployed.
249246

250247
![sb-edge-functions.avif](imgs/sb-edge-functions.avif)
251248

@@ -256,12 +253,16 @@ Once your Edge Function is deployed, you can trigger it directly from your app.
256253

257254
**Using Agent**
258255

259-
You can simply ask the Agent to connect the function to the correct part of your UI. For example:
256+
You can ask the Agent to connect the function to the correct part of your UI. For example:
260257

261258
```jsx
262259
Call the `generate-motivation` Supabase Edge Function on the home page and display the returned message in the motivational message widget.
263260
```
264261

262+
:::note
263+
The agent should also automatially wire up the function to the correct parts of your app as you build.
264+
:::
265+
265266
The agent will automatically place the call in the appropriate widget, manage loading states, and update your UI.
266267

267268
**Add Manually**
@@ -418,18 +419,6 @@ To fix this, use a valid email address during sign-up so you can receive and con
418419
</p>
419420
</details>
420421
421-
422-
423-
<details>
424-
<summary>
425-
Are Supabase Edge Functions supported in Dreamflow?
426-
</summary>
427-
428-
<p>
429-
Currently, **Edge Functions are not supported in Dreamflow**. If you need to create or manage Edge Functions, you’ll have to do so directly from the **Supabase Console**.
430-
</p>
431-
</details>
432-
433422
<details>
434423
<summary>
435424
Why can’t I log in with the email I used to generate sample data?

0 commit comments

Comments
 (0)