1. Wiki
  2. Before It's Gone
  3. API Setup

API Setup

Before It's Gone integrates with several external services. Most are free and require no account. This page covers what each service does, whether you need to configure it, and how.

Overview

ServicePurposeAccount requiredAPI key required
Open Food FactsBarcode lookup, nutritional infoNoNo
TheMealDBRecipe suggestionsNoNo
ResendEmail notificationsYes (free tier available)Yes
SupabaseOptional cloud syncYes (free tier available)No (anon key only)

Open Food Facts

What it does: Looks up barcodes to retrieve product names, categories, kcal per 100g, and allergen tags. Used by:

  • The phone scanner's product review card
  • Barcode field lookup in the Add Item form
  • Batch barcode import
Account requiredNo
API key requiredNo
CostFree (Open Food Facts is a non-profit open database)

Endpoints used:

GET https://world.openfoodfacts.org/api/v2/product/{barcode}.json

Rate limits: Open Food Facts does not publish a hard rate limit, but excessive automated queries are discouraged. The batch barcode import processes one barcode at a time sequentially to stay within reasonable usage.

Data sent: The barcode string only. No personal data, no inventory content.

No configuration needed; the integration works out of the box.

Troubleshooting

  • Barcode returns no result: The product may not be in Open Food Facts yet; it's community-contributed. You can add it at world.openfoodfacts.org. Also check the barcode was scanned or entered correctly (EAN-13, UPC-A, etc.).

TheMealDB

What it does: Suggests recipes when 3 or more items in your inventory are expiring or expired. The app uses the free tier (API v1, no key needed).

Account requiredNo
API key requiredNo (the free tier uses the string 1 as the key, handled internally)
CostFree

Endpoint used:

GET https://www.themealdb.com/api/json/v1/1/filter.php?i={ingredient}

Data sent: The first word of the first expiring item's name (e.g. chicken, milk). No personal data.

Trigger: Automatic when 3+ items are expiring or expired. Dismissed for the current calendar day if you click the × button. Re-appears the next day if items are still expiring.

No configuration needed.

Troubleshooting

  • Recipe suggestions don't appear: At least 3 items must be in an expiring-soon or expired state simultaneously. The banner is dismissed for the rest of the calendar day when you click ×. TheMealDB may not have recipes for every ingredient; the banner only appears if results are returned.

Resend

What it does: Delivers email notifications (expiry alerts, digests) from the desktop app. Resend is the recommended provider: one API key, no mail server required.

Account requiredYes
API key requiredYes
CostFree tier: 3,000 emails/month and 100/day

Setup

  1. Go to resend.com and create an account.
  2. Navigate to API Keys → Create API Key. Give it a name and set Permission to Sending access.
  3. Copy the key: it starts with re_ and is shown only once.
  4. Open the app → Settings → Email Notifications.
  5. Set Provider to Resend, paste the key, enter a recipient email, and click Save email settings.
  6. Click Send test email to verify.

For the full email notifications guide including SMTP, digest scheduling, and troubleshooting, see Email Notifications.

Supabase

What it does: Provides optional cloud sync. You create and own the Supabase project; AetherAssembly has no access to it.

Account requiredYes (at supabase.com)
API key requiredNo; the app uses the project's public anon key, which is safe to store in localStorage
CostFree tier: 500 MB database, unlimited auth users

Security model

The anon key is a publishable key; it is safe to store client-side. All access is controlled by Supabase's Row Level Security policy, which restricts each user to only their own rows. Without a valid authenticated session, the anon key cannot read or write any data.

For the full setup walkthrough including the required SQL migration, see Cloud Sync.

Last updated: 2026-10-04 AetherAssembly/Before-Its-Gone → License: GNU AGPLv3