Prompt library.
100 prompts for the problems you hit building for the web: hosting, domains, databases, sign-in, security and more. Find your problem, copy the prompt, and paste it into your AI tool.

Start here
Works on your computer, fails when deployed
The build passes locally, then the host shows a red build error.
My project runs fine locally but the deploy fails on my host. Don't guess from the error alone. 1. Find how the host builds this project (build command, Node version, package manager) from the config files. 2. Run that exact production build here and show me the first real error, not the last line. 3. Check the usual causes: a file name whose capital letters don't match its import, a package that is only installed locally, a missing environment variable, a type or lint error the dev server ignores, a different Node version. 4. Fix the cause, then run the build again and show it passing. Tell me anything I have to change in the host's dashboard, step by step.
100 prompts
Hosting and deploys
Works on your computer, fails when deployed
The build passes locally, then the host shows a red build error.
Deployed, but the page is blank or shows a 500
The deploy went green and the live site still doesn’t work.
Sort out your environment variables
Something is undefined in production and you’re not sure which keys go where.
Refreshing a page gives a 404
Links work when you click them, but a refresh or a shared link lands on Not Found.
Pick a host that fits this project
Vercel, Netlify, Cloudflare, Railway, a VPS: everyone recommends something different.
Requests time out in production
A slow request finishes locally but gets cut off on the host.
Keep test data out of your real database
Preview deploys and local testing talk to the same database and keys as the live site.
Have a way back before you ship
A bad deploy goes out and you don’t know how to undo it.
A scheduled job doesn’t run on the live site
The daily task works when you trigger it by hand and never fires in production.
Stop a surprise hosting bill
A free plan turns into a big invoice after a traffic spike or a bot.
Domains and email
Connect your domain to your site
You bought a domain and the DNS screen is a wall of record types.
Your domain doesn’t load or says Not secure
The records are in, hours have passed, and the site still isn’t there.
Make every version of your address go to one place
www, non-www, http and https all load, sometimes as different sites.
Your app’s emails land in spam
Sign-up and reset emails arrive late, in spam, or not at all.
Get an email address on your own domain
You want hello@yourdomain.com without breaking the website or the app’s emails.
Move your domain without downtime
You want to change registrar or DNS provider and fear the site and email going dark.
Sign-in breaks between your subdomains
The app is on one subdomain, the API on another, and cookies or requests get blocked.
Databases
Design your tables before you build
The AI invents a new table every time you add a feature, and nothing lines up.
Check that users can’t read each other’s data
Every signed-in user may be able to fetch every row, and the app only hides it in the interface.
Stop changing the database by hand
You edited tables in the dashboard, and now local, preview and production don’t match.
Find out if you could get your data back
You assume the database is backed up and have never tried a restore.
Find the queries that slow your pages
Pages got slower as data grew, and adding a cache only hid it.
Fix “too many connections” errors
The database refuses connections under light traffic on a serverless host.
Rename or remove a column without losing data
A simple rename can break the live app or wipe a column for good.
Let the database reject bad data
Duplicates, empty fields and orphaned rows creep in because only the form checks them.
Delete a user and everything they own
Someone asks you to delete their account, and their data is scattered across tables and services.
Fill your local app with realistic test data
Your local database is empty, so you test against production or three rows named “test”.
Sign-in and accounts
Sign-in works locally and fails on the live site
You land back on localhost, hit a redirect error, or stay signed out after logging in.
Check every page and API route is protected
Pages are hidden in the menu, but anyone with the URL can still call them.
Add Google sign-in without breaking existing accounts
Social login looks like one button and turns into consent screens, callback URLs and duplicate users.
Test password reset and email verification end to end
The happy sign-up works, and the reset link is broken, expired or reusable.
Stop users getting logged out at random
People are signed out mid-task, or stay signed in forever on a shared computer.
Make sure admin powers are checked on the server
The admin page is hidden from normal users, and the role is read from something the browser controls.
Security
Find secret keys that reach the browser
An API key sits in frontend code where anyone can open the browser tools and copy it.
You leaked a key. Do this in the first hour
A secret went into a commit, a screenshot or a chat, and you’re not sure how bad it is.
Find API routes anyone can run up a bill on
An endpoint that calls an AI model or sends email has no sign-in check and no limit.
Stop trusting what the browser sends
The price, the user ID or the role comes from the request, so anyone can change it.
Make file uploads safe
Users can upload anything of any size into a bucket that may be public.
Fix known security holes in your packages
The install prints a wall of vulnerability warnings and you’ve learned to ignore it.
Tighten headers, cookies and cross-origin rules
CORS was set to allow everything to make an error go away, and it stayed that way.
Check for script and database injection
User-written text is shown as HTML somewhere, or a query is built by gluing strings together.
Keep bots out of your forms and sign-ups
Fake sign-ups and contact-form spam arrive faster than real users.
Run an attacker’s-eye review before launch
The app works, and nobody has tried to misuse it yet.
Payments
Add payments the safe way
Checkout looks done when the success page shows, and that page proves nothing.
Make payment webhooks reliable
A customer pays, the webhook fails or arrives twice, and their account is wrong.
Someone paid and didn’t get access
The money arrived and the account still says free. Or the reverse.
Switch payments from test to live
Everything works with test cards, and live mode has its own keys, webhooks and settings.
Handle every subscription state
Signing up to a plan works, and nothing happens when a card fails or someone cancels.
Debugging
Fix an error you don’t understand
The AI patches the line the error names, and a new error appears somewhere else.
Break out of a fix-and-break loop
Each fix causes a new bug, and you’ve been going round for an hour.
Fix a CORS error properly
The browser blocks a request, and the quick fix is to allow everything.
The page is blank and the terminal shows nothing
No error where you’re looking, only a white screen or a page that never finishes loading.
Find the change that broke something
A feature worked last week, and you can’t tell which of forty changes broke it.
The page still shows old data after a save
You save, the database changes, and the screen shows the old value until a hard refresh.
It works for you and breaks for a user
A user reports a bug you can’t reproduce, with a screenshot and no details.
Track down a bug that only happens sometimes
It fails one time in ten, and every fix seems to work until it doesn’t.
Speed
Make a slow page fast, with numbers
You ask for a faster site and get a cache bolted on and no proof.
Fix heavy images
A hero photo straight from a phone weighs more than the rest of the site.
Shrink the JavaScript you send
The site downloads megabytes of code before anything is usable.
Find why an action feels slow
You click a button and wait two seconds with nothing happening.
Cache pages without serving old content
Either every visit rebuilds the page, or visitors see yesterday’s version.
Git and saving your work
Get out of a Git mess without losing work
Conflicts, a detached HEAD or a rejected push, and every suggested command looks dangerous.
Go back to the last version that worked
The last hour of changes made things worse and you want it gone.
Stop committing files that shouldn’t be in Git
The .env file, node_modules or build output ended up in the repository.
Stop building straight on the live site
Every change goes to main and straight to production, tested by your users.
Save versions you can find your way back to
One giant commit called “update” holds a week of work.
Working with your AI tool
Get a plan before any code changes
You describe a feature and the AI starts editing files based on a guess.
Make the AI prove the work is done
It says “fixed” and “all tests pass”, and the feature doesn’t work when you try it.
Stop the AI doing more than you asked
You ask for a button change and get a refactor across twelve files.
Decide when the AI must stop and ask
It either asks permission for everything or deletes something without a word.
Carry on in a fresh chat without losing your place
The chat got long, and the AI forgets earlier decisions and repeats old mistakes.
Find out what the AI decided for you
The summary says everything went well and hides the choices that shaped the result.
Turn the corrections you keep making into rules
You fix the same habit every session, and the AI makes the same mistake the next day.
Write a short instructions file for your project
Every new session you explain again how to run the project and what not to touch.
Understand what the AI just built
The app works and you couldn’t explain how, which makes every bug frightening.
Design and UI
Fix a site that looks AI-made
Purple gradient, icon in a circle, three identical cards: visitors have seen this page before.
Give your AI a design guide to follow
Every new page comes out in a slightly different style.
Design the states the demo never shows
Screens only look right when data loads fast, lists are full and nothing fails.
Check every page on a phone
You built on a laptop, and most visitors arrive on a phone.
Make the whole app look like one product
Six shades of gray, four button styles and spacing chosen by eye.
Fix the accessibility basics
The site can’t be used with a keyboard, and some text is too faint to read.
Make a form that doesn’t lose people
Errors appear before typing, a failed submit wipes the fields, and a double click sends twice.
Search and launch
Find out why Google can’t find your site
You search your site’s name and it isn’t there.
Fix how your link looks when shared
Pasting your link into a chat shows a blank box or the wrong title.
Measure what matters without tracking people
You have page views and no idea whether anyone finished the thing your app is for.
Cover the legal basics before launch
No privacy page, no terms, and a cookie banner copied from somewhere.
Run a full check the day before launch
The big pieces work, and the small ones embarrass you on launch day.
Show a helpful page when something breaks
A broken link or a crash shows the framework’s default error screen.
Plan and start
Choose a stack you can ship with
Three AIs recommend three different stacks, each with total confidence.
Works in any AI chat
Let the AI question you until the idea is clear
You know what you want until someone asks a specific question about it.
Works in any AI chat
Cut the idea down to a first version
The feature list keeps growing and nothing is online yet.
Works in any AI chat
Check who else has built this
You’re about to spend a month on something that may already exist and be free.
Works in any AI chat
Turn a plan into steps you can check
The AI builds the whole app in one go and nothing quite works.
Keeping it healthy
Clean up a codebase that grew by accident
Months of AI-written code: dead files, the same logic three times, packages nobody uses.
Add the one test that matters most
There are no tests, and writing hundreds feels pointless.
Update your packages without breaking the app
Everything is a year out of date, and updating all at once breaks the build.
Hear about errors before your users tell you
The site was broken for two days and you found out from an email.
Turn a vague complaint into a bug you can fix
A user writes “it doesn’t work” and nothing else.
Write a README someone could run the project from
Six months from now, you won’t remember how to start your own project.
Do a monthly health check of your live app
Nothing is on fire, so nobody looks, until the free plan runs out or a certificate expires.