Mindket

screenshot-to-code

Newversion 2 · updated
Star81.1k

Overview

Abi Raja’s open source app that turns a screenshot, mockup, Figma design or screen recording into code, in HTML with Tailwind, React, Vue and other stacks. You run it yourself with your own model keys. The setup notes cover the backend and frontend, Docker, API keys and troubleshooting.

screenshot-to-code is an open-source project on GitHub in the Developer category, listed by Mindket. It is free. This is version 2, last updated on . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

At a glance

Runs in
  • Your computer: the FastAPI backend with Poetry and uvicorn, and the React frontend with pnpm
  • Docker: docker-compose builds and starts both
  • The hosted app: the maker’s own product at screenshottocode.com, which the kit only points to
Start with
cd backend
echo "OPENAI_API_KEY=sk-your-key" > .env
echo "ANTHROPIC_API_KEY=your-key" >> .env

Platform

DockerContainer
LinuxOperating system
WindowsOperating system

About

What it is

screenshot-to-code is an open source app by Abi Raja. Its README says it converts screenshots, mockups, Figma designs and screen recordings into clean, functional code using AI. The README lists six stacks: HTML with Tailwind, HTML with CSS, React with Tailwind, Vue with Tailwind, Bootstrap, and Ionic with Tailwind. The app has a React and Vite frontend and a FastAPI backend. You run both yourself and add your own model keys. The maker also runs a hosted product at screenshottocode.com.

  1. You give it a screenshot, mockup, Figma design or recording
  2. The backend asks the models your keys give access to
  3. It writes code for one of the supported stacks
  4. With Chromium installed, it can render the page and check it

Who it suits

Front-end developers and designers who want a first draft of a page from an image, and people who want to self-host the app and change it. The README says running locally is best if you want to customize, self-host or contribute. Skip it if you do not want to manage model keys. The README calls the hosted app the fastest way to try it with no local setup.

Who uses it, and how
IndustryWho uses itHow they use itExample
Web developmentFront-end developersStart a page from a screenshot, in the stack the project already usesA developer drops in a screenshot of a landing page and asks for React with Tailwind.
Design and prototypingDesigners with mockups or Figma designsTurn a design into a page that opens in a browserA designer converts a mockup to HTML with Tailwind and checks it in the browser.
Product and demosProduct teamsTurn a screen recording of a site in action into a functional prototype, as the README describesA product manager records a flow on a site and asks for a prototype. The README says video mode needs a Gemini key.
Self-hosting and open sourceDevelopers who want to change the appRun the FastAPI backend and the Vite frontend and edit either oneA contributor runs both, moves the backend to another port and tests a change.

Where to use it

The maker documents these routes, and the kit has a page for each.

  • Your computer: the FastAPI backend with Poetry and uvicorn, and the React frontend with pnpm
  • Docker: docker-compose builds and starts both
  • The hosted app: the maker’s own product at screenshottocode.com, which the kit only points to

The kit also has pages for API keys and models, Linux, Windows and troubleshooting.

How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with a page for each route above. The main route runs the backend and the frontend in two terminals.

What you need first
NeedDetail
A model keyAt least one of OpenAI, Anthropic or Gemini. The README strongly recommends Gemini and Replicate as well
Python and PoetryThe backend’s pyproject.toml asks for Python ^3.10. The README gives pip install --upgrade poetry for anyone without Poetry
Node.js and pnpmFor the frontend. The README names no Node.js version, and the frontend’s package.json sets pnpm@10.32.1
ChromiumOptional. It lets the agent render its own page and look at it. The README’s playwright line installs it
DockerOnly for the Docker route
  1. Get the repository from GitHub. The README gives no clone command.
  2. In the backend folder, write your keys to .env, install with Poetry and start uvicorn.
  3. In a second terminal, install the frontend with pnpm and start it.
  4. Open http://localhost:5173.

The README’s backend block, run from the repository’s root folder. Write only the key lines you have a key for, and put your real key in place of each placeholder.

cd backend
echo "OPENAI_API_KEY=sk-your-key" > .env
echo "ANTHROPIC_API_KEY=your-key" >> .env
echo "GEMINI_API_KEY=your-key" >> .env
echo "REPLICATE_API_KEY=r8_your-key" >> .env
poetry install
# Install the Chromium browser used by the screenshot preview tool.
# On Linux, use `poetry run playwright install --with-deps chromium` to also
# install the required system libraries (needs sudo/apt).
poetry run playwright install chromium
poetry env activate
# run the printed command, e.g. source /path/to/venv/bin/activate
poetry run uvicorn main:app --reload --port 7001

The frontend block, also from the root folder, in a second terminal.

cd frontend
pnpm install
pnpm dev

How to use it

Open http://localhost:5173. The README gives no click-by-click guide to the app. It says you can add your OpenAI, Anthropic and Gemini keys in the settings dialog, behind the gear icon, and that the same dialog shows whether screenshot preview works on your backend. The repository’s description says what the app is for: drop in a screenshot and convert it to clean code.

Example

You have a screenshot of a page and want its code. Of the routes you run yourself, Docker has the fewest steps. From the repository’s root folder, with your real OpenAI key in place of the placeholder:

echo "OPENAI_API_KEY=sk-your-key" > .env
docker-compose up -d --build

Open http://localhost:5173 and give the app your screenshot. The README says you can’t develop the app with this setup, because file changes won’t trigger a rebuild. Its examples show a NYTimes page, an Instagram page and a Hacker News page.

For newcomers and experts

If you are new. A model reads your image and writes the code. screenshot-to-code is the app around that step, and it includes no model. You add a key from a provider such as OpenAI, Anthropic or Gemini. The Troubleshooting page, written for GPT-4 Vision access, says you have to buy some credits (the minimum is $5) and reach Tier 1. Check OpenAI’s own pages for what your account needs today. The sources do not give the other providers’ prices. A key is a long secret string tied to your account, so keep it out of anything you share. The .env file is a plain text file of KEY=value lines: in the backend folder for the local route, and in the repository’s root folder for the Docker route. Start with one key and one screenshot.

For experts. The backend is a FastAPI app served by uvicorn on port 7001, with --reload in the README’s command. The frontend reaches it through VITE_WS_BACKEND_URL, which frontend/.env.example sets to ws://127.0.0.1:7001, and through VITE_HTTP_BACKEND_URL. Set both in frontend/.env.local when the backend runs elsewhere.

With more keys the app picks a stronger mix of models per variant. With one key it uses that provider’s models only. Gemini powers asset extraction, which reuses the real logos and images from your screenshot. Without a Replicate key, the edit_images and remove_backgrounds tools are unavailable.

For an OpenAI proxy, set OPENAI_BASE_URL in backend/.env or in the settings dialog, with v1 in the path. The README says Ollama models can run it but are not recommended because of poor results, and links an issue comment for the steps.

Good to know

Your screenshots go from the backend to the model providers whose keys you add.

  • Keys: an OpenAI key saved in the settings dialog is, in the Troubleshooting page’s words, “only stored in your browser”. The Replicate key cannot be set in the settings dialog: the README says “Replicate must be configured in backend/.env as REPLICATE_API_KEY”
  • Usage data: the README does not say whether the app sends any. The backend’s pyproject.toml lists langfuse, and the README does not explain it
  • The hosted app: the Troubleshooting page says “If you’re looking to use the hosted version, we recommend getting a paid subscription on screenshottocode.com”. The kit did not read the hosted app’s own pages, so it gives no price, terms or what it does with your screenshots
  • Models: the README names models in two places and the two lists differ. Model names change fast, so read its current list
  • Docker: file changes do not trigger a rebuild, so this route is for running the app, not developing it
  • Platforms: the README gives no macOS step. Its one Windows item: if you see UTF-8 errors when running the backend, open the .env file with Notepad++, then go to Encoding and select UTF-8
  • Versions: the README describes the main branch. The kit read it on 3 November 2026
  • Support: the Troubleshooting page says support covers the open source version only, since the hosted version has no debugging logs
  • Removal: the README gives no update or uninstall steps
  • License: MIT. The LICENSE file reads “Copyright (c) 2023 Abi Raja”

README and files

README

screenshot-to-code: setup notes

This kit holds setup notes only. Mindket wrote them. screenshot-to-code runs from Abi Raja's repository: https://github.com/abi/screenshot-to-code

These notes are not made or endorsed by Abi Raja. The README opens with "Convert screenshots, mockups, Figma designs, and screen recordings into clean, functional code using AI." The repository's own description reads "Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)".

License: MIT. The LICENSE file (https://github.com/abi/screenshot-to-code/blob/main/LICENSE) reads "MIT License" and "Copyright (c) 2023 Abi Raja". The backend's pyproject.toml (https://github.com/abi/screenshot-to-code/blob/main/backend/pyproject.toml) also says license = "MIT".

The maker also runs a hosted product at screenshottocode.com, which the README calls "the official, hosted product". These notes cover the open source code that you run yourself: see setup/hosted-app.md for what the sources say about the hosted one.

What installs

There is no installer and no package to add. You get a copy of the repository, then run two programs from it, or one Docker Compose command. The README gives no clone command, so use GitHub's Code button or git with the repository's address.

  • The backend: a FastAPI app. The README manages it with Poetry and starts it with uvicorn on port 7001.
  • The frontend: a React and Vite app, installed with pnpm and served at http://localhost:5173.
  • Chromium, optional: the backend's screenshot preview tool uses it, and the playwright line in the README installs it.

Source: https://github.com/abi/screenshot-to-code/blob/main/README.md

What you need first

  • At least one model provider key: OpenAI, Anthropic or Gemini. The README strongly recommends Gemini and Replicate as well. See setup/api-keys-and-models.md.
  • Python for the backend. pyproject.toml asks for ^3.10, and the backend Docker image uses Python 3.12.3. You also need Poetry: the README says to run pip install --upgrade poetry if you don't have it.
  • Node.js and pnpm for the frontend. The README names no Node.js version. frontend/package.json sets "packageManager": "pnpm@10.32.1" and an engines field of >=14.18.0, and the frontend Docker image is node:22-bullseye-slim.
  • Docker, only for the Docker route.

Main commands

The README's Docker route, run from the repository's root folder. The README writes the placeholder as sk-your-key, and these notes show it as <your-key>. Put your own key in its place.

echo "OPENAI_API_KEY=<your-key>" > .env
docker-compose up -d --build

Then open http://localhost:5173. The README's local route has more steps: see setup/run-locally.md.

Per-platform notes

  • setup/run-locally.md: the backend with Poetry and the frontend with pnpm
  • setup/docker.md: Docker Compose, with what the compose file and the two Dockerfiles say
  • setup/api-keys-and-models.md: the four keys, the settings dialog and the OpenAI proxy setting
  • setup/linux.md: the Chromium line for Linux
  • setup/windows.md: the README's fix for UTF-8 errors in the .env file
  • setup/troubleshooting.md: the README's FAQ and its Troubleshooting page
  • setup/hosted-app.md: the maker's hosted product, which these notes do not cover

The README gives no macOS-specific step.

Update or remove

The README gives no update or removal steps.

What goes where

Your screenshots or recordings go from the backend to the model providers whose keys you add. The README says Gemini powers asset extraction and that a Gemini key is required for video mode, and that Replicate powers image generation, background removal and image editing. The Troubleshooting page says an OpenAI key pasted into the settings dialog "is only stored in your browser".
The backend's pyproject.toml lists langfuse among its dependencies. The README does not say whether the backend sends anything to it.

Files
README.md  4 KB
setup/api-keys-and-models.md  3 KB
setup/docker.md  2 KB
setup/hosted-app.md  1 KB
setup/linux.md  860 B
setup/run-locally.md  3 KB
setup/troubleshooting.md  2 KB
setup/windows.md  672 B

8 files, 17 KB, downloaded as a zip.

What’s new

  • Version 2 · 2026-11-09

    Updated by Mindket to the current version of this kit.

  • Version 1 · 2026-11-03

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

davidmiglozShow HN: Convert a screenshot to a working Flutter app (OSS tool)Hello everyone! I’ve been having fun this weekend implementing https://pixels2flutter.dev, a tool to convert a screenshot to a working Flutter app. It uses OpenAI GPT-4V(ision) to interpret the screenshot and generate the Flutter code. It then loads the code into DartPad, so you can play with it…1 pointGitHub Trending8. https://github.com/abi/screenshot-to-code - Python, 558 stars today 9. https://github.com/cursor/plugins - TypeScript, 257 stars today 10. https://github.com/freestylefly/awesome-gpt-image-2 - JavaScript, 767 stars today 11. https://github.com/tailscale/tailcat - Go, 790 stars today 12 […]2 likes@bitmeowAI$83abiMistral OCR 4I think until Fable, Claude's vision was significantly worse than GPT and Gemini in my personal experience. I eval almost every vision model since I work on screenshot to code conversion project: https://github.com/abi/screenshot-to-code.GitHub Trending🚀 Skyrocketing! 🚀 (200+ new stars) 📦 abi / screenshot-to-code ⭐ 75,258 (+309) 🗒 Python Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)1 like · 1 reply@hey_SpencerAI$84abirajaShow HN: LangCSS – An AI Assistant for TailwindIf you're looking for a open source version of the same, check out https://github.com/abi/screenshot-to-code@latreon.bsky.social+431 stars in the last week. Screenshot to Code converts screenshots, Figma designs, and screen recordings into clean HTML, React, or Vue code using AI. https://github.com/abi/screenshot-to-code #Python #React #TailwindCSS #OpenSource1 like@perry_weijie别再只会把设计稿丢进对话——这 6 个开源项目,能让设计真正喂进 Agent: 1 → screenshot-to-code(约 8.1 万星 · MIT) 截图/稿 → HTML/React/Vue,先落可改代码 2 → Penpot(约 6.2 万星 · MPL) 开源设计平台,自托管协作稿可导出给 Agent https://t.co/j7GohSiE6p https://t.co/lVJwziVnza https://t.co/3oYh73Io0QabiShow HN: Turn a video of an app into a functional prototype with Claude OpusThanks! There's a dropdown where you can choose a stack for screenshots (Tailwind, React, Vue, etc.). I haven't updated the prompts for the video feature just yet. You can tweak the prompt yourself here: https://github.com/abi/screenshot-to-code/blob/6069c2a118592... The quality of the output code…GitHub Trending8. https://github.com/abi/screenshot-to-code - Python, 309 stars today 9. https://github.com/cursor/plugins - TypeScript, 257 stars today 10. https://github.com/freestylefly/awesome-gpt-image-2 - JavaScript, 1687 stars today 11. https://github.com/tailscale/tailcat - Go, 986 stars today 12 […]1 like@LiumangtuCrypto5 个 GitHub 仓库,能把截图直接变成可用的 UI: 1. screenshot-to-code https://t.co/7GbFckWfKv 2. OpenUI https://t.co/grMSutD5bB 3. v0 Clone https://t.co/OJDnEOutW7 4. GPT Pilot https://t.co/lbXPe7h7wS 5. OpenHands https://t.co/XPGDn4detx 从“我喜欢这个设计”到“把它做出来”,中间的距离已经小得离谱了。

Searched

More from Mindket

See all from Mindket

upscaler

uwg · Kit

Holds a set of image upscaling models gathered from the OpenModelDB community, for people who want to enlarge low-resolution pictures with AI on their own comp…

New

Pixel Art XL

nerijs · Kit

A pixel art style add-on for Stable Diffusion XL that turns text prompts into pixel-style images, with an optional LCM LoRA for faster runs. For game makers, d…

New

VibeVoice-1.5B

microsoft · Kit

Turns written conversations into spoken audio with up to four speakers and about 90 minutes of speech, an open Microsoft text-to-speech model for research on p…

New

Similar in Developer

See all in Developer

voicetut-egyptian-tashkeel

masterofaudio2077 · Kit

Reads Egyptian Arabic text aloud and follows the short vowel marks you write into it. A fine-tune of VoiceTut-TTS that keeps its 19 built-in voices and voice c…

New

Runs Meta's Llama 3.1 8B Instruct chat model in 4-bit AWQ form, so it fits on a GPU with about 4 GiB of free memory for the weights. For developers who want a…

New

Ru-Jev

besktech · Kit

Scores a Russian-first decision from a context and a list of options, giving a probability for yes/no, choice or rating questions. Runs on a plain CPU, for tea…

New