Data protection

Surplus handles real personal data — names, emails, phone numbers, and addresses of people and organizations in the food-rescue network.

What personal data exists

  • Account data — user name, email, profile image
  • Organization contacts — names, emails, phones, addresses for donors and recipients
  • Location data — addresses and coordinates
  • Operational notes — free-text on events and routes
  • Billing data — billing contact fields tied to cost-sharing agreements. Card data is handled by Stripe; Surplus does not store it.

Encryption

In transit: All deployed traffic uses HTTPS. The app sends HSTS with a one-year max-age. Session cookies are Secure in staging and production.

At rest: Data lives in managed services that encrypt at rest by default — PostgreSQL (Neon), Redis (Upstash), and object storage (Tigris).

Backups

Surplus backs up database and files daily to separate private storage buckets:

  • Database — logical dump via scheduled cron; Neon also provides point-in-time recovery
  • Files — mirror of the primary bucket to a dedicated backup bucket

Backup objects cannot be retrieved through the application. Retention periods and restore procedures are operational policies being formalized.

Keeping PII out of logs

The server writes one structured log line per server call — the procedure, its status and duration, and the user's internal id and role — and never logs request or response bodies, cookies, or Authorization headers.

Error monitoring (Sentry) receives errors from the web app, its server, and scheduled jobs, and keeps PII out:

  • Users are identified only by internal id and role, never by name or email.
  • Not sent: cookies, request and response bodies, query strings, local variables, database query values, and all but a few technical headers.
  • Masked before sending: email addresses in error messages and log lines, in the browser and on our servers. Sentry scrubs sensitive fields and IP addresses again on arrival.
  • Session replays are recorded only when an error occurs, with all text, inputs, and images masked.

Data minimization

Public endpoints return the minimum necessary. The public map surface exposes geographic shapes without identifying address detail.

File uploads

  • Size limit: 25 MB, enforced server-side
  • Access: served by the app at /files, with a signed-in session, and a short-lived signed link for attachments — see Access control
  • Sanitization: filenames sanitized; path traversal rejected