# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview NanoBanana is a French-language Progressive Web App (PWA) for AI image generation using the Google Gemini 2.5 Flash API. It runs entirely client-side with no build step, no bundler, and no package manager. ## Development No build or install commands. Open `index.html` directly in a browser or serve with any static file server: ```bash npx serve . # or python -m http.server 8000 ``` When changing static assets, bump the `CACHE_NAME` version in `sw.js` to invalidate the service worker cache. ## Architecture Single-page app with four files: - **`app.js`** — All application logic: Gemini API integration, job queue, drag-and-drop image handling, history (localStorage), PWA install prompt, lightbox. The `Queue` class processes generation jobs sequentially. - **`style.css`** — Dark theme with CSS custom properties (`:root` vars). Mobile-responsive at 600px breakpoint. - **`index.html`** — Semantic sections: prompt input, resolution selector (1K/2K/4K), drop zone for source images (max 14), generation queue, history grid, lightbox overlay. - **`sw.js`** — Service worker with cache-first strategy. Assets listed in the `ASSETS` array must be updated when adding new files. ## Key Details - API calls go to `generativelanguage.googleapis.com` with the key sent via `x-goog-api-key` header - Aspect ratio is auto-detected from the first source image, snapped to the nearest supported ratio from `SUPPORTED_RATIOS` - History is stored in `localStorage` under key `nanobanana_history`, capped at 50 entries (including base64 image data) - All UI strings are in French