EZLogs for Supabase
A Supabase activity log anyone on your team can read.
EZLogs records every row change in your public tables, every sign-up, sign-in and Storage file, with who did it, and turns them into one plain-English action each: “Dana marked task ‘Launch plan’ as done”. It runs inside your database: triggers, an outbox, and a scheduled flush. One SQL migration, open source, read-only.
What gets recorded
- Row changes in the tables in
public, new tables included: insert, update, delete, each column before and after. Tables named like secrets (api_keys,payment_tokens) and framework bookkeeping tables are left out, and very large values show their size. - Auth: sign-ups, email confirmations, sign-ins and deleted accounts, from
auth.usersas a fixed list of fields (never password hashes or tokens). - Storage: files uploaded, replaced and deleted, with bucket, name, size and owner (never the file).
- Names of what already exists, once, when you connect: the id and name of rows of tables other tables point to (a class a booking belongs to), so a new booking reads “for class ‘Power Hour’”. Nothing else from those rows. Never a table with one row per sign-in account (a profile tied to one
auth.usersid), named like people or accounts (members,customers,companies), or with a column for a person’s name, email or phone. Leave any other table out withselect ezlogs.untrack('public.<table>');Activity older than 90 days is deleted automatically; these names are kept until you delete your account. - Page views, with the browser package and only if you turn them on per app: for signed-in people, named by your app’s own routes.
- Who did it, from the JWT claims Supabase already verified for the request: the signed-in person, an anonymous visitor, your server’s service key, or an AI connected through Supabase’s OAuth.
- Optional, in the browser: calls that failed for people (with the reason) and sign-outs, through the open-source
@ezlogs/browserpackage. It never sends a login token, a password or a message; for a failed sign-in or sign-up it sends the email typed, so you see which account was tried.
Install
- Sign up, open Install & keys (the menu behind your initials, top right), choose Lovable · Bolt · v0 under Install EZLogs, and click Create install code.
- Run it in the SQL editor of your Supabase project. It installs the
ezlogsschema and connects with your database key. Running it again later upgrades in place. - Optional: paste the prompt from the same page into your AI builder’s chat (or follow it by hand) to add the browser package: the calls that fail for people, and sign-outs.
Keeping it in your migrations? Add the install SQL (key-free) as a migration, then run the connect line once in the SQL editor, never in a migration, so the key stays out of git:
select ezlogs.connect('ezldb_your_database_key');
Your database key (ezldb_…) is on Install & keys, under Install EZLogs → Lovable · Bolt · v0, after Create install code. It can only send to EZLogs, never read anything.
How it works
- Inside your write, cheaply: an
AFTERtrigger adds one row toezlogs.outbox. No network call inside your write, and a capture error never fails it. If EZLogs can’t be reached, rows wait up to 7 days. - Shipped later:
pg_cronsends waiting rows withpg_netin small batches, and does nothing while your project is idle. - Private: the
ezlogsschema is not reachable through Supabase’s API, and nothing in it is granted toanonorauthenticated. - Sensitive columns stay home: columns named like passwords, tokens, secrets, API keys or card numbers are removed inside the database, in nested JSON too. Leave out a whole table with
select ezlogs.untrack('table');. - Records by name: a row is named by its
name,title,numberorlabelcolumn. Name any other table’s rows by one of its columns withselect ezlogs.name_records('public.<table>', '<column>');(for example('public.invoices', 'reference')shows “Updated invoice ‘INV-0042’”). The prompt for your AI builder proposes them and asks you first. - Read-only: EZLogs never connects to your database and holds no credentials for it. Your database sends; EZLogs only receives.
- Remove it with
select ezlogs.uninstall();(and, if you used the prompt for your AI builder, ask it to remove everything the EZLogs section ofAGENTS.mdlists, and that section itself; then revoke the app’s keys in EZLogs, Install & keys).
Read every line first: github.com/dezsirazvan/ez_logs_supabase.
Built with Bolt or v0?
The same install works for Bolt Database and v0 on Supabase:
- Bolt: first claim the database into your Supabase account (Bolt → Database → Advanced → Claim), then run the install code in the Supabase dashboard → SQL Editor.
- v0 on Supabase: run the install code in the Supabase dashboard → SQL Editor. A v0 app on Neon or another database: use the Next.js install instead.
- Then paste the prompt from the same settings page into your builder’s chat and publish. It adds small open-source packages that report the calls that fail in people’s browsers (and link your server code to the click that started it), plus a migration that names your records. To let the builder’s AI read what happened, connect EZLogs over MCP.
Built with Lovable? The Lovable guide →
How is this different from a Postgres audit table?
An audit table stores raw rows for engineers to query. EZLogs groups each person’s changes into actions, names the person and the record, and writes the sentence your support, product and operations people can read, with alerts and an MCP connector for your AI.
No card required · Read-only by design