A Cloudflare stack that runs a cross-border shop with no fixed costs
For a shop with a few dozen products, the monthly fee of a hosted commerce platform is too heavy. For arukutomaru we chose an architecture that costs nothing beyond Cloudflare usage and Stripe’s payment fees. Here is how it breaks down.
Who does what
| Layer | Choice | Why |
|---|---|---|
| Storefront | Astro (static) with React | Product pages ship as finished HTML, which helps both search and first paint |
| Admin | Vite and React (SPA) | Internal only, so search does not matter. Protected by Cloudflare Access |
| API | Hono on Cloudflare Workers | Billed per request, so an idle hour costs nothing |
| Database | Cloudflare D1 (SQLite) | Enough for tens of products and low traffic, with no dedicated instance |
| Images | Cloudflare R2 | Egress is free |
| Payments | Stripe | No monthly fee, only the payment fees |
The point is to hold nothing that spends money while idle. In a month with no sales, the infrastructure cost goes close to zero.
Mixing static pages and an SPA
There is no need to make everything an SPA, and no need to make everything static. The rule is simple.
- Pages you want search engines to read get generated statically: products, articles, landing pages.
- Pages only a signed-in person sees are an SPA: the admin, the account area.
Generating product pages statically means a crawler receives finished HTML without waiting for JavaScript to run. It comes from a CDN edge, so it is fast even from the other side of the planet. For a shop selling across borders, that difference turns directly into orders you do or do not get.
Sharing types between the API and the front end
The API is REST, but the front end calls it through Hono’s typed RPC client (hc<AppType>).
As long as the handlers are written as a method chain, the API’s type definitions reach the
front end as they are, and a changed endpoint breaks at build time and tells you.
const res = await client.api.products[':id'].$get({ param: { id } });
// The type of res is derived from the handler on the API side Nami Smart LLC
Fast, cost-efficient, high-quality app development. If you would like to talk about a project, please get in touch.