Documentation
Build anything with Petal
Everything you need to go from a single prompt to a published, full‑stack app — with backend, AI, custom domains, and billing covered.
Quickstart
Petal turns plain‑English prompts into a working full‑stack web app. The fastest way to learn is to build something tiny end‑to‑end.
- From the home page, describe what you want to build in one sentence — for example, "A landing page for a coffee shop with a menu and a contact form."
- Petal generates the project, opens the builder, and shows a live preview.
- Use the chat on the left to iterate. Be specific: name the page, the section, and the change you want.
- When you're happy, click Publish to take it live on a free
*.buildwithpetal.comURL.
Prompting tips
Petal works best when each prompt is small and specific. Big "do everything" prompts tend to time out or drift off course.
- One change per message. Ship it, then ask for the next thing.
- Reference the surface. "On the pricing page, make the Pro card the highlighted plan."
- Show, don't tell. Attach a screenshot for layout or style references.
- Name the outcome, not the code. "Users should see their own orders only" beats "add a where clause".
- Push back. If something looks off, say what's wrong and what you expected.
- Use Chat mode for planning and questions; switch to Build mode to make changes.
A good first prompt has three parts: what it is, who it's for, and the two or three things it must do. Example: "A booking site for a barber shop — customers pick a service, choose a time slot, and get a confirmation email."
What you can build
Petal picks the right target from your prompt — say "mobile app" or "Chrome extension" and the whole project is scaffolded for it.
- Web apps — React + TypeScript with routing, a design system, and SEO-ready pages. Published on a free subdomain or your own domain.
- Mobile apps — one React Native codebase for iOS and Android, with a live phone preview you can open in Expo Go. Petal builds the signed
.ipaand.apkfor you; store submission still needs your own Apple or Google developer account. - Backends & APIs — typed server functions, Postgres with row-level security, scheduled jobs, and webhooks.
- Chrome extensions — Manifest V3 with a background service worker, popup UI, and packaged ZIP ready to upload.
Images, screenshots & voice
- Attach a screenshot of what's wrong and circle the area — Petal reads the markup.
- Attach a reference design and say "match this layout, keep our colours".
- Upload a logo or photo and ask Petal to use it in the app.
- Dictate with the mic in the composer when typing a long brief is slow.
Need images you don't have? Ask for them — Petal generates illustrations, hero art, and icons directly into the project.
Petal Cloud (backend)
Petal Cloud is the managed backend that powers data, users, file storage, and custom server logic. Enable it from the builder when you ask for anything that needs to persist across sessions.
- Database — tables, rows, and queries managed for you.
- Authentication — email/password and Google sign‑in.
- Storage — secure file buckets for uploads.
- Functions — server logic that scales automatically.
- Secrets — store API keys safely, never in client code.
Cloud and AI use a shared balance. New paid users get a one‑time $5 free runtime grant on their first plan upgrade or top‑up.
Petal AI
Petal AI gives your app access to top models without you needing to wire up API keys. Just ask Petal to add a chatbot, summarizer, classifier, or image analyzer and it will set up the calls for you.
Common use cases: chatbots, document Q&A, sentiment detection, content generation, translation, and image analysis. Usage runs on your Cloud + AI balance.
Publishing & updates
Click Publish in the builder to deploy. Your app gets a free *.buildwithpetal.com subdomain immediately.
- Frontend changes require pressing "Update" in the publish dialog to go live.
- Backend changes deploy automatically as soon as you publish.
- You can roll back to any earlier version from the builder's history panel.
Custom domains
Once you're on a paid plan, you can connect a custom domain from the publish sheet. Petal handles SSL automatically.
- Open Publish → Domains.
- Add the domain you own (e.g.
example.com). - Add the DNS records Petal shows you at your registrar.
- Wait a few minutes for verification — your site will go live on the new domain.
Auth & security
Petal apps use row‑level security so each user only sees their own data. Roles like "admin" live in a separate roles table, never on the profile, to prevent privilege escalation.
For new sign‑ups, users verify their email before they can sign in. Google sign‑in is enabled by default for a smoother first‑run experience.
Plans & billing
Petal has Free, Pro, Business, and Enterprise plans. Pro is the default and includes a monthly credit allowance. Each chat message in Build mode uses one credit; messages triggered by "Try to fix" are free.
Backend, custom email, and custom domains require a paid plan. Top‑ups never expire and are independent from your monthly credit allowance.
Versions & rollback
Every Petal change creates a version. Open the history panel in the builder to preview, compare, or revert any earlier version — useful when an experiment didn't land the way you hoped.
Troubleshooting
- Build error banner. Click "Try to fix" — it sends Petal the error and is free. If it loops, describe what you were trying to do and ask Petal to simplify the change.
- Preview is blank or stale. Hard‑refresh the preview, or open the published URL in a new tab.
- Backend feels slow. Increase the Cloud instance size from Cloud → Overview → Advanced settings. Allow a few minutes to apply.
- Stuck in an error loop. Stop, summarize the goal in one sentence, and ask Petal to take a different approach.
Invites & referrals
Petal is invite-led while we're in early access. Everyone who joins gets a personal referral link from their profile.
- Share your link — friends who join through it move up the waitlist.
- Invite three friends and your own access is unlocked automatically.
- When a friend signs in for the first time, you both receive build credits.
- Track invited, started-building, and credits earned from your profile.
FAQ
Can I export my code? Yes — paid plans include code export and GitHub sync.
Can I export my database? Yes. Open the Cloud panel → Database → Tables and use the export action on the table you want.
How do I copy a project? Open the project, click its name in the top left, go to Settings, and choose Remix.
What does a credit cover? One Build‑mode message. Try‑to‑fix retries are free.
Do I need to know how to code? No. Petal writes and wires the code; you describe the outcome. If you do code, you can export the project and keep going in your own editor.
Can I build iOS and Android from one prompt? Yes — one mobile project ships to both.
Who owns what I build? You do — the code, the data, and the domain.
Where is my project ID? It's in the URL of the builder.
