logoalt Hacker News

swipeharbor • today at 3:50 PM • 0 replies • view on HN

Yes, as long as you hand off the parts that need to be live. The catalog, product pages and even a search index can be generated at build time, and checkout goes to a hosted service (Stripe Checkout or Payment Links, Shopify's Buy Button, Snipcart and the like) that handles the cart, payment and tax. A webhook from wherever you edit products triggers a rebuild.

The catch is anything that changes faster than you rebuild, mainly stock counts and prices. The usual approach is to treat what's on the static page as a hint and make the checkout side the source of truth, so a sold-out item fails at checkout instead of being oversold.

For a small catalog that's a pretty comfortable tradeoff.