Blog

Articles on architecture, headless commerce, and practical product engineering.

When CDN and Bitrix Composite fight each other

We added Cloudflare to a Bitrix store on Thursday evening. By Friday morning: "my cart is empty, I already added items." By Saturday: "the account page is showing someone else's data."

TypeScript API contract for Bitrix REST: generate types, stop guessing shapes

We spent two weeks asking "what does this method actually return?" when we moved a 28,000-product catalog to a headless architecture. Open the Bitrix REST docs — they're three months behind the actual version. Open the debugger, call the method, look at the real response, infer the shape, write an interface. Next day, a teammate does the same with another method. Slightly different assumptions.

Atomic file locking in PHP: the mkdir trick that needs no Redis

PHP developers have three common approaches to preventing parallel cron execution: advisory locks in the database, Redis SETNX with TTL, or ignoring the problem and getting duplicate runs. There's a fourth option: atomic mkdir, a POSIX primitive available on any filesystem with no external dependencies.

AI context is a resource. How I stopped wasting it blindly

I spent an hour on an AI session only to discover at the end that the agent had rewritten a file we'd already fixed at the start. Not because it's broken — the context window filled up, and the model lost track of what happened early in the conversation. Since then I treat the context window like RAM: when it's full, you get swaps. So I built a session hygiene around that.

Four PHP behaviors we only caught in Bitrix production

PHP has four language-level behaviors that cause production performance problems in Bitrix: session file locking, OPcache stale entries on deploy, array copy-on-write memory doubling, and non-deterministic destructor order. These aren't bugs — they're documented behavior — but they only become visible under production load.

Redirects Died on Deploy Day. Bitrix Didn't Warn Us.

We went headless in February. In April, our SEO consultant sent a spreadsheet: 340 broken links. Three years of redirect rules, gone the day we deployed Next.js. No errors in the logs. Next.js had no idea these rules were supposed to exist in the first place.

Elasticsearch Mapping Is Architecture, Not Configuration

For three weeks we couldn't figure out why the price filter wasn't working. Elasticsearch was up. Queries were coming in. Results were returning. But the price range — say, $15 to $50 — was being ignored completely. Products at $180 and $3 showed up side by side.

Claude Code in a PHP Studio: The Honest Assessment

A year ago I wrote about what I don't delegate to AI. The list: architecture, cross-layer contracts, database schema decisions. That list still holds. But the year added something I didn't expect — a clearer picture of where Claude Code is genuinely useful.

PHP 8.4 and Bitrix in Production: What Actually Breaks

The Bitrix release notes say "PHP 8.4 supported." Our first client to upgrade staging got 47 deprecated notices on a single homepage request and a broken payment module. None of it was in Bitrix core.

Relevance isn't revenue: teaching Elasticsearch to rank by business metrics

We ran an A/B test. The control group ranked search results by text relevance. The test group used a scoring function that factored in margin, stock levels, and sell-through rate. Click-through was nearly identical. Revenue per search session was 12% higher in the business-ranked variant.

The Non-Vibecoder's Workbench: How I Structured AI Assistance Without Losing Engineering Control

Vibecoding is when you describe a task, the AI generates code, you check that it looks right, and you deploy. I don't work that way. Not because I'm afraid of AI — Claude Code is open on my screen every working day. It's because without structure, AI in a legacy PHP project isn't acceleration. It's debt with a nice interface.

Have you actually hit the Bitrix ceiling, or are you just tired of it?

A client messaged me last year. 30,000 SKU store on Bitrix, "everything's slow," ready to migrate to headless. I asked three questions: what percentage of requests take more than two seconds? Is composite mode enabled? When did you last check slow_query_log?

Why I Keep a 'Never Again' List Between Projects

After every project I open the same note and add one line. Not "what went well" — that goes in the team retro. Just one thing: what I won't do on the next project.

Why I Ban LLMs from Client-Facing Features

I run 13 autonomous Claude tasks in my studio. They write LinkedIn posts, draft blog articles, run monitoring, send Telegram alerts. I trust them — and I sleep fine. Because if Claude writes something wrong in my name, I see it before it matters. But if it wrote that in response to a customer's question about a return policy on my client's e-commerce site? Different story. That's why I have a rule: no LLMs on client-facing features. Not yet.

Your Search Logs Are the Best Product Doc You're Not Reading

A client asked: "What are our customers actually searching for?" I pulled up Elasticsearch and exported the top 40 zero-results queries from the past week. Three of them were exact product names. In stock. Just written differently than the catalog.

Local Dev for Headless Bitrix: Three Setups, One That Actually Works

The first question I get about headless Bitrix is about architecture. The second is about deployment. The third nobody asks out loud — but everyone runs into it in the first week: how do you actually develop when you don't have Bitrix on your machine?

How I spot a difficult client before the project starts

Two years ago I took a project where the first call had three signals I already knew how to read. I took it anyway — the money was good and I told myself I'd manage. Four months later I was walking out of that project. Professionally, no drama. But I'd spent months on work I shouldn't have started.

PHP-FPM pm.max_children: The Setting That Brings Bitrix Down Under Load

pm.max_children is the PHP-FPM configuration parameter that sets the maximum number of worker processes in a pool. On a busy Bitrix installation, getting this wrong is the most reliable way to turn a promotional spike into a 504 error wave — and the most reliable way to miss it during normal traffic.

I Run 13 Automations. None Use LangGraph.

My dev studio runs 13 automations. They fire every day: collecting blog topics, generating candidates, publishing articles, sending notifications, logging everything.

PHP Earns the Money. Next.js Shows It.

In a headless Bitrix + Next.js architecture, the split is straightforward in theory: Bitrix owns the data and business logic, Next.js owns the rendering. In practice, most teams get this wrong within the first year.

No, I Don't Scale. That's the Point.

People keep telling me to scale up. I run a boutique software agency and I do it intentionally small. I nod, say nothing, and don't change a thing. Not because I'm lazy. Because I tried.

Boring stack is a brave call

Three months ago a developer messaged me: "You're still writing PHP? Isn't that a waste of your time?"

I write a spec before asking AI to write code. Here's why.

I timed it. When I write a spec before opening Claude Code, an iteration takes around 40 minutes. When I skip straight to the prompt, it's closer to two and a half hours and three rollbacks.

Three checks before any headless project

The first question I ask before any proposal: "Who's editing content after we're done, and where?"

I stopped interviewing developers. Here's what I do instead.

In 2020 I hired a developer who nailed the architecture explanation in the interview, answered every PHP question correctly, and impressed two people on the team. Four months later I let him go. Not because he was incompetent in the abstract — he just couldn't work in our actual context.

Five questions I ask before proposing headless to a client

In the past two years I've turned down headless three times. Not because I don't believe in it — I've built it, I know what it delivers. But each time, five questions made the answer obvious before we touched a wireframe. The fourth client got the full Next.js + Bitrix split. It's one of the best ecommerce projects I've worked on.

Tech debt in plain money: how I talk refactoring to non-technical clients

Three times I explained refactoring by saying "architecture" — and three times I got a polite "sure, but let's ship features first." Then I changed one thing: instead of "architectural debt," I said "this component adds about 6 hours to every new delivery type we add. Last quarter that was 18 hours we didn't have to spend." The client said: "Okay, take a week."

When headless is the wrong answer

I build headless sites on Next.js + Bitrix. I've migrated a catalog of 28,000 SKUs. I turned down a $40K contract because rewriting a working monolith made no sense. And when a client walks in asking for headless, my first question is always: "Why headless, exactly?"

I publish a blog, but I build my audience on LinkedIn. Here's why.

Three weeks after launching ivanpin.com, I checked the traffic sources. LinkedIn sent orders of magnitude more visits than organic search. The site was three weeks old — that's normal. Young domains don't rank. But I kept thinking: what happens when indexing stabilizes?

I let Claude write tests. I don't let it choose architecture.

Claude wrote 340 lines of tests for me in eight minutes. Good tests. I'd have spent two hours on them. But when I asked it to suggest a module structure for a new Bitrix project, it produced something symmetric, logical, and completely wrong for our context. That gap became my working definition: where Claude's job ends and mine begins.

Modernizing a 1C-Bitrix Monolith Without a Risky Rewrite

How do you modernize a 28,000-product 1C-Bitrix store without a risky rewrite? In this case study, I break down a Headless migration using Next.js + Elasticsearch that improved performance, preserved SEO, and kept the business running.