Skip to main content
HolyStitch writes a complete, ready-to-run project to the output directory you specify. Nothing is left for you to scaffold — every config file, component, page, and stylesheet is generated from the source HTML.

Full directory tree

Route mapping

The first screen in your Stitch project always maps to /. Every subsequent screen is converted to a lowercase, hyphenated route derived from its name: In Next.js, this creates app/<route>/page.tsx files using the App Router. In Vite, the same screens become src/pages/<ScreenName>.tsx and are registered in src/App.tsx using hash-based routing (/#/changelog).

Config files

tailwind.config.js

Contains the Tailwind theme.extend block extracted directly from your Stitch HTML — colors, font families, dark mode configuration, and any plugins. If Stitch embedded a theme config in the HTML, it is reproduced exactly. If no config was found, HolyStitch falls back to the default Tailwind theme and notes it in project-context.md.
When converting multiple screens, HolyStitch checks for conflicting color token values across screens. If two screens define the same token with different values, a warning is written to project-context.md. Reconcile conflicts in tailwind.config.js using stitch-source/ as the reference.

next.config.js

A minimal Next.js config with no opinionated defaults. Extend it as needed after conversion.

tsconfig.json

A standard TypeScript config targeting ES2017, with strict mode enabled, bundler module resolution, and the next plugin registered. Path aliases include @/* mapped to the project root.

postcss.config.js

Minimal PostCSS config that enables tailwindcss and autoprefixer.

app/layout.tsx — Google Fonts via next/font/google

HolyStitch scans every screen’s <head> for Google Fonts <link> tags and converts them to next/font/google imports in app/layout.tsx. This avoids the CSS @import pattern that triggers a Next.js performance warning. Each font family becomes a named import. Font weights are extracted from the Google Fonts URL query string:
Icon fonts (Material Symbols, Material Icons) cannot be loaded via next/font/google. HolyStitch keeps these as @import url(...) in globals.css regardless of other font settings.
If dark mode is set to "class" in the Stitch theme, the <html> element receives className="dark" automatically.

app/globals.css — Tailwind + custom CSS + icon fonts

globals.css (Next.js) or src/index.css (Vite) is assembled in this order:
  1. Tailwind directives (@tailwind base, @tailwind components, @tailwind utilities)
  2. Icon font @import statements (Material Symbols, etc.) — always present as CDN imports
  3. Custom CSS extracted from <style> blocks in the Stitch HTML <head>
Any Google Fonts @import lines from the original HTML are stripped when Next.js font optimization is active — next/font/google in layout.tsx handles them instead.

stitch-source/ directory

Every screen’s original HTML is written verbatim to stitch-source/<ScreenName>.html before any transformation. The file names are sanitised (non-alphanumeric characters replaced with underscores) to ensure they are safe across operating systems. This directory is the single source of truth for the AI post-conversion workflow. When a generated component has broken JSX or missing content, the AI reads the corresponding stitch-source/ file directly to reconstruct it accurately.
Do not delete stitch-source/. It is deliberately committed alongside the generated code so any AI working on the project in a future session can still verify its output against the original designs.

project-context.md

project-context.md is a Markdown handoff file written after the project files so the AI agent can resume work in a new session without losing context. It contains:
  • Routing table — every route mapped to its page file path, root components, and source HTML file
  • Shared components list — component names that appear on two or more screens, written once and imported everywhere
  • Structural warnings — any issues the converter detected (unclosed tags, low-similarity component name collisions, Tailwind color conflicts)
  • Fix checklist — 9 ordered steps the AI works through to complete the conversion (see Post-conversion checklist)
  • Source HTML reference — a lookup table mapping each screen name to its stitch-source/ file
The file is written last, after all component and page files, so its component and page counts are always accurate.