Skip to content
SoloShow

Real projects from people who build alone, with the story behind each one: why they made it, what it cost, what they used, and whether it is still running.

Building a directory site with Claude Code

Directory sites are the easiest thing to build and the hardest thing to make work. Here is the build, and the three decisions that matter more than any of the code.

A directory is a list of things with a page for each thing. That's it. An agent can write one in an afternoon, which is exactly why there are now thousands of them and most get no traffic at all.

The build is the easy part. I'll cover it, but the decisions before and after matter more.

Get the data question right first

Every directory lives or dies on where its rows come from. There are only three honest answers.

You already have the data. Government open data, an API, a public register. This is the strongest position because the work is in cleaning and presenting, both of which you control. Fuel prices, school term dates, MOT stations, council boundaries. Boring, and boring ranks.

Users submit it. Now you have a cold start. No rows means no visitors, no visitors means no rows. You need a content plan to break the deadlock, and most people skip that step and wonder why the form stays empty.

You scrape it. Fastest to start, worst to maintain. Every source you scrape will change its markup, block you, or quietly start lying. Budget for this being a permanent job rather than a one-off.

If you can't answer this question in one sentence, don't start the build.

The actual build

Scaffold it:

npx create-next-app@latest mydirectory --typescript --tailwind --app --src-dir

Then the shape that works for every directory I've built:

/                    index with search and filters
/[category]/         category pages
/[category]/[slug]   the thing itself
/about               who you are

Four route types. Everything else is decoration.

The important bit is that /[category]/[slug] page. That's where every bit of search traffic lands, and it has to be worth landing on. A name, an address and a phone number is a stub. Google has seen ten thousand of those and it will not rank yours.

Giving Claude Code the right brief

The mistake is asking for the whole site in one prompt. You get something that builds and collapses the moment you touch it.

Work in the order that data flows:

1. Write the schema for <your data>. Postgres, with the
   indexes for filtering by category and location.
2. Write the import script. Source is <file/API>. Log what
   it skips and why, don't silently drop rows.
3. Now the detail page. Here are the fields.

Spend your effort on step 2. Import scripts are where the bodies are buried. A silent continue in a loop will lose you 400 rows and you won't find out for a month.

Ask for the log. Always ask for the log.

Thin pages will sink the whole site

This is the thing that kills directory sites, and it's a site-wide problem rather than a per-page one. Publish 5,000 near-identical pages and Google forms a view about the site, not about individual URLs. Everything drops, including the good pages.

So set a bar in code and enforce it:

const MIN_FIELDS = 5;

export function isWorthIndexing(item: Item) {
  const filled = FIELDS.filter((f) => item[f]?.length).length;
  return filled >= MIN_FIELDS && item.description.length > 120;
}

Anything below the bar gets robots: { index: false } in its metadata. It still exists, it's still linked, it just doesn't ask to be ranked. 800 good pages beat 5,000 thin ones every time.

What actually makes a directory page rank

Something on it that isn't on the other nine thousand versions of the same list.

Options, roughly in order of how hard they are to copy:

  • A calculation nobody else does (distances, comparisons, running totals)
  • Data you joined that nobody else joined (two public sources combined)
  • Freshness you can prove (last checked, and a date that's real)
  • Original writing on the entries that deserve it

Freshness is the cheapest win and almost nobody does it. Re-check your entries on a schedule, store the result, and put the date on the page. That one cron job will outlast most of your competitors.

Deploying

vercel link
vercel --prod

Add a sitemap, check robots.txt, submit in Search Console. Then wait, because a new domain on a fresh site does nothing for roughly 3 months no matter what you do.

The honest summary

Building it takes a weekend. Getting it to matter takes 6 months of showing up. The agent compresses the weekend and does nothing for the 6 months, which is why there's a graveyard of directories built in one sitting and abandoned by week 3.

Pick data you can defend, set a quality floor before you publish, and check back on it.

Tools covered here