Quickstart with Lovable
An app you built in Lovable is a website: pages that run in your visitors' browsers. Its data, sign-in and backend functions live in Supabase (or Lovable's built-in backend, which is also Supabase). On Kaviris, the website moves; Supabase stays where it is. Your app keeps talking to it from the browser, as it did on Lovable.
Today: download and deploy. Deploying straight from GitHub on every change needs the Kaviris GitHub App, which is not open yet (see Every change, automatically below). Until then you deploy with the
kaviriscommand, from a copy of your project on your computer. It takes about five minutes.
1. Get your project's code
- In Lovable, connect your project to GitHub. Lovable makes a repository and keeps it up to date.
- On GitHub, open that repository, choose Code, then Download ZIP.
- Unzip it into a folder of its own.
2. Install the kaviris command and sign in
Follow steps 1 and 2 of the command line quickstart: install
kaviris, then run kaviris login. You create your account with your
email address and a passkey.
3. Deploy
Open a terminal in the unzipped folder and run:
kaviris deploy --name myapp
Pick your own name instead of myapp. Your app gets the address
https://myapp.apps.beta.kaviris.com.
Kaviris recognises the Lovable project, builds it, checks it, and puts it
online. This takes 3 to 5 minutes. Every page address of your app works,
including links straight to a page like /settings.
4. If your project has a .env file
Lovable often keeps your Supabase address and public key in a file called
.env, as VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY.
kaviris deploy never uploads a .env file, so the build would not have
them, and parts of your app that read them would quietly stop working.
The command tells you when this happens and prints the commands to fix it. They are:
kaviris secrets import .env --declare
kaviris contract edit --patch '[{"op":"add","path":"/buildSecrets","value":["VITE_SUPABASE_URL","VITE_SUPABASE_PUBLISHABLE_KEY","VITE_SUPABASE_PROJECT_ID"]}]'
kaviris contract approve
kaviris deploy
If your code reads them as import.meta.env.VITE_..., the contract draft
already lists them as secrets the build reads, and the contract edit line
is not needed. Use the names your .env file actually has (the command lists them). Names
that start with VITE_ go into the pages your visitors download, so they
must only ever hold public values, such as the Supabase address and the
anon or publishable key.
If your project keeps the address and key in
src/integrations/supabase/client.ts instead, there is nothing to do here.
5. What Kaviris tells you, and what to do
After the deploy you get a short list. For a Lovable app it usually says:
- Supabase anon (public) key is written into the code (a note). That key is meant to be public and is allowed. It means anyone can call your Supabase database, so make sure row-level security is on for every table. See publishable_key.
- Advisories for libraries your app uses, with the upgrade to make. The deploy goes ahead; upgrading is up to you. See vuln_fixable.
- Edge functions in your project's
supabase/functionsfolder run on Supabase, not on Kaviris, so Kaviris does not ask for their secrets (such asSUPABASE_SERVICE_ROLE_KEY,OPENAI_API_KEYorLOVABLE_API_KEY). Do not set them on Kaviris, and never put the service-role key anywhere your website can read it (secret_in_client_bundle).
6. If your app has sign-in
Supabase only sends people back to addresses you allow. Add your Kaviris address, or sign-in links and password-reset emails will lead to the old address or fail:
- In your Supabase project, open Authentication, then URL Configuration.
- Set Site URL to
https://myapp.apps.beta.kaviris.com(your own name). - Under Redirect URLs, add
https://myapp.apps.beta.kaviris.com/**. The**allows every page of your app.
If your app uses Lovable's built-in backend, you don't have the Supabase dashboard. This page does not cover that case yet.
7. Supabase functions
If your project has a supabase/functions folder, those functions keep
running on Supabase. Keep changing and deploying them through Lovable (or
Supabase) as before. Your app on Kaviris calls them straight from the
browser; Kaviris does not block that.
Every change, automatically
Not open yet. This needs the Kaviris GitHub App, which is still being built. The GitHub side is described in Deploy from GitHub.
Once it is open: in Kaviris choose Import from GitHub, pick the repository Lovable keeps up to date, and each change you make in Lovable becomes a new deploy. If a deploy is refused, the old version keeps running, and the result shows up as a check on the commit in GitHub, in the Kaviris portal, and by email.