Overview
This tutorial shows you how to build an ecommerce app using Lovable, Supabase, and Rye. You can see a live version of it here and view the source code here. Lovable is an AI-powered app builder that can generate applications from natural language prompts. Supabase is a backend-as-a-service platform, including serverless functions to enable calling third-party APIs. Rye is an ecommerce API that lets you surface products from multiple merchants in your app and place orders programmatically. By the end of this tutorial, you will have a Lovable app connected to Supabase and Rye, capable of letting users browse products and place orders. From there, you can customize it, including the look and feel, and extend the app’s functionality to build any type of ecommerce experience.
Tutorial
This app is for demo purposes only. Before using any code generated from this repo in production, thoroughly review and test it for security and proper functionality.
Step 1: Set Up Accounts
Lovable: Sign up for a Lovable account to generate and manage your app. Supabase: Create a Supabase account and set up a new project in your account for use with this tutorial. Rye: Sign up for a Rye staging account to checkout orders. Get your API key and store it in a secure place.Step 2: Connect Lovable with Supabase
Connect Supabase to Lovable by following these steps.Step 3: Create App in Lovable
Create a new app in Lovable with this prompt.Copy an existing GitHub repo

https://github.com/rye-com/rye-lovable-demoLovable will generate the app now. Afterwards run this prompt to confirm the setup.
- Check for any required Supabase functions used by the code.
- If the Supabase functions already exist in Supabase, connect to them.
- If the Supabase functions do not exist, create them in Supabase.
- If the Rye API key doesn’t exist in Supabase, add a placeholder Rye API key with the value of “AddAPIKeyHere”
Step 4: Add API Key in Supabase
Log in to Supabase and navigate to the new function created within your Supabase project from step 1. Find the environmental variable with the valueAddAPIKeyHere
and replace it with your Rye API key from the staging environment.