Skip to content
  • There are no suggestions because the search field is empty.

Enabling Data & Users on your website

Learn how to add backend functionality to your B12 website

ronnel

Written by: Ronnel DG

Last updated: 01 May., 2026

Simple websites use frontend code to display content in a visitor's browser. For more complex websites and web applications, you may need to store or call secret data, verify user identities, or run additional server-side logic that doesn't happen in the browser.

Data & Users adds backend support to your B12 site, powered by Supabase. This lets you build websites with databases, user authentication, real-time features, and more.

Data & Users unlocks two tools that will allow your AI Agent to generate backend code: Secrets and Edge Functions.

Enabling Data & Users

  1. In the left sidebar, click data and users Data & Users.
  2. Click Enable Data & users.
  3. Wait 1–2 minutes while the feature is set up. A new settings panel will appear when it's ready. Once enabled, you'll see two sections in the panel: Secrets and Edge Functions.

Secrets

Secrets are a secure place to store sensitive information your website needs — like passwords or API keys — without exposing that information in your code.

When you save a secret, it's encrypted and stored securely. Your edge functions can access it by referencing its name rather than its actual value.

Common examples of what to store as secrets:

  • API keys (Stripe, Mailchimp, OpenAI, and similar services)
  • Database passwords
  • Authentication tokens
  • Payment gateway credentials

Example: Instead of writing stripe_key = "sk_live_abc123..." directly in your code — where anyone with access could see it — you store that value as a secret and reference it as process.env.STRIPE_KEY.

Note: Secrets are only accessible by your edge functions. They can't be read by visitors to your website.

Edge Functions

Edge Functions run code on your backend to keep things secure and handle automation and other tasks that can't be completed in the browser. Edge Function may respond to a specific trigger, like a form submission or an incoming request from another service, and can help you incorporate 3rd party tools into your workflows.

Common uses for edge functions:

  • Calling third-party APIs, such as sending confirmation emails or processing payments
  • Receiving data from external services (also called webhooks)
  • Validating or transforming data before it's saved
  • Handling user logins and password resets

Example: When a customer places an order through your website, an edge function can send the visitor a confirmation email automatically in the background.

Tip: Edge functions can access your saved Secrets, so you can safely call external services like payment processors without exposing sensitive credentials.

Building with the AI Agent

Once Data & Users is enabled, the AI Agent can manage your Supabase backend directly and write both the frontend and backend code needed to bring a feature to life. You describe what you want in plain language, and the Agent handles the technical implementation.

Here's what the Agent can build for you:

  • User accounts and login: Set up email and password sign-up, email verification, password reset flows, and members-only pages that redirect unauthenticated visitors.

  • Database management: Create and manage database tables, define relationships between them, and set access rules so users only see data they're allowed to see.

  • Third-party API connections: Connect external services via edge functions. Store your API keys securely as Secrets, and the Agent will reference them in the code it writes.

  • Real-time features: Build pages that update automatically when new data comes in, without requiring a page refresh.

Example prompts to try:

Add a login page with email and password sign-up, and send a confirmation email when someone registers.
Add a chatbot that uses my OpenAI API key to answer questions about my business.

Tip: Describe the outcome you want rather than the technical steps. "Let users log in with Google" works better than "implement OAuth."