Three weeks ago, I did something slightly mad. I rebuilt our entire web platform - years of PHP code, database queries, routing logic - and moved it all to Cloudflare Workers. In a weekend.
Not because I had to. Not because the old system was broken. But because I was curious about whether modern serverless architecture could actually deliver on its promises. And because, honestly, I wanted to see if it was possible.
It was. But not in the way I expected.
The Decision
Friday evening. The family's settled. I'm sitting at my desk with a cup of tea, looking at our platform architecture. It works fine - PHP on a VPS, PostgreSQL database, Nginx handling requests. Reliable. Predictable. But also... expensive in ways that aren't just about money.
Every time something goes wrong, I'm the one who has to fix it. Server updates, security patches, database optimisations. It's manageable, but it's mental overhead I can't really afford right now. Energy is precious when you're managing spinal stenosis alongside a business.
Cloudflare Workers kept appearing in my reading. Serverless functions that run at the edge. No servers to maintain. Global distribution built in. Pay for what you use. It sounded almost too good to be true.
So I thought: what if I just... tried?
The First Few Hours
I started with the simplest route - the homepage. One endpoint. One database query. How hard could it be?
Turns out, quite hard when you're thinking in a completely different paradigm. PHP lives in a world of sequential execution. Request comes in, code runs top to bottom, response goes out. Workers are all about async operations and edge computing. Different mental model entirely.
I spent the first two hours just getting database connections working. Then another hour understanding how to structure the routing. My initial attempt looked like PHP pretending to be JavaScript. It was... not good.
But here's where it got interesting.
The AI Conversation
I've been using Claude for coding assistance for a few months now. Usually for specific problems - help me debug this, explain this API, that sort of thing. But this felt different. I wasn't asking for solutions. I was having a conversation about architecture.
Me: "I'm trying to move this PHP routing system to Workers. How do I think about this differently?"
Claude didn't just give me code. It explained the conceptual shift. In PHP, you're thinking about files and includes. In Workers, you're thinking about edge functions and request handlers. Different philosophy.
That conversation changed everything. Instead of translating PHP line by line, I started redesigning. What does this platform actually need to do? What's the simplest way to do it in this new environment?
By midnight Friday, I had the core routing working. Not pretty, but functional.
The 3am Breakthrough
Saturday morning, technically. I was stuck on database connection pooling. In PHP, you can keep connections open between requests. Workers are stateless by design - each request is isolated. The old patterns didn't work.
I'd been fighting this for hours. Trying to force Worker patterns into PHP thinking. Getting increasingly frustrated.
Then I stepped away. Made tea. Came back. Asked Claude a different question: "What if I'm thinking about this wrong? How would you design database access for Workers from scratch?"
The response showed me something I'd missed. Workers connecting to a database isn't the same as PHP connecting to a database. It's more like API calls than persistent connections. Once I understood that, the solution was obvious. Use Cloudflare's D1 database for queries that need consistency. Use KV storage for simple lookups. Use R2 for files.
Three different storage patterns for three different needs. Not one database trying to do everything.
By 4am, I had data flowing properly. And I was starting to see why people get excited about edge computing.
Sunday - The Testing Reality
Sunday was supposed to be cleanup and testing. It was actually mostly rewriting things I thought were done.
The homepage worked. The article pages worked. The RSS feeds worked. But when I started testing edge cases - what happens when someone hits an old URL? What about rate limiting? What about error handling? - I found gaps everywhere.
This is where having AI assistance really mattered. Not because it wrote perfect code - it didn't. But because it was like having a patient senior developer who never gets tired of questions.
What This Actually Means
Here's the thing that's been sitting with me since. I've been coding for 27 years. I know PHP inside out. I've built complex systems. This weekend project would have taken me weeks, maybe months, without AI assistance. Not because the code is complex - it's actually simpler than the PHP version - but because the learning curve is steep.
With Claude, I compressed that learning curve dramatically. I learned new patterns. I understood new architectures. I built something production-ready in 48 hours.
But - and this is important - it only worked because I knew what questions to ask. I understood web architecture. I could spot when suggested code didn't match what I needed. I knew when to push back, when to dig deeper, when something felt wrong.
The AI didn't replace my expertise. It amplified it.
The Economics of Solo Development
The new platform costs me about fifteen pounds a month. The old one was a hundred and twenty. That's real money when you're building towards sustainable income.
But the bigger saving is mental energy. No server updates. No security patches. No 2am panics because something's down. The infrastructure just... works.
That freedom matters. It means I can focus on building features. On serving clients. On being present with my family.
What I'm Still Processing
I've been running the new platform for three weeks now. It's faster. It's cheaper. It's more reliable. All true.
But I'm still figuring out what this means for how I work. I can prototype ideas in hours now instead of days. I can test architectures I wouldn't have bothered with before. I can rebuild core systems over a weekend.
That's exciting. But it's also slightly unsettling. If I can do this in a weekend, what else becomes possible?
The weekend rebuild worked. The platform is better. But the real breakthrough wasn't technical - it was realising that the constraints I'd been working within for years weren't actually constraints anymore. They were just habits.
I'm curious what other habits need questioning.