[F/OS] Supabase: accounts, database, realtime, storage and server functions for your apps

Supabase for App Inventor

Introduction

Supabase for App Inventor is an open source extension that connects your apps to Supabase, a popular backend with a generous free plan. It's built with Rush, the open source extension builder I maintain, which packages the complete supabase-kt client into the extension so it runs alongside your other extensions without conflicts.

With it, your app can sign users in, keep their data in a real Postgres database protected by row-level security, update every phone live when data changes, store files and photos, and run code on a server. All from blocks, and it works in the AI Companion too.

Features

  • Supabase: sign up and sign in with email and password, with a code sent by email or text message, or anonymously; reset forgotten passwords. Users stay signed in between app starts. Change the email, password or profile, and turn an anonymous user into a full account.
  • SupabaseDatabase: queries as dictionaries with keys from a dropdown, checked before they're sent: filters with any, all and not, ordering by several columns, pages with a total count. Count, insert, upsert, insert or skip, update and delete; call your own database functions; use other schemas.
  • SupabaseChannel: get notified the moment a row is added, changed or deleted, send messages between users, and see who is online, on private channels only your users can join.
  • SupabaseStorage: upload, download, list, search, move, copy and delete files in a bucket; read file details; make temporary links to private files, and upload links for others.
  • SupabaseFunctions: call Edge Functions with JSON or text, headers and any method, in any region.

How it works

Talking to a server takes time, so results arrive in events, like Web.GotText. Data blocks take a tag, any text you choose, and the result event gives it back, so one event handler can tell your requests apart. Rows, users and messages are dictionaries, and lists of rows are lists of dictionaries.

If something goes wrong, each component fires an Error event with a short code, such as invalid_credentials, and a readable message.

Blocks

Every block, with its image and description, is on the Blocks page. Each image there contains its block, so you can drag it straight into your workspace.

Blocks in use

These come from the Live Notes sample project.

Supabase1-SessionChanged
React to who is signed in, including a session restored when the app starts.

procedure-loadNotes
Read the notes with a query: a dictionary whose keys come from the QueryField dropdown.

AddButton-Click
Add a row. The tag "add" comes back with the result.

Notes-GotRows
Handle the rows: show them for "load", reload after "add".

Live-ChangeReceived
Reload when any phone changes a note.

PhotoButton-Click
Upload a media file of the app to the user's folder.

Photos-GotSignedUrl
Show the uploaded photo through a temporary link.

Screenshot

Live Notes sample app

The Live Notes sample on a phone: signed in, notes kept live, one other user online and typing, and an uploaded photo.

Sample project

LiveNotes.aia uses all five components: sign-up and sign-in, a notes list that updates live on every phone, tap to delete, who is online and who is typing, note stats from an Edge Function, and a photo upload.

  1. Create a free project at supabase.com and run schema.sql in its SQL Editor.
  2. Import LiveNotes.aia and set ProjectUrl and PublishableKey on Supabase1 (Project Settings → API Keys).
  3. For the Stats button, deploy the note-stats function from the repository: supabase functions deploy note-stats --project-ref <your-project-ref>.
  4. While testing, turn off Confirm email (Authentication → Sign In / Providers → Email), so new accounts are signed in right away.

Security

  • Only use the publishable key (it starts with sb_publishable_).
  • Turn on row-level security for every table and write policies that decide what each user may read and change. The sample's schema.sql shows how to give each user access to only their own rows and files.

Requirements and testing

  • Android 7.0 (API 24) or newer.
  • Tested with MIT App Inventor (nb206) in the AI Companion, in compiled apps and in installed apps.
  • Tested on: vivo V2332 (Android 16) and an Android 15 (API 35) emulator.
  • Kodular and other App Inventor based builders haven't been tested yet. The extension ships no AARs and adds nothing to the manifest, so it should work, and I'd love to hear your results.

Changelog

View

1.2.0 (2026-10-15)

  • Private realtime channels: the Private property, and channel_refused when a join is refused.
  • Sign in with a code: SendEmailCode, SendSmsCode, VerifyEmailCode, VerifySmsCode.
  • Password reset: ResetPassword and CodeType.PasswordReset.
  • AnyOf, AllOf and Not filters.

1.1.0 (2026-10-14)

  • Queries as dictionaries: Query and QueryPage (with the total count), keys from the QueryField dropdown, checked with errors that say where the mistake is. Select keeps working in existing projects.
  • Ordering by several columns, other schemas, and InsertOrSkip.
  • UpdateUser, ResendConfirmation and Reauthenticate.
  • SearchFiles, FileInfo, SignedUploadUrl and UploadWithToken.
  • PresenceState, and a Region property for Edge Functions.

1.0.1 (2026-10-14)

  • The license is now MPL-2.0: apps that use the extension can keep their code private.
  • LiveNotes.aia contains only the project's own files.

1.0.0 (2026-10-13)

  • First release.

Downloads

Credits and APIs

Supabase and MIT App Inventor are trademarks of their owners; this is a community project, not an official one.

Price and license

The extension is free. It's open source under MPL-2.0: you can use it in any app, free or commercial, and your app's code stays yours. If you change the extension itself and share it, those changes stay open under the same license.

What's next

Coming in v1.3: sign in with Google, GitHub and magic links, two-factor authentication, upload progress for large files, and image thumbnails.

The full list is on the roadmap. Questions, bug reports and ideas are very welcome, here or as GitHub issues.

3 Likes

Version 1.1.0 is out :tada:

Every 1.0 block keeps working, so updating is just importing the new .aix.

Queries as dictionaries

Query and QueryPage take what to read as a dictionary. Its keys come from the new QueryField dropdown: Columns, Filters, OrderBy, Limit and Offset, all optional. Keys from a dropdown can't be misspelled. The extension also checks the whole query before sending it and tells you where a mistake is, for example query.filters[1]: Each filter is a list of column, operator and value.

loadNotes

  • QueryPage also returns the total number of matching rows, for "page 2 of 7".
  • OrderBy takes several columns: done, created_at desc.
  • Select still works in existing projects, but it's hidden from the drawer.

Also new

  • Accounts: UpdateUser changes the email, password or profile, and turns an anonymous user into a full account. ResendConfirmation sends the confirmation email again, and Reauthenticate sends a code for password changes.
  • Database: InsertOrSkip adds rows and skips the ones that already exist. The Schema property reaches tables outside public.
  • Storage: SearchFiles (search, sort and pages), FileInfo for a file's size and type, and signed upload links (SignedUploadUrl and UploadWithToken) that let someone upload a file without access to the bucket.
  • Realtime: PresenceState gives everyone on the channel right now.
  • Edge Functions: the Region property runs functions in a region you choose.

Every block, with its image, is now on the Blocks page, and the guides cover the new blocks. The Live Notes sample uses Query.

Download: v1.1.0 release (extension and sample)

Next up (v1.2): private realtime channels, one-time codes by email and SMS, password reset, OR and NOT filters. The full list is on the roadmap.

Feedback and bug reports are welcome!

Version 1.2.0 is out :tada:

Every earlier block keeps working, so updating is just importing the new .aix.

Sign in with a code

SendEmailCode or SendSmsCode sends a 6-digit code, and VerifyEmailCode or VerifySmsCode signs the user in. No password needed.

SendCodeButton
VerifyButton

Forgot password

ResetPassword emails a code. VerifyEmailCode with CodeType.PasswordReset signs the user in, and UpdateUser sets the new password.

ForgotButton
ResetButton
SavePasswordButton

Supabase's emails contain a link by default, not a code. Add {{ .Token }} to the Magic link and Reset password templates (Authentication → Emails). Text messages need an SMS provider.

Any, all and not filters

AnyOf, AllOf and Not group filters, and they nest. This loads todos that are high priority or not done yet:

loadTodos

Private channels

Anyone who has your publishable key and knows a channel's topic can join a public channel. Set Private to true, and only users your realtime.messages policies allow can join, broadcast and track presence. A refused join fires Error with channel_refused.

joinChat
Chat.Error

The Live Notes sample now uses a private channel. If you run it on your own project, run its schema.sql again: it adds the channel's policies.

Download: v1.2.0 release · Blocks · Guides

Next up (v1.3): sign in with Google, GitHub and magic links, two-factor authentication, upload progress for large files, and image thumbnails. The full list is on the roadmap.

1 Like

Wow​:heart: