Skip to content

dvnc-labs/memory-mender

Repository files navigation

Memory Mender

Turn a damaged-photo memory into a warm restored keepsake image with your own OpenAI key.

Live demo: Pending Vercel deployment · Built by Omid Saffari

Memory Mender is a one-page BYOK image restoration ritual for family photos, childhood snapshots, and sentimental archive moments. Upload the damaged photo, describe the era and repair style you want, and the app uses OpenAI image editing to generate a shareable restored keepsake image.

The idea rides the current spike around fast image inpainting/restoration demos while staying consumer-first: it is not a dev tool, and it does not need the author's API key.

Bring your own key

This is a BYOK app: you paste your own OpenAI API key in the browser. The key is kept in sessionStorage, sent only to this app's own /api/run route for the duration of a request, and never stored, logged, or sent anywhere else. No key of the author's is involved — you pay only for your own usage.

Architecture

  • Next.js (App Router) on Vercel.
  • BYOK key handling in src/lib/byok.ts + src/lib/secret.ts (the trust boundary).
  • The model call lives in src/lib/capability.ts — OpenAI Images API (gpt-image-1 image edit/generation), streamed back as a data URI.
  • src/app/api/run/route.ts proxies the key per-request so it never sits in the browser bundle.

Run locally

bun install
bun dev          # http://localhost:3000 — paste your key and go

Develop

bun run lint        # Biome
bun run typecheck   # tsc
bun run build       # production build
bun run test        # Playwright: BYOK no-leak + smoke

License

MIT © Omid Saffari

About

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors