end to end app store screenshot creation using AI
TypeScript agentic-aiappleappstoreautomateclaudecursordesigngenerateiosios-appmarketingscreenshotskillsskills-shswiftswiftuiui
docs: fold editor-control docs into the template README
Parth Jadhave6d39a65f68b
diff --git a/skills/app-store-screenshots/SKILL.md b/skills/app-store-screenshots/SKILL.mdindex a31ca36..0210e48 100644--- a/skills/app-store-screenshots/SKILL.md+++ b/skills/app-store-screenshots/SKILL.md@@ -18,9 +18,9 @@ Scaffold a pre-built Next.js + ShadCN editor that lets the user design and expor- One-click bulk PNG export at every Apple/Google-required resolution via `html-to-image`- Light/dark variant toggle per slide, a toolbar theme picker (one palette preset per named style), locale select- A **Copy ideas** menu next to the headline field with formulas for hero, differentiator, feature, proof, and closer slides-- Per-slide custom background colors, a live font picker, and importing licensed WOFF2/WOFF/TTF/OTF fonts-- Image overlay elements with drag/resize/rotation/layering controls and directional edge fades-- Toolbar Undo/Redo with 25-step in-session history+- Per-slide custom background colors (caption colours stay readable automatically), a live screenshot font menu, and importing licensed WOFF2/WOFF/TTF/OTF fonts+- Image overlay elements (logos, badges, photos) with drag/resize/rotation/layering controls and directional edge fades+- Toolbar Undo/Redo (`⌘Z` / `⇧⌘Z`) over the last 50 edits of the session- Guided in-place migration for older projects created by this skill; passive and explicit migrations keep legacy decks isolated until the user intentionally opts into connected canvasSupported devices out of the box:@@ -706,6 +706,7 @@ project/├── public/│ ├── mockup.png # iPhone bezel (do NOT replace without re-measuring PHONE_SCREEN)│ ├── app-icon.png # → user supplies+│ ├── fonts/imported/ # Fonts imported from the toolbar (commit with the project)│ └── screenshots/...└── src/├── app/@@ -715,21 +716,25 @@ project/├── components/│ ├── editor/│ │ ├── screenshot-editor.tsx # Top-level editor (state, autosave, export)- │ │ ├── toolbar.tsx # Platform tabs, device select, theme, locale, export+ │ │ ├── toolbar.tsx # Platform tabs, device select, theme, font, locale, undo/redo, export│ │ ├── sidebar.tsx # Screen list with @dnd-kit reordering│ │ ├── slide-thumb.tsx # Draggable screen card│ │ ├── preview-stage.tsx # ResizeObserver-scaled connected canvas│ │ ├── inspector.tsx # Right-pane controls for active slide│ │ ├── screenshot-picker.tsx # File drop + picker+ │ │ ├── background-controls.tsx # Per-slide theme / alternate / custom background+ │ │ ├── font-importer.tsx # Hidden input behind the toolbar's "Import font…"+ │ │ ├── image-element-canvas.tsx # Image overlay content (+ create-image-mask.ts edge fade)│ │ ├── slide-canvas.tsx # Data-driven screen/deck renderer (all layouts)│ │ └── device-frames.tsx # Phone, IPad, AppleTV, AppleWatch, CarPlayScreen, MacWindow, Android│ └── ui/ # Minimal ShadCN primitives (button, select, etc.)└── lib/- ├── constants.ts # Canvas sizes, export sizes, themes, frame ratios+ ├── constants.ts # Canvas sizes, export sizes, themes, screenshot fonts, frame ratios├── defaults.ts # Initial slide decks per device├── types.ts # Slide / ProjectState / Theme types- ├── storage.ts # useProject() — localStorage autosave hook+ ├── storage.ts # useProject() — autosave + undo/redo history├── image-cache.ts # preloadImages + img() helper+ ├── contrast.ts # Readable caption colours on custom backgrounds├── export-render.ts # Slide → PNG; waits for every screenshot to paint└── utils.ts # cn() helper```diff --git a/skills/app-store-screenshots/template/README.md b/skills/app-store-screenshots/template/README.mdindex 1caf84c..fe552d4 100644--- a/skills/app-store-screenshots/template/README.md+++ b/skills/app-store-screenshots/template/README.md@@ -13,9 +13,7 @@ bun dev # http://localhost:3000- **Connected canvas editor** (`src/components/editor/`) — every screen sits on one horizontal canvas, so phones, captions, and other elements can be dragged across screen boundaries and exported as split crops when Connected mode is enabled.- **Screen controls** — drag-to-reorder screens, click-to-edit text, screenshot drop targets, per-screen layout switcher, dark/light toggle.-- **Image overlays** — add PNG/JPG elements, then upload or replace them, drag, resize, rotate, layer, crop, and apply a one-sided edge fade. See [Image Elements](docs/image-elements.md).-- **Edit history** — undo or redo up to 25 recent changes from the toolbar or keyboard. See [Edit History](docs/edit-history.md).-- **Live themes, fonts, and backgrounds** — change the deck theme or font live; set each slide to its theme background, alternate, or custom color. Fonts can be imported from WOFF2, WOFF, TTF, or OTF files. See [Themes](docs/themes.md), [Screenshot Fonts](docs/screenshot-fonts.md), and [Background Controls](docs/background-controls.md).+- **Image overlays, fonts, backgrounds and undo** — PNG/JPG overlay elements, a live screenshot font menu (with font import), per-screen custom backgrounds, and toolbar Undo/Redo. See [Editor controls](#editor-controls).- **Device frames** (`src/components/editor/device-frames.tsx`) — iPhone (PNG mockup), iPad, Apple TV, Apple Watch, CarPlay head unit, Mac window, Android phone, Android tablet (portrait + landscape), feature graphic.- **Auto-save (git-trackable)** — every change is persisted within ~600ms to **`app-store-screenshots.json`** at the project root (via `/api/project`) **and** mirrored to `localStorage` as an instant-paint cache. Commit `app-store-screenshots.json` and you can `git clone` to another machine and resume exactly where you left off.- **Multi-device decks** — iOS (iPhone, iPad, Apple TV, Apple Watch, CarPlay), Mac, and Android decks live side by side; switching the platform tab keeps each tab's last device.@@ -47,11 +45,31 @@ CarPlay has no App Store Connect slot of its own: the CarPlay deck is a head-uniMac is its own platform tab because App Store Connect lists macOS separately from the iOS app. The Mac deck designs at 2880×1800 and exports the four 16:10 Mac App Store sizes (2880×1800, 2560×1600, 1440×900, 1280×800) to `macos/mac/<WxH>/<locale>/`. The Mac window's content area is exactly 16:10, so a full-screen 16:10 capture fills it uncropped.+## Editor controls++### Themes and backgrounds++The toolbar **Theme** menu recolours the whole deck (backgrounds, text, accents); it doesn't touch copy, layouts or screenshots. Each screen's **Background** control in the inspector picks the theme background, the theme's alternate (dark/light) background, or a **custom colour** (colour picker or hex). A custom colour applies to that screen only and is saved as `backgroundColor` on the slide. When the theme's text or label colour would be hard to read on it (below a 4.5:1 contrast ratio for text, 3:1 for the label), the caption switches to the theme's other text colour, or to near-black / white. Text elements you've given an explicit colour keep it.++### Screenshot fonts++The toolbar font menu sets the typeface of the screenshot canvas and exports (not the editor UI). **Inter (default)** is the template font and what projects without a `fontId` use. **System Sans** and **Georgia** are available everywhere; **Avenir Next**, **Helvetica Neue**, **Futura**, **Baskerville**, **Palatino**, **Optima** and **American Typewriter** are macOS system fonts that fall back to similar faces elsewhere, so export on the machine you designed on.++**Import font…** at the bottom of the menu takes a licensed WOFF2, WOFF, TTF or OTF file (16 MB max). `/api/upload-font` checks the file's magic bytes and stores it as `public/fonts/imported/<hash>.<ext>`; the project saves it as `importedFont` with `fontId: "self-hosted"`, so commit that folder with the project JSON. Once imported, the font is listed in the menu under its file name, and it is loaded and embedded before every export.++### Image overlays++In the inspector's **Elements** card, click **Image**, then **Pick** (or drop) a PNG/JPG. Uploads go through `/api/upload` into `public/screenshots/uploaded/`, like screenshots. The first image sizes the overlay frame to its aspect ratio; after that you can drag, resize, rotate (canvas handle or slider), restack, choose **Fill frame** (crop) or **Whole image**, and fade one edge into the background. In Connected mode overlays can cross screen edges like other elements. Overlays are saved per screen as `imageElements`, and the exporter waits for them to paint just like device screenshots. The Play Store feature graphic has a fixed icon + name + tagline layout, so it doesn't take overlays or text elements.++### Undo and redo++The toolbar arrows, `⌘Z` / `Ctrl+Z` and `⇧⌘Z` / `Ctrl+Shift+Z` (or `Ctrl+Y`) step through the last 50 edits of the session: copy, layouts, element moves, text sizes, backgrounds, fonts, themes, overlays and resets. Rapid changes (typing, dragging a slider) collapse into one step. Switching platform, device, orientation or locale isn't an edit, so it doesn't use up an undo step; undoing an edit takes you back to the deck it was made on. While a text field is focused the shortcuts undo that field's typing instead. History resets on reload.+## Customizing| Where | What ||-------|------|-| `src/lib/constants.ts` | Canvas dimensions, export sizes, frame ratios, themes, locales |+| `src/lib/constants.ts` | Canvas dimensions, export sizes, frame ratios, themes, screenshot fonts, locales || `app-store-screenshots.json` | Canonical starter project: app name, current device, connected-canvas mode, slide copy, screenshots, and transforms || `src/lib/defaults.ts` | Fallback/reset state used when no project file or local cache exists || `src/components/editor/slide-canvas.tsx` | Add new layouts and connected-canvas element rendering |diff --git a/skills/app-store-screenshots/template/docs/background-controls.md b/skills/app-store-screenshots/template/docs/background-controls.mddeleted file mode 100644index 72aa7c9..0000000--- a/skills/app-store-screenshots/template/docs/background-controls.md+++ /dev/null@@ -1,15 +0,0 @@-# Background Controls--Each slide has its own **Background** control in the right-hand Screen settings panel.--- **Theme background** uses the deck’s active theme color.-- **Theme alternate** uses the second background color from that theme. This is the per-slide light/dark variation.-- **Custom color** opens a color picker and hex input. The color only applies to the selected slide and overrides the theme background there.--Switching back to either theme option removes the custom override. Background choices are saved with the slide in `app-store-screenshots.json` and included in exports.--## Relevant code--- `src/components/editor/background-controls.tsx` provides the editor controls.-- `src/components/editor/slide-canvas.tsx` renders the selected background.-- `src/lib/storage.ts` validates saved custom hex colors during load.diff --git a/skills/app-store-screenshots/template/docs/edit-history.md b/skills/app-store-screenshots/template/docs/edit-history.mddeleted file mode 100644index fc363c8..0000000--- a/skills/app-store-screenshots/template/docs/edit-history.md+++ /dev/null@@ -1,17 +0,0 @@-# Edit History--The screenshot editor keeps the 25 most recent canvas and project edits available during the current browser session.--## Using it--- Select **Undo** in the toolbar, or press `Command + Z` on macOS (`Ctrl + Z` on Windows/Linux).-- Select **Redo** in the toolbar, or press `Command + Shift + Z` on macOS (`Ctrl + Shift + Z` on Windows/Linux). `Ctrl + Y` also redoes an edit on Windows/Linux.-- The buttons are unavailable when there is nothing left to undo or redo.--Typing and slider adjustments made in quick succession are combined into one history step, so a single Undo reverses the full small adjustment rather than one character or slider tick at a time. The history resets when the editor reloads.--## Relevant code--- `src/lib/storage.ts` owns the 25-step in-memory history stacks and state restoration.-- `src/components/editor/toolbar.tsx` renders the Undo and Redo buttons.-- `src/components/editor/screenshot-editor.tsx` connects the editor’s state history to the toolbar and keyboard shortcuts.diff --git a/skills/app-store-screenshots/template/docs/image-elements.md b/skills/app-store-screenshots/template/docs/image-elements.mddeleted file mode 100644index 0aa410c..0000000--- a/skills/app-store-screenshots/template/docs/image-elements.md+++ /dev/null@@ -1,22 +0,0 @@-# Image Elements--The screenshot editor supports image overlays on every non-feature-graphic slide. Use them for a logo, bowling photo, decorative asset, or other visual that should sit above or beside the device frame.--## Use--1. Select a screen in the editor.-2. In **Elements**, click **Image**.-3. Select the new image placeholder on the canvas.-4. Use **Pick** or drag a PNG/JPG into the Image control.-5. Drag, resize, rotate, and reorder the image. Choose **Fill frame** to crop or **Keep whole image** to preserve its full shape.-6. Use **Edge fade** to feather the image into the background from the top, bottom, left, or right. **Fade strength** controls the feather. The opposite edge always stays fully visible. At 100%, the selected edge is fully transparent through its outer quarter, then it feathers into a fully solid opposite quarter.--The editor saves uploaded assets under `public/screenshots/uploaded/` when its local API is available. Each image element is saved in `app-store-screenshots.json`, so its source, placement, rotation, layering, and fit mode are retained across refreshes and included in exports.--## Implementation--- `src/lib/types.ts` defines the persisted `ImageElement` shape.-- `src/components/editor/image-element-canvas.tsx` renders an individual overlay and applies its gradient mask during preview and export.-- `src/components/editor/inspector.tsx` adds upload, fit, layering, and delete controls.-- `src/components/editor/slide-canvas.tsx` includes image overlays in preview and export rendering.-- `src/lib/storage.ts` validates image elements when loading project data.diff --git a/skills/app-store-screenshots/template/docs/screenshot-fonts.md b/skills/app-store-screenshots/template/docs/screenshot-fonts.mddeleted file mode 100644index eb8b2f4..0000000--- a/skills/app-store-screenshots/template/docs/screenshot-fonts.md+++ /dev/null@@ -1,27 +0,0 @@-# Screenshot Fonts--Use the **Font** menu in the toolbar to change the typeface used on the screenshot canvas and in exported images. It does not change the editor’s controls.--## Included choices--- **Inter (default)** keeps the editor's Inter font, which is what projects created before the font menu existed use.-- **Editorial Serif** uses Georgia.-- **Modern Sans** uses the device’s clean system sans-serif font.-- **Classic Serif** uses Georgia.-- **Avenir Next**, **Helvetica Neue**, **American Typewriter**, **Baskerville**, **Optima**, **Palatino**, and **Futura** use their macOS-native versions when available, with sensible fallbacks elsewhere.-- **Import a font** accepts your WOFF2, WOFF, TTF, or OTF file directly.--## Adding your own font--1. Choose **Import a font** in the toolbar, then select **Import font**.-2. Choose a licensed WOFF2, WOFF, TTF, or OTF file. It is copied to `public/fonts/imported/` and used immediately in previews and exports.-3. You can also add a WOFF2, WOFF, TTF, or OTF file manually as `public/fonts/imported/custom-screenshot-font.<extension>`, choose **Import a font**, and the editor uses it when no imported file has been selected.--The selected font is saved in `app-store-screenshots.json` as `fontId`; projects without one use Inter.--## Relevant code--- `src/lib/constants.ts` defines the available screenshot fonts.-- `src/components/editor/toolbar.tsx` provides the font selector.-- `src/components/editor/slide-canvas.tsx` applies the font to previews and exports.-- `src/app/globals.css` registers the self-hosted font location.diff --git a/skills/app-store-screenshots/template/docs/themes.md b/skills/app-store-screenshots/template/docs/themes.mddeleted file mode 100644index 3d45352..0000000--- a/skills/app-store-screenshots/template/docs/themes.md+++ /dev/null@@ -1,18 +0,0 @@-# Themes--Use the **Theme** menu in the toolbar to preview and apply a color system across the entire screenshot deck. Each option shows its background, alternate background, and accent colors before you choose it.--Changing a theme updates every slide immediately and saves the selected theme in `app-store-screenshots.json`. It changes the canvas background, text colors, muted text, accent details, and each slide’s alternate background. It does not change screenshot images, text, layouts, or element placement.--## Included themes--- Five base palettes: **Clean Light**, **Dark Bold**, **Warm Editorial**, **Ocean Fresh**, and **Bloom Roast**.-- One preset per named style in `style-prompts/` (for example **Liquid Glass Aurora**, **Swiss Grid Bold**, **Quiet Japandi**). These are flat palettes for the editor; the style prompt still drives fonts, backgrounds, and decoration.--Themes only set colors. Pick the screenshot typeface separately with the **Font** menu (see `screenshot-fonts.md`), and override a single slide with **Background** in the inspector (see `background-controls.md`).--## Relevant code--- `src/lib/constants.ts` defines the available theme colors.-- `src/components/editor/toolbar.tsx` renders the live theme menu.-- `src/components/editor/slide-canvas.tsx` applies the active theme to the exported and previewed canvas.