Hold yourdata up tothe light.
assay runs read-only SQL checks on PostgreSQL, on a schedule. A check should return nothing: every row it returns is a problem, and a query that breaks never passes for clean.
No sign-up. A sample shop database with problems planted in it. Apache-2.0.
Run · Oct 19, 23:00 UTC Duplicate orders returned 6 rows: orders 1–6 and their copies 1501–1506, same customer, same total, placed 40 seconds apart, 1,500 rows apart on the same film.
One run, read on the light box.
Every run takes the same four steps, whether a schedule, a person or an agent starts it.
The check's SQL is validated as read-only when it is saved and again before every run, then runs in a read-only transaction under a statement timeout, 30 seconds by default. This one asks for every product whose stock is below zero.
No rows is a clear film: Clean. Rows are marks of light: Issues. In the live demo's run of Oct 19, 23:30 UTC, three products were below zero.
Every row is matched with the previous run, so you see what changed: lit on both films is still open, lit only on the new film is new, lit only on the old one is fixed.
An alert goes out only when something changed: new rows, a query that breaks, a check that is clean again. It goes to Slack, Discord, Telegram, Feishu, WeCom or a webhook.
Negative inventorycheck · SQL
1SELECT p.sku, p.name, i.on_hand, i.reserved2FROM demo.inventory i3JOIN demo.products p ON p.id = i.product_id4WHERE i.on_hand < 05ORDER BY i.on_hand;BEGIN READ ONLYstatement_timeout 30 s by default
Run · Oct 19, 23:30 UTC
3rows Issues
| sku | name | on_hand | reserved |
|---|---|---|---|
| SKU-0007 | Chair 7 | -3 | 4 |
| SKU-0023 | Mouse 23 | -3 | 2 |
| SKU-0041 | Mouse 41 | -3 | 0 |
A real run of the live demo.
Example Next run, 30 min later
- 1new
SKU-0052 - 2still open
SKU-0007SKU-0041 - 1fixed
SKU-0023
A row is matched by all of its values.
assay00:00
Negative inventory: 1 row new
Now returns 3 rows
1 new, 2 still open, 1 fixed
Reading never
changes the part.
Radiography tests a weld without touching it. A check reads your database the same way: SQL that could write is refused, and the run is read-only all the way down.


DELETE FROM demo.payments
WHERE amount = 0;Validator · refused on save
"DELETE" is not allowed. Checks can only read data.
Validator: On save and before every run. Only SELECT, WITH, EXPLAIN or DO. 32 keywords and 23 functions with side effects are refused.
BEGIN READ ONLY: Every run is one read-only transaction. Each statement runs alone, so a second one cannot ride along.
Statement timeout: PostgreSQL stops a check that runs too long: 30 s by default, 1 to 255 s. A stopped check is Broken.
SELECT-only role: Recommended. Connect as a role that can only read. Test connection warns you when the role could write.
Secrets sealed
Connection strings and channel secrets are encrypted at rest (AES-256-GCM), never returned by the API and never logged.
Private hosts refused
Data sources on private, loopback or link-local addresses are refused unless you allow them.
AI never gets the row values
Triage runs only when you ask. It gets the SQL, the schema and a column profile, never the rows a check returns. An error message or a literal in your SQL can still quote a value.
A check should
come back empty.
A check is one read-only query, and every row it returns is a problem. A run ends one of three ways, and the three never look alike.
Clean0 rows
The query read the table and returned nothing. That is the state you want.
Refunds larger than payment · Sep 29, 11:55 UTC
- 120840.1008-15 19:09:17
- 21051321.4809-16 21:56:22
- 3121975.3308-03 07:14:30
- 456226.6207-19 20:10:06
- 5147166.1408-30 04:30:43
- 6159839.1008-05 18:09:14
- 150120840.1008-15 19:09:57
- 15021051321.4809-16 21:57:02
- 1503121975.3308-03 07:15:10
- 150456226.6207-19 20:10:46
- 1505147166.1408-30 04:31:23
- 1506159839.1008-05 18:09:54
Issues6 rows
Every lit row is a problem. Orders 1 to 6 were placed again 40 seconds later as 1501 to 1506.
Duplicate orders · Oct 19, 23:00 UTC
Query failed · nothing read
column "shipping_status"
does not existBrokenquery failed
The query itself failed, so nothing was checked. A failed query never passes for clean data.
Shipping status check (broken) · Sep 29, 11:55 UTC
Real runs of the demo workspace’s checks (scripts/demo).
Reviewed by people.
Explained by AI.
Read by agents.
A check from anyone but an admin waits for review before it runs. AI explains a broken run when you ask. Agents read the same checks through MCP.
Every table, held
up to the light.
The six tables of the demo shop, one line per row. Where a check returned a row, its line is lit.
Generated from the demo seed (scripts/demo/schema.sql): one line per row, shaded by its values where the seed fixes them and by the seed's own ranges elsewhere. Lit: the rows each check returned in its last real run (Sep 29, Oct 19).
Open source.
Runs on your own stack.
Apache-2.0. The plate on the back of the box lists everything assay needs. Fill in .env.local, and five lines get it running on your machine, with the sample shop loaded if you want it.

- License
- Apache-2.0
- Version
- 0.5.0
- App
- Next.js 16, Node 22.19+
- Store
- MongoDB, for checks, runs and users
- Reads
- PostgreSQL, read-only
- Sign-in
- Google or GitHub OAuth
- Schedules
- A cron expression per check, in UTC
- Trigger
- QStash, any cron or GitHub Actions, every 30 minutes
- Cache
- Upstash Redis, optional
Quick start
git clone https://github.com/jma49/Assay.gitcd Assay && npm install# MongoDB, PostgreSQL, Better Auth, Google or GitHubcp .env.example .env.local# optional: the sample shop and its checksnpm run seed:demonpm run devThen sign in once and make yourself admin: npm run user:set-role -- you@example.com admin
Before you point it
at production.
More answers in the docsPostgreSQL, and anything that speaks its protocol, such as Neon or Supabase.
DATABASE_URLis the built-in source; admins add more PostgreSQL databases in Settings, and each check picks one. Connection strings are sealed with AES-256-GCM and never returned or logged.No. The SQL is validated as read-only when the check is saved and again before every run, then runs inside
BEGIN READ ONLYwith a statement timeout: 30 s by default, settable from 1 to 255 s. For a second lock, give assay a role that can onlySELECT; Test connection warns when the role could write.A check that could not run: a syntax error, a renamed column, a timeout, a lost connection. Rows are Issues, a finding. Broken is its own state with its own alert, so a failing query is never read as Clean.
column "shipping_status" does not exist
Only a change sends one: a check breaks, finds rows, gets new rows or is clean again. Alerts go to Slack, Discord, Telegram, Feishu, WeCom or a signed webhook. Telegram, and Slack connected with Add to Slack, carry Acknowledge and Mute 24 h buttons; elsewhere, use the Alerts menu on the check page.
AI is off unless the workspace sets
AI_ENABLED, and triage runs only when someone asks for it on a run. It gets the check's SQL, the outcome and error, the row count, the schema and a column profile (types, nulls, distinct values). It never gets the row values, though an error message or the SQL itself can quote one.Anyone, unless the workspace limits sign-up to company domains with
ALLOWED_EMAIL_DOMAINS. New accounts are viewers; an admin gives out the developer, manager and admin roles.assay is open source under Apache-2.0, with no license fee. You run it yourself, so the costs are the services under it: a host for the Next.js app (the guide uses Vercel), MongoDB, the PostgreSQL you already have and, if you want them, Upstash Redis and QStash. With AI on, its model calls go through your own Vercel AI Gateway account.
Find the rows that shouldn't exist.
Run · Sep 29, 11:55 UTC Refunds larger than payment read demo.payments and returned 0 rows: a clear film.
npm run seed:demo loads the same sample shop into your own PostgreSQL.














