How Foundry works
Foundry is an AI that writes Solana apps from a conversation. You describe the app, it writes the files, runs the app beside the chat and keeps every version. This page explains each part.
Getting started
Open Build, type what you want and press Build it. Or pick a template: a working app you can change by asking. No account: your projects are tied to the browser you made them in.
Good first messages say what people see, what they can click, and what should happen on chain. For example: "A devnet raffle: people enter with 0.01 SOL, a countdown, a list of entries, and a button that picks a winner."
Plan and build
Build (the default) writes and changes files. While it works you see each step: the file it is writing and its size so far, then a short summary of what changed, with every changed file one click away.
Plan changes nothing. Talk the idea through; when it is clear, the AI writes a plan (what it does, screens, on-chain parts, files, steps). The plan lands in the Plan tab, where you can edit it, then press Build this plan.
In the message box, / opens ready commands (add a footer, make it work on phones, dark mode, a connect-wallet button, loading states, a smart contract, find bugs, explain the app) and @ names a file of the project.
Preview and console
The preview runs your app as it is now, and reloads after every build. Phone shows it at phone size; Open shows it in its own tab.
Errors and console lines from the app show in the console under the preview. When there is an error, Fix with AI sends it to the AI, which finds the cause in the files and fixes it.
Pick: click it, then click any part of the app. That element goes with your next message, so "make this bigger" means exactly that part.
The wallet bridge
Apps built here run in a sealed frame on their own origin: they can not read this site's data or act as you on it. A browser wallet can not reach into such a frame, so the page around it holds the wallet and the app asks through window.foundry.wallet. Your wallet still shows and approves every request itself.
await foundry.wallet.connect() // the address, base58
await foundry.wallet.signTransaction(tx) // signed copy, same kind of transaction
await foundry.wallet.signAndSendTransaction(tx, conn) // the signature
await foundry.wallet.signMessage(bytes) // Uint8Array
foundry.wallet.publicKey // the address, or null
foundry.wallet.on('connect' | 'disconnect', fn)
Code written for window.solana also works inside the frame. A downloaded app opened on its own uses the browser wallet directly. Phantom, Solflare and Backpack are supported. Apps start on Solana devnet unless you ask for mainnet.
Code and versions
The Code tab lists every file. Read any of them, edit and save (each save is a new version), add or delete files. The project downloads as a .zip from the bar.
Every build, edit, picture and rollback makes a version. The Versions tab shows them all; Changes shows a line-by-line diff against the version before, and Roll back here puts any earlier version back as a new version, so nothing is ever lost.
Pictures
The Pictures tab makes images from a description (square, wide or tall, with or without a background) and saves them into the project's assets folder. Use in chat tells the AI to put one in the app.
Smart contracts
Ask for an on-chain program and the AI writes it in Anchor (Rust) under programs/, with tests under tests/, and explains how the web app calls it. The preview runs the web app; compile and deploy the program with Anchor on your own machine for now.
Security report
Audit in the bar has an AI reviewer read the whole project and write a report: each finding with its severity (Critical, High, Medium, Low, Informational), where it is, what can go wrong and the fix, plus what was checked. It covers smart contract code and web code. The report opens as a printable page (Save as PDF) and downloads as Markdown. An AI report gives fast feedback; before a program holds real money, also get an independent audit.
Share and publish
Share turns on a read-only link: anyone with it sees the preview and the code and can remix it into a copy of their own. Publish gives the app its own address on this site (foundryapps.fun/a/your-name) with the wallet bridge included; publish again to put the newest version live, or unpublish. Apps that ask for a seed phrase or a private key are refused.
Credits and limits
Every visitor gets free credits each day, shown in the bar; they come back at 00:00 UTC. A build uses credits by the real work it takes, so a small edit costs a fraction of a first build. Pictures have their own daily count. The whole site also has a daily allowance; when it is used up, building pauses until the next day and your projects stay as they are.
A project holds up to 40 files, each up to 120 KB.
Your projects
Projects are stored on this site and tied to a random key in your browser. Clearing the browser's storage loses access to them, so download the .zip of anything you want to keep. A shared or published project can be seen by anyone with its link.
What it will not build
Pages that ask for seed phrases or private keys, wallet drainers, pages that pretend to be a real company, wallet or exchange, fake airdrops or giveaways, and malware. It says no in one line and offers a fair alternative.
FOUNDRY