Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ThemeForge Banner

ThemeForge

โœจ AI-powered iOS icon & wallpaper generator with a precision post-processing pipeline

Features โ€ข Architecture โ€ข Quick Start โ€ข Usage โ€ข Post-Processing โ€ข Providers โ€ข Focus Modes โ€ข FAQ โ€ข Contributing


โœจ What is ThemeForge?

ThemeForge takes a screenshot of your iPhone home screen (or a manual app list), detects every app, generates AI-themed icons and wallpapers using Gemini 2.5 Flash / Gemini 3 Pro Image / Higgsfield, post-processes them with iOS-accurate superellipse corners and sharpening, then packages everything into a downloadable zip with a manifest and step-by-step setup guide.

Built for the 10% of iPhone users who actually care about how their home screen looks.

ThemeForge Flow

๐Ÿ–ผ๏ธ Screenshots

Step 1 - Setup Step 2 - Detect
Step 3 - Theme Step 4 - Generate
Step 5 - Download

At a Glance

  • ๐Ÿง  Multi-provider generation: Gemini + Higgsfield
  • ๐ŸŽฏ iOS-accurate superellipse corners and crisp sharpening
  • ๐Ÿงฉ Screenshot detection or manual app entry
  • ๐Ÿ“ฆ Exports icons, wallpapers, manifest, and setup guide

โœจ Features

๐Ÿงฑ Core Pipeline

Step What Happens
1. Setup Enter API key, choose provider (Gemini or Higgsfield), select Gemini model (2.5 Flash / 3 Pro), set icon size (180/512/1024px), toggle post-processing
2. Detect Upload screenshot โ†’ AI Vision (Gemini / OpenAI / Anthropic) identifies all apps, OR manually enter/pick from 60+ quick-select apps
3. Theme Choose from 7 presets (Minimal B&W, Dark Glyph, Outline Mono, Neo Brutal, Soft Ink, Light Mode) or write a custom prompt
4. Generate AI generates individual icons per app + 2 matching wallpapers. Progress tracked per-icon with retry queue for failures
5. Download Preview all icons, download individually or as a zip containing icons/, wallpapers/, manifest.json, and SETUP_GUIDE.md

๐Ÿ› ๏ธ Post-Processing Pipeline

Every generated icon passes through three stages before export:

Raw AI Output โ†’ Square Crop โ†’ iOS Superellipse Corners โ†’ Unsharp Mask Sharpen โ†’ Final PNG
  • Square crop: Centers and crops non-square outputs to 1:1
  • iOS corners: Superellipse curve at 22.37% radius ratio (matches Apple's actual corner geometry, not CSS border-radius)
  • Sharpening: Pixel-level unsharp mask to add crispness without artifacts

Can be toggled off for raw output.

๐ŸŽฏ Focus Mode Integration

  • Assign apps to Work or Home buckets during the theme step
  • Manifest JSON maps each app โ†’ icon file โ†’ URL scheme โ†’ focus mode
  • Setup guide includes exact steps for configuring iOS Focus Mode auto-switching by time/location

๐Ÿ”Œ Dual Provider Support

Provider Model Speed Cost Best For
Gemini gemini-2.5-flash (Nano Banana) ~3-5s/icon Free tier available Default, fast iteration
Gemini gemini-3-pro-image (Nano Banana Pro) ~3-5s/icon Free tier available Higher quality generation
Higgsfield Queue-based (Nano Banana Pro, Seedream, FLUX 2) ~10-30s/icon Credit-based Higher resolution, alternative styles

๐Ÿงฉ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    ThemeForge App                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   Upload /  โ”‚  App         โ”‚  Theme       โ”‚  Download   โ”‚
โ”‚   API Keys  โ”‚  Detection   โ”‚  Selection   โ”‚  & Package  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                    โ”‚                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                 โ”‚
โ”‚  โ”‚        Generation Engine           โ”‚                 โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚                 โ”‚
โ”‚  โ”‚  โ”‚  Gemini  โ”‚  โ”‚  Higgsfield    โ”‚  โ”‚                 โ”‚
โ”‚  โ”‚  โ”‚  Direct  โ”‚  โ”‚  Queue-based   โ”‚  โ”‚                 โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚                 โ”‚
โ”‚  โ”‚       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ”‚                 โ”‚
โ”‚  โ”‚                โ–ผ                   โ”‚                 โ”‚
โ”‚  โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”          โ”‚                 โ”‚
โ”‚  โ”‚     โ”‚ Post-Processing  โ”‚          โ”‚                 โ”‚
โ”‚  โ”‚     โ”‚ โ€ข Square crop    โ”‚          โ”‚                 โ”‚
โ”‚  โ”‚     โ”‚ โ€ข iOS corners    โ”‚          โ”‚                 โ”‚
โ”‚  โ”‚     โ”‚ โ€ข Sharpen        โ”‚          โ”‚                 โ”‚
โ”‚  โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚                 โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚
โ”‚                 โ–ผ                                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                      โ”‚
โ”‚  โ”‚       Zip Packager           โ”‚                      โ”‚
โ”‚  โ”‚  icons/ + wallpapers/        โ”‚                      โ”‚
โ”‚  โ”‚  manifest.json               โ”‚                      โ”‚
โ”‚  โ”‚  SETUP_GUIDE.md              โ”‚                      โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โšก Quick Start

โœ… Prerequisites

๐Ÿงช Option 1: Run on Claude.ai

  1. Copy the entire React component from src/ThemeForge.tsx
  2. Paste into a Claude.ai artifact (React type)
  3. Enter your API key in the app
  4. Start generating

๐Ÿ’ป Option 2: Run Locally

# Clone the repo
git clone https://github.com/MrHalder/themeforge.git
cd themeforge

# Install dependencies
npm install

# Start dev server
npm run dev

๐Ÿš€ Option 3: Deploy to Vercel

Deploy with Vercel

Note: API keys are entered client-side and never stored on any server. They exist only in your browser session memory.


๐Ÿงช Usage

๐Ÿง  Screenshot Detection Mode

  1. Take a screenshot of your iPhone home screen
  2. Upload it to ThemeForge
  3. Gemini Vision will identify all visible apps
  4. Review and edit the detected list (add/remove apps)

โœ๏ธ Manual Entry Mode

  1. Type app names separated by commas, or
  2. Click quick-pick buttons for 60+ popular apps including:
    • System: Phone, Messages, Mail, Safari, Camera, Photos, Maps, etc.
    • Social: Instagram, WhatsApp, Twitter/X, Threads, Snapchat, TikTok
    • Productivity: Slack, Notion, Zoom, Microsoft Teams, Outlook
    • India-specific: Swiggy, Zomato, PhonePe, GPay, CRED, Groww, Zerodha, Ola, Rapido

๐ŸŽจ Theme Presets

Preset Description
Minimal B&W Clean white line icons on black
Dark Glyph Solid white filled symbols on black
Outline Mono White outlined icons on black
Neo Brutal Bold chunky geometric B&W shapes
Soft Ink Hand-drawn ink illustration style
Light Mode Black symbols on white
Custom Write your own prompt

๐Ÿงฉ Custom Prompt Tips

Be specific about:

  • Background: "pure black background" or "white background"
  • Style: "line art", "filled glyph", "geometric", "hand-drawn"
  • Constraints: "no text", "no gradients", "single color"
  • Format: "iOS app icon style", "square format", "centered"

Example:

glassmorphism style icon, frosted translucent white glass on dark background,
subtle white border, soft inner glow, centered minimal symbol, no text,
iOS app icon, square

๐Ÿงต Post-Processing

๐ŸŽ iOS Superellipse Corners

Standard CSS border-radius creates circular corners. iOS uses a continuous superellipse (squircle) โ€” a mathematically different curve that creates smoother, more organic corners.

Standard border-radius:     iOS superellipse:
    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ                   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    โ”‚      โ”‚                  โ•ฑ        โ•ฒ
    โ”‚      โ”‚                 โ”‚          โ”‚
    โ”‚      โ”‚                 โ”‚          โ”‚
    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ                  โ•ฒ        โ•ฑ
                               โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
    (circular arc)          (continuous curve)

ThemeForge approximates the iOS curve using cubic bezier paths at a 22.37% radius ratio โ€” matching Apple's actual implementation.

โœจ Sharpening

AI-generated icons at 512px tend to be slightly soft. The unsharp mask pass:

  1. Computes a blur estimate per pixel (4-neighbor average)
  2. Amplifies the difference between original and blur
  3. Applies at 30% intensity โ€” enough for crispness, no haloing

๐ŸŽš๏ธ Toggle

Post-processing can be disabled entirely via the toggle in Setup. Raw AI output will be exported as-is.


๐Ÿ”Œ Providers

โœ… Google Gemini (Recommended)

  • Detection model: gemini-2.5-flash (vision)
  • Generation models (selectable in Setup):
    • gemini-2.5-flash โ€” "Nano Banana" ยท Up to 32.8K input / 8.2K output tokens
    • gemini-3-pro-image โ€” "Nano Banana Pro" ยท Higher quality generation
  • Rate limits: Free tier ~10-15 RPM, up to 500 requests/day
  • Output: Base64 PNG inline
API Flow: prompt โ†’ generateContent โ†’ base64 PNG in response
Latency: ~3-5 seconds per icon

โšก Higgsfield (Alternative)

  • Base URL: platform.higgsfield.ai
  • Auth: Two-part key โ€” API Key ID + API Key Secret (header: Key {id}:{secret})
  • Model: higgsfield-ai/soul/standard (flagship text-to-image)
  • Architecture: Queue-based async (submit โ†’ poll โ†’ result)
  • Output: URL to generated image
Auth: Key {api_key_id}:{api_key_secret}
API Flow: POST /{model_id} โ†’ request_id โ†’ GET /requests/{id}/status โ†’ completed โ†’ image URL
Latency: ~10-30 seconds per icon (queue dependent)

Note: Higgsfield requires a paid plan. API Key ID and Secret are provided in your dashboard at cloud.higgsfield.ai.

๐Ÿ” Detection Providers

Screenshot app detection supports three AI providers (selectable in Setup when using screenshot mode):

Provider Model API Key Notes
Gemini gemini-2.5-flash (vision) Gemini API key Default. Same key used for generation if Gemini selected
OpenAI GPT-4o (vision) OpenAI API key Detection only. Requires separate key
Anthropic Claude Sonnet 4.5 (vision) Anthropic API key Detection only. Uses browser CORS header

Detection provider is independent of generation provider โ€” you can use OpenAI for detection + Gemini for generation, etc.

๐Ÿง  Detection History (IndexedDB)

ThemeForge persists every detection session locally using IndexedDB:

  • Stored per session: timestamp, screenshot, detection provider, detected apps, selected apps, unchecked apps
  • History view: Collapsible table in Setup showing past sessions with counts
  • Stats: Total uploads, total apps detected, total apps unchecked across all sessions
  • Privacy: All data stays in your browser's IndexedDB. Nothing is sent to any server.

๐ŸŽฏ Focus Modes

ThemeForge generates a complete Focus Mode setup in every zip:

๐Ÿ“ฑ How It Works on iOS

  1. Work Mode โ€” Shows only work-related apps on a dedicated home screen page
  2. Home Mode โ€” Shows personal/entertainment apps on a separate page
  3. Auto-switching โ€” iOS Focus can trigger by:
    • Time: Mon-Fri 9am-6pm = Work
    • Location: Office WiFi/GPS = Work, Home = Personal
    • Smart Activation: iOS learns your patterns

๐Ÿงพ manifest.json Structure

{
  "version": "2.0",
  "theme": "minimal-bw",
  "provider": "gemini",
  "iconSize": 512,
  "postProcessed": true,
  "modes": {
    "work": [
      {
        "app": "Slack",
        "icon": "icons/Slack.png",
        "urlScheme": "slack://"
      }
    ],
    "home": [
      {
        "app": "Instagram",
        "icon": "icons/Instagram.png",
        "urlScheme": "instagram://"
      }
    ]
  }
}

๐Ÿ”— URL Schemes

ThemeForge ships with 90+ pre-mapped URL schemes for popular apps. The manifest includes these for advanced users who want to build custom Shortcuts automations.


๐Ÿ“ฆ Output Structure

themeforge_minimal-bw_512px_1738934400000.zip
โ”œโ”€โ”€ icons/
โ”‚   โ”œโ”€โ”€ Instagram.png        (512ร—512, post-processed)
โ”‚   โ”œโ”€โ”€ WhatsApp.png
โ”‚   โ”œโ”€โ”€ Safari.png
โ”‚   โ”œโ”€โ”€ Slack.png
โ”‚   โ””โ”€โ”€ ... (one per selected app)
โ”œโ”€โ”€ wallpapers/
โ”‚   โ”œโ”€โ”€ wallpaper_1.png      (portrait, matches theme)
โ”‚   โ””โ”€โ”€ wallpaper_2.png
โ”œโ”€โ”€ manifest.json            (appโ†’iconโ†’URL schemeโ†’mode mapping)
โ””โ”€โ”€ SETUP_GUIDE.md           (step-by-step iPhone setup instructions)

๐Ÿšง Limitations

Being upfront about what this can and can't do:

Limitation Why Workaround
No auto-apply icons iOS doesn't allow programmatic icon assignment Setup guide walks through manual Shortcuts method (~1 min/icon)
Shortcut banner flash Custom icons via Shortcuts briefly show the Shortcuts app Use iOS Focus Mode pages to minimize friction
No notification badges Shortcut-created icons don't show badge counts Keep App Library accessible for badge-critical apps
AI consistency Icons in a batch may have slight style variations Regenerate individual icons, or use more specific custom prompts
Rate limits Free Gemini tier caps at ~15 requests/minute Built-in 1.5s delay between calls; paid tier removes limits

๐Ÿงฑ Project Structure

themeforge/
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ vite.svg
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ App.tsx               # App wrapper
โ”‚   โ”œโ”€โ”€ db.ts                 # IndexedDB persistence layer
โ”‚   โ”œโ”€โ”€ main.tsx              # React entry point
โ”‚   โ”œโ”€โ”€ ThemeForge.tsx        # Main app component (single-file)
โ”‚   โ””โ”€โ”€ vite-env.d.ts         # Vite type declarations
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ themeforge-banner.svg
โ”‚   โ”œโ”€โ”€ demo-flow.svg
โ”‚   โ””โ”€โ”€ screenshots/
โ”‚       โ”œโ”€โ”€ step-1-setup.png
โ”‚       โ”œโ”€โ”€ step-2-detect.png
โ”‚       โ”œโ”€โ”€ step-3-theme.png
โ”‚       โ”œโ”€โ”€ step-4-generate.png
โ”‚       โ”œโ”€โ”€ step-5-download.png
โ”‚       โ””โ”€โ”€ raw/ (base screenshots)
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ vite.config.ts
โ”œโ”€โ”€ eslint.config.js
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ .gitignore

๐Ÿ—บ๏ธ Roadmap

  • Batch retry with alternative prompts for failed icons
  • Icon style preview before full generation (generate 1 sample first)
  • SVG export option (trace PNG โ†’ vector)
  • Widget generation (Widgetsmith compatible)
  • Shortcut file (.shortcut) generator for semi-automated setup
  • Community theme gallery (share/import theme presets)
  • Android support (Material You icon shapes)

โ“ FAQ

Q: Do I need all the API keys? No. You need a generation provider key (Gemini or Higgsfield) and a detection provider key (Gemini, OpenAI, or Anthropic) only if you're using screenshot detection. Manual app entry requires no detection key. You can mix providers โ€” e.g., OpenAI for detection + Gemini for generation.

Q: Are my API keys stored anywhere? No. Keys exist only in your browser's session memory (React state). They're never saved to localStorage, cookies, or any server. They're sent directly to the respective APIs via HTTPS. Detection history (screenshots, app lists) is stored locally in your browser's IndexedDB โ€” never uploaded.

Q: How much does generation cost? With Gemini's free tier: $0 for small batches (~15 icons). At scale, Gemini API pricing applies per token. A typical 25-icon set + 2 wallpapers costs pennies.

Q: Why not use iOS 18's built-in dark/tinted icons? iOS 18's tinting only changes the icon's background shade and applies a color filter. ThemeForge generates entirely new icon designs โ€” different symbols, different art styles, completely custom aesthetics. Different league.

Q: Can I use this for Android? The icon generation works for any platform. The post-processing currently applies iOS superellipse corners. Android support (squircle/teardrop/circle shapes) is on the roadmap.

Q: The generated icons don't look consistent โ€” what do I do? Add more specificity to your prompt. Include exact details like "2px white stroke on pure #000000 background" rather than "minimal style." You can also regenerate individual icons that don't match.


๐Ÿค Contributing

Contributions welcome. Particularly interested in:

  1. More URL schemes โ€” If you know an app's URL scheme that's not mapped, submit a PR
  2. Theme presets โ€” Create and share new preset prompts that produce consistent results
  3. Post-processing improvements โ€” Better superellipse approximation, adaptive sharpening
  4. Provider integrations โ€” DALL-E, Stable Diffusion, Midjourney API support
# Fork โ†’ Clone โ†’ Branch โ†’ Commit โ†’ PR
git checkout -b feature/your-feature

๐Ÿ“„ License

MIT โ€” do whatever you want with it.


Built for the 10% who care about their home screen.
Star โญ if this saved you from manually Googling "aesthetic iOS icon pack" for 3 hours.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages