Skip to content

idorozin/banana-polish

Repository files navigation

BananaPolish

BananaPolish is a Next.js app for batch restoration of old photos using Gemini image models.

Upload one ZIP file of images, run restoration in parallel, review each output, and download a final ZIP.

Features

  • Batch ZIP upload with nested folder support
  • Parallel image processing with retry handling for rate limits
  • Review flow (accept/reject per image) with targeted reprocessing
  • Live progress updates over Server-Sent Events (SSE)
  • Download package modes:
    • both: repaired image plus original copy (_original suffix)
    • repaired-only: repaired image only, fallback to original if missing

Examples

BananaPolish example 1 BananaPolish example 2

Requirements

  • Node.js 20+
  • npm 10+
  • A Gemini API key (GOOGLE_API_KEY or GEMINI_API_KEY)

Quick Start

npm install
cp .env.example .env.local

On Windows PowerShell, use copy .env.example .env.local.

Set GOOGLE_API_KEY in .env.local, then run:

npm run dev

Open http://localhost:3000.

Supported Input

  • One .zip file per job
  • Image types: .jpg, .jpeg, .png, .webp, .gif, .bmp, .tiff, .tif

Scripts

  • npm run dev: start local development server
  • npm run build: production build
  • npm run start: run production server
  • npm run lint: run ESLint
  • npm run typecheck: run TypeScript check
  • npm run check: lint + typecheck + build

Data and Storage Notes

  • Uploaded and generated files are stored under your OS temp directory in bananapolish/<jobId>.
  • In-memory job metadata is process-local and resets when the server restarts.
  • Jobs older than 24 hours are cleaned up automatically.

Contributing

Please read CONTRIBUTING.md before opening a pull request.

License

This project is licensed under the MIT License. See LICENSE.

About

BananaPolish is a Next.js app for batch-restoring old photos with Gemini image models. It lets users upload a single ZIP (with nested folders), run parallel restoration with live progress updates, review each result, reject and reprocess images with targeted feedback, and export a final ZIP in either repaired-only or repaired-plus-original mode.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages