Environment Variables
All variables go in .env.local (local dev) or Vercel project settings (production). Variables prefixed with NEXT_PUBLIC_ are exposed to the browser.
Supabase
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL | ✅ | Your Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | ✅ | Supabase anon/public key |
SUPABASE_SERVICE_ROLE_KEY | ✅ | Service role key (server-side only) |
U300 RFID Reader
These are global fallbacks. Per-location values set in the UI take precedence.
| Variable | Default | Description |
|---|---|---|
U300_WEBAPI_URL | — | Base URL of the U300 relay APK, e.g. http://192.168.1.100:5000 |
NEXT_PUBLIC_U300_WEBAPI_URL | — | Same as above but available client-side |
U300_RELAY_TOKEN | — | Bearer token for authenticating with the relay APK |
U300_API_TOKEN | — | Alias for U300_RELAY_TOKEN |
U300_WEBAPI_TOKEN | — | Alias for U300_RELAY_TOKEN |
U300_INGEST_ENDPOINT_URL | — | URL the relay POSTs tag data to, e.g. https://your-app.vercel.app/api/rfid/u300/ingest |
U300_INGEST_POLL_MS | 1000 | How often (ms) the relay polls the reader. Min 300, max 10000 |
U300_RF_LINK | 1 | RF link profile (0–25). 1 = PR ASK / Miller4 / 250 kHz (recommended for sensor reads) |
U300_ANTENNA_POWER | 20 | Antenna TX power (1–30 dBm). 30 = maximum |
RFID Ingest
| Variable | Required | Description |
|---|---|---|
RFID_INGEST_KEY | ✅ | Secret key the relay sends with every ingest POST. Must match on both sides |
VISION_API_KEY | — | Alias for RFID_INGEST_KEY |
Moisture Sensing
| Variable | Default | Description |
|---|---|---|
RFID_TAG_FAMILY | AZN3120-AFR | Default tag family name (must match a row in rfid_tag_families) |
RFID_SKIP_TID_READS | true | Set to false only if mixing sensor and non-sensor tags on the same antenna |
Shared RFID
| Variable | Description |
|---|---|
RFID_KILL_PASSWORD_HEX | 8-character hex kill password for tag decommissioning |
RFID_KILL_PASSWORD | Alias for RFID_KILL_PASSWORD_HEX |
R1 Reader
| Variable | Description |
|---|---|
R1_WEBAPI_URL | Base URL of the R1 reader service |
NEXT_PUBLIC_R1_WEBAPI_URL | Client-side alias |
CP30 Printer
| Variable | Description |
|---|---|
CP30_WEBAPI_URL | Base URL of the CP30 label printer service |
Priority order
For every RFID setting, the resolution order is:
- Per-location DB value (set via RFID settings UI — highest priority)
- Environment variable (
.env.localor Vercel settings) - Hardcoded default (lowest priority)
This means a venue can override any global env var by saving a value through the UI.