Engineering6 min readBy the Kiwi senior team

Cloudflare Workers and D1 for custom panels: when it fits

Workers plus D1 fit small, edge-hosted operator panels and portals with modest relational data. They are not a default for every product. A fit check from Cloudflare’s own docs.

In this guide
  1. Direct answer
  2. What this stack is good at
  3. A practical sequence
  4. What it is not
  5. What to send if you want a senior review
  6. Questions
  7. Sources

Direct answer

Choose Workers and D1 when the panel is request/response, the data is relational and bounded, and you want one account for HTML, API, and database. Choose a conventional Postgres host when you need heavy reporting, long-running jobs, or a team that already operates that stack.

Cloudflare’s D1 documentation is the source for limits and SQL semantics. Read those before you design a warehouse.

What this stack is good at

Intake webhooks, encrypted rows, an outbox drained by cron, session-gated operator HTML. Kiwi’s own operations hub is this shape. That is an existence proof of the architecture, not a client result.

A practical sequence

Fit check, then schema, then UI.

  • Write the objects and daily row counts
  • Confirm D1 limits against that count
  • Put mutations behind operator auth
  • Drain notifications from an outbox table
  • Apply SQL migrations in number order before dependent code

What it is not

It is not a reason to put a marketing site and a portal in one messy worker. Split public static export from authenticated HTML. It is not a ranking strategy.

What to send if you want a senior review

Share the objects, expected volume, and whether staff already know SQL. Related work at Kiwi: SaaS MVP design and development. Walkthroughs available on request.

Frequently asked questions

Can the marketing site use the same Worker?

Public HTML can be files on Pages. The Worker can own APIs, webhooks, and operator HTML. Keep the trust boundaries explicit.

Is D1 a warehouse?

No. It is a relational store for operational objects. Export analytics to a warehouse if you outgrow it.

Will you lock us to Cloudflare?

The proposal should name the host and the handover. Portable TypeScript and SQL matter more than a slogan. You own the source at the agreed handover.

Sources

Figures cited above are drawn from the linked publications and are the responsibility of their sources; we date and scope them rather than presenting them as universal guarantees.

What would this change for your business?

Share your goal and the challenge behind it. We’ll help you turn the useful ideas into a practical first step. A senior practitioner replies within one business day.

Start a project