Skip to content

Six areas I work in, each with an example from my work.

Free book · A story

Vibe Coding WordPress
From a File to SaaS

The story of Karim, a marketer who turned the break-even sheet he sends his clients into a WordPress tools platform that subscribers pay for, built with Claude Code and Codex. The code appears when it matters, with every line explained.

Eng. Ahmed Helmy

Working on your laptop is not a test

35chapters
6parts
3.7hours of reading
العربية / English
Before you start

How to read this book

Read it in order as a story, or jump to the idea you need from the index of ideas. You can copy every request in the book as it is, then adapt it to your project.

Karim and the people around him are fictional. I built them from situations I saw with the people I worked with and the people who learned from me. The names of tools and platforms are real, and the technical facts are correct as of November 2026. Prices and numbers inside the story are examples, not client figures. What I tell in the “From my site” boxes really happened on my site, ahmedhelmy.me.

Prologue · How Mistara began

The spreadsheet three hundred people saved

Sunday, November 1 · 10:30 PM · Nasr City

Karim posted a photo of a spreadsheet on LinkedIn. It was a plain sheet: you type your ad budget, your product's price and its cost, and it tells you how many orders you need to avoid a loss.

By morning, 300 people had saved it. He had 40 messages, and most of them asked one question: “Does it have a website?”

It had no website. Karim had a job at a small ad agency, a salary that barely covered the month, and an engagement he was saving for. And he had this sheet, which he had sent to every client for three years.

I attend the agency's meeting once a month, as a growth consultant. After the November meeting, Karim was waiting for me by the elevator, his phone open on the post.

“I'll build it on WordPress. Eight weeks. Demo at the Marketers' Meetup in January.”

I asked him, “And who will pay the first pound for it?”

He didn't answer. We went down the six floors in silence, and at the building's door he said, “I'll know before I start.”

Karim's LinkedIn post with a photo of his break-even sheet, saved by 300 people, beside 40 messages asking: does it have a website? Karim's LinkedIn post: a photo of his break-even sheet, spend 3,500, price 1,000 and cost 650, so 10 orders, saved by 300 people. Beside it, a pile of 40 messages with one question, “Does it have a website?”. The rule: a repeated question starts a product. Karim's post Karim Break-even point Ad spend3,500 Price1,000 Cost650 Orders10 Saved by 300 people “Does it havea website?” 40 messages A repeated question starts a product
When 300 people save your sheet and 40 of them ask the same question, that is the first sign people need a tool.

He built the first version in two weeks. He spent the months after that learning why it wasn't ready.

This book is about those months.

If you are a marketer, a small business owner or a new developer with an idea for a weekly tool, this book is for you.

You'll follow Karim from an Excel sheet to a WordPress platform that its first subscribers pay for. He builds it with a coding assistant: Claude Code at home, and Codex on the agency's laptop.

You'll see code when it's needed, short, with every line explained. You won't need to write the code. You will need to know what to ask for, read what changed, and see with your own eyes that it works.

Each chapter has a problem Karim ran into and the idea that solves it. Then comes the request he wrote to the assistant, and how he checked that it worked. When I have a real example from my own site, I tell it in a short box called “From my site”.

At the end of each chapter there is one line that Karim added to his rules file. The book ends with the whole file, and a way to ship any new tool without breaking the old ones.

Start at Chapter 1 if you want the story. Or open the index of ideas and go to what you need now.

The following Thursday night, Karim sent me a nine-page file titled “The Mistara plan”. Mistara is Arabic for ruler.

Chapter 1 · The product brief on one page

Forty tools in the first plan

Thursday, November 5 · 11:40 PM · Nasr City

Karim's file reached me twenty minutes before midnight. Nine pages titled “The Mistara plan”, and even the name was new. Mistara would be a set of tools that a marketer uses to measure a campaign.

The first page held a table of 40 tools. Next to each one were the words “artificial intelligence”. The pages after it described a community for marketers, a course, a phone app and a monthly subscription with three plans.

And on the last line: “First demo at the Marketers' Meetup, January 16.”

He had started before he sent the file. He had written to the coding assistant: “Build me a WordPress site of AI marketing tools, with 40 tools.”

The assistant came back with a plan for 40 pages, a plugin for paid memberships, and a key to an AI service in every tool.

I called him on Friday morning.

“I read the plan. Who's the first person who'll pay you?”

“Marketers. I mean, everyone who saved the post.”

“They saved a free sheet. I mean a buyer. What eats their time every week?”

He was quiet for a moment. Then he said, “Every Sunday, before raising the budget, he works out how many orders cover the ads.”

“And what does he do before that calculation?”

“He gets the new campaign's links ready. Then the client asks what each customer cost.”

“That's three tasks. Start with them.”

What actually happened

The assistant didn't make a mistake. Karim gave it a broad sentence, and the assistant filled every gap in it with a guess. Forty pages because the sentence said forty, memberships because the site was a “platform”, and an AI key because the sentence mentioned AI.

People call this way of working vibe coding: you describe what you want, and the assistant writes the code.

Describing gets code written fast. Code that still works tomorrow, for someone who pays, needs decisions the assistant can't make for you.

The first of those decisions isn't technical. It is who this is for, what they do with it, and how you'll know it worked.

The plan had only one fixed date, the demo on January 16. A fixed date with unlimited features means something will get built in a hurry. It's better to decide today what will be shown, before the shortage of time decides it for you.

The idea in plain words

Before any line of code, a consultant writes one page that describes the product. Developers call it a product brief.

The page works like a print order at a print shop. Size, quantity, paper and delivery date sit on one sheet. Without it, the shop prints what it thinks you want, and then you argue over the invoice.

The page holds four things:

  1. The buyer: who will pay, and why, in one sentence.
  2. The tasks: three tasks this person repeats every week, and the result of each task as they see it.
  3. The success criterion: a yes-or-no sentence, such as “A visitor finishes the break-even calculator on a phone, with no account, in under a minute.”
  4. What we won't build now: every idea that waits, and the reason it waits.

The first version, the MVP (minimum viable product), is the smallest version that someone uses and comes back to. It's small in features, not in correctness. A calculator that gives a wrong number is not a first version, even if it's the only one.

When you don't need this: when you're building a tool for yourself only, to use once.

A 40-tool plan crumpled in a bin, beside one page with four lines and a stamp that says it can be tested. Karim's first plan, “40 tools powered by AI”, crumpled in the bin, and beside it one page: the buyer is a marketer running a store's ads, the three tasks are the tracking link, the cost per customer and the break-even point, success is finishing the calculation on a phone, and what we won't build now. A gold stamp on the page says “Can be tested”. The rule: write a promise you can test. The first plan One page: Mistara Buyer: a marketer running store ads Tasks: tracking, cost, break-even Success: finishes it on a phone Not now: community, course, app Can betested 40 toolspowered by AI Write a promise you can test
A plan that promises 40 tools cannot be tested, but one page names the buyer, the jobs and a success test you can see for yourself.

What Karim asked the assistant

Karim deleted the old plan and wrote a new request:

The second line puts the buyer before the tools. Had the request started with the tools, the assistant would have started by designing them.

The fourth line asks for a criterion answered with yes or no. This is where the assistant slipped in its first draft. It wrote the success criterion as “1,000 visitors in the first month”.

Karim, a performance marketer, read it and rejected it in seconds. A visit doesn't mean anyone calculated anything.

He wrote to the assistant: “The criterion is how many people finished a calculation, not how many opened the page.” The assistant then rewrote all three criteria.

The last line keeps the assistant from jumping to code. The first page ends with questions, because if questions about payment and data wait, the code ends up answering them alone.

The “What we won't build now” list ended up holding 37 tools, AI, the community, the course and the app. Next to each item was a line with the reason.

Next to AI, he wrote: “The three calculators add and divide. They don't need a model.”

How to check it yourself

  1. Give the page to someone who hasn't heard your idea, and ask them to describe the first version in three sentences. Karim gave it to Yasmine, his fiancée. If their description differs from what you mean, fix the page before any code.
  2. Read each success criterion and ask: can I answer it with yes or no after one try? A criterion that needs an opinion gets rewritten.
  3. Open the “What we won't build now” list. If it's empty, the page hasn't decided anything yet.

The ruleWrite the promise so you can test it

Karim wrote the first line in a note on his phone and called the note “Mistara rules”. On Friday evening he opened the functions.php file in his site's theme and pasted the first calculator into it.

Chapter 2 · Where each part lives in WordPress

The calculator vanished when the theme changed

Saturday, November 7 · 4:10 PM · Nasr City

On Friday the three calculators were working on the Mistara site. Karim had asked the assistant for the code and pasted it into the functions.php file inside the site's theme. Each calculator showed up on its page.

Chapter 3 · A local copy and Git

Fourteen files changed on the live site

Monday, November 9 · 11:05 AM · Nasr City

On Sunday evening Karim opened his site's folder on the hosting from the code editor on his laptop. The editor had an extension that uploaded every file to the hosting the moment he saved it.

Chapter 4 · The coding assistant and where each line runs

The first session only reads

Tuesday, November 10 · 9:30 PM · Nasr City

Karim wrote to Claude Code: “Build the tracking link tool.”

Chapter 5 · The project rules file

One rules file that both assistants read

Thursday, November 12 · 10:15 PM · Nasr City

Karim had pushed the repository to GitHub, as a private repository, so he could work from two computers. Claude Code at home, and Codex on the agency's laptop.

Chapter 6 · Giving the assistant a task you can review

One request changed twenty-three files

Saturday, November 14 · 11:50 PM · Nasr City

Karim wrote four words to the assistant: “Improve the tools page.” Then he went to make tea.

Chapter 7 · The plugin and its hooks

A small plugin with a clear starting point

Monday, November 16 · 9:00 PM · Nasr City

The assistant moved the three calculators from the theme into a new folder called ah-tools. Karim opened the plugins page on his local copy and clicked “Activate”.

Chapter 8 · Debugging an error before asking for a fix

A white screen before the agency meeting

Tuesday, November 17 · 9:05 AM · Nasr City

Karim opened the Mistara copy on his laptop. He found a white page with one line saying there had been a critical error on the site. The dashboard was the same, and the meeting with Hossam was at ten.

Chapter 9 · Page templates and theme colors

One color typed in twenty places

Thursday, November 19 · 9:00 PM · Nasr City

With the calculations now in the plugin, Karim did what he had wanted to do since Chapter 2. On his local copy he switched on a light block theme, and designed the three tool pages by hand, block by block.

Chapter 10 · Custom post types and custom fields

Each tool gets its own record and fields

Friday, November 20 · 1:30 PM · Nasr City

Karim decided to turn the sheets of his Excel file into tools. He started with the return-on-ad-spend sheet. He created a new page, chose the Tool page template, copied the calculator code into it from another page and changed the calculation.

Chapter 11 · Taxonomies and pagination

A library where visitors find their tool

Saturday, November 21 · 4:00 PM · Nasr City

The three colleagues replied before noon.

Chapter 12 · Input validation and a separate calculation function

A calculator that said a customer costs nothing

Monday, November 23 · 6:40 PM · Nasr City

Madam Soheir arrived at the agency with two bags of fabric from the traders of Al-Muski. She owns a home furnishings shop in Alexandria, and sells on Instagram, on WhatsApp and from her WooCommerce store.

Chapter 13 · The custom block and block.json

A block an editor can place in any article

Thursday, December 3 · 9:40 AM · Nasr City

A screenshot from Dina reached Karim before he sat down at his desk. Dina was the content writer at Hossam's agency, and for two weeks she had been writing articles for the Mistara blog.

Chapter 14 · SSH and putting the site on the hosting

The first version, in front of 10 friends

Saturday, December 12 · 11:40 PM · Nasr City

Karim sent the link to a WhatsApp group of 10 colleagues from the agency. Under it he wrote: “Try the calculators, and tell me where you get stuck.”

Chapter 15 · Measuring use, and events

A thousand visits and nobody comes back

Monday, December 21 · 8:20 AM · Nasr City

Karim opened Google Analytics before he drank his coffee. The LinkedIn post had brought 1,100 visits in two days, and then everything went quiet.

Chapter 16 · Accessibility and page speed

Soheir can't find the Calculate button

Sunday, December 27 · 1:30 PM · Alexandria

Karim stood in Madam Soheir's stockroom in Sidi Bishr, among rolls of table linen and boxes of orders. He took out his phone, then put it back in his pocket. He had come with Hossam for the Ramadan campaign meeting, and before it began he asked her a small favor.

Chapter 17 · Search intent and indexing

A page people find when they search before Ramadan

Sunday, January 3 · 10:00 PM · Nasr City

Karim opened Google Search Console for the first time since he had connected it to the site in December. It was January, Ramadan was five weeks away, and marketers had started working out their budgets for the season.

Chapter 18 · Authentication, authorization and email that arrives

An account for every user, and limits for every account

Thursday, January 7 · 9:00 PM · Nasr City

Karim built Mistara's accounts in three days, after Abdullah's message. A visitor signs up with an email, saves their results on a page called My reports, and opens them again next month.

Chapter 19 · Cross-site request forgery, nonces and escaping

A link in the marketers' group

Saturday, January 9 · 1:15 PM · Nasr City

Karim opened the link on his phone, then on his laptop to read the list on a bigger screen. It was an ordinary page with tool names and small pictures, and at the bottom was a button: Show the full list.

Chapter 20 · The REST API and endpoints

The draft everyone read

Tuesday, January 12 · 11:20 PM · Nasr City

Karim was going over his meetup slides when a colleague at the agency sent him a link. It was a post in a Facebook group for marketers with 18,000 members.

Chapter 21 · AI inside the site, and the cost of one AI request

The campaign analyzer and the first AI feature

Saturday, January 16 · 7:40 PM · Fifth Settlement

About 140 marketers sat in the hall of a coworking space in the Fifth Settlement. Karim was the third speaker, with 20 minutes and a tool that was three days old.

Chapter 22 · Uploaded files, prompt injection and personal data

A CSV file that carries instructions for the model

Monday, January 18 · 8:05 AM · Nasr City

Karim opened the analyzer to everyone on Sunday evening, with one free analysis a day per account. In the morning he found 61 new accounts in the log, and 74 uploaded files.

Chapter 23 · Payment, webhooks and access

An InstaPay receipt at 2 AM

Wednesday, January 20 · 2:10 AM · Nasr City

Karim's phone buzzed on the nightstand. It was a WhatsApp message from a number he didn't know, with a picture of an InstaPay transfer of EGP 249.

Chapter 24 · Quotas, credits, race conditions and migrations

Three free analyses a month

Friday, January 22 · 11:00 AM · Nasr City

Karim opened the billing screen at his AI provider over his Friday tea. In one night, between 1 and 2 AM, the analyzer had run 400 analyses.

Chapter 25 · Background jobs and idempotency

A report that waits 40 seconds

Tuesday, January 26 · 11:40 PM · Nasr City

Twenty minutes before midnight, Karim got a voice note from Madam Soheir, 22 seconds long. She had been uploading her file of Ramadan table linen campaigns to the campaign analyzer. She wanted to set her budget for the first week of the season.

Chapter 26 · Cache and invalidation

One client's report showed up for another

Thursday, February 4 · 8:50 AM · Nasr City

Hossam called Karim before 9. Karim was still on his way to work.

Chapter 27 · Profiling, indexes and the N+1 query problem

The archive after 300 tools

Monday, February 15 · 11:10 PM · Nasr City

After taraweeh, the long night prayers of Ramadan, Karim logged in and opened the tool archive, timing it on his phone. The page appeared after 4.2 seconds. The header image came a second after that.

Chapter 28 · Structured logs and monitoring

Report not working, three words with no details

Thursday, February 25 · 1:05 AM · Nasr City

Abdullah's message arrived at 1:05 AM, and in Jeddah it was past 2. Three words: “Report not working.”

Chapter 29 · Server tests and an end-to-end test in the browser

A quiet edit broke the cost calculation

Sunday, March 14 · 10:30 PM · Nasr City

On Sunday evening, Yasmine opened the cost-per-customer calculator on her phone. She wanted to check a figure for one of her office's clients.

Chapter 30 · Automated deployment and the staging copy

A deploy without the build folder

Saturday, March 20 · 4:15 PM · Nasr City

At 1 PM, Karim uploaded the week's fix through the host's file manager. At 2 PM, a subscriber wrote that the “Calculate” button didn't work.

Chapter 31 · Backups, restores and running the live site

The site next door on the same hosting was hacked

Monday, March 22 · 9:20 AM · Nasr City

Karim read the hosting company's email twice. They had found 14 strange PHP files in the uploads folder of a furniture showroom's site.

Chapter 32 · Existing sites and application passwords

Mistara's tools inside client sites

Wednesday, March 24 · 2:10 PM · Nasr City

After the agency's monthly meeting, Hossam put a sheet of paper on Karim's desk with six sites on it. All belonged to the agency's clients, all were built with Elementor, and their owners edit the pages themselves. Hossam wanted the break-even calculator inside their product pages before the end of the month.

Chapter 33 · MCP and abilities in WordPress

An assistant reads the library with limited permissions

Friday, March 26 · 9:40 PM · Nasr City

After dinner, Karim opened his calculation sheet again: 300 descriptions at five minutes each, 25 hours.

Chapter 34 · The agent's limits and evals

A suggestion that asked the agent to publish

Sunday, March 28 · 11:30 AM · Nasr City

On Saturday, Karim built the drafting agent. It is a small program that runs every night on the staging copy. It reads the tools and the users' suggestions through the two abilities he registered, and writes a suggested description for each one.

Chapter 35 · Unit economics and product architecture

What a paying user costs

Tuesday, March 30 · 9:30 PM · Nasr City

Yasmine opened a new spreadsheet, and asked Karim to fill its columns with March's numbers from their sources, not from his memory. The columns were free users, PRO subscribers, the number of analyses, the hosting bill, the gateway's statement, and his hours answering WhatsApp.

Epilogue · Your big task and the tool delivery skill

End of the story: the first monthly report

Thursday, April 1 · 9:00 AM · Nasr City

Karim's report reached me at 9 in the morning, one page titled “Mistara, March”. It had no revenue figure, and I hadn't asked for one.

Appendix · The full AGENTS.md file

The rules file Karim wrote

Karim wrote the first line in a note on his phone, the day he swapped the forty-tool plan for a single page. In chapter five he moved the first four lines into an AGENTS.md file. By the end of the season it had a line for every chapter of the book.

Appendix · Index of ideas

If you are looking for a particular idea

Every idea in the book, with a line on what it means and the chapter that explains it. When an idea appears in two chapters, the first explains it, and the second comes back to it in a new situation.

Search every chapter
What idea are you looking for?Try: REST · endpoint · payment · backup
Vibe Coding WordPress · Ahmed Helmy↵ Start the story