All writing

Next.js · Go · Performance

Why I pair Next.js with a Go backend for e-commerce

Most online shoppers in Bangladesh browse on a phone, often on mobile data. If a product page takes four seconds to appear, a lot of them leave before they see the price. So when I build a store, speed is not something I tune at the end. It decides the stack.

For Glow More and VIP Sports & Fitness I used the same pairing: a Next.js storefront in front of an API written in Go.

What each side does

Next.js renders the pages shoppers see. Product and category pages can be rendered ahead of time or on the server, so the browser receives real HTML instead of an empty page that fills in later. That is what makes the first screen appear quickly.

Go runs the API behind it: products, prices, stock, carts and orders. Go compiles to a single fast binary, handles many requests at once without much memory, and keeps response times low and steady. When the storefront asks for a category with hundreds of products, the answer comes back quickly.

The numbers

Both stores score at the top of Google's Lighthouse tests:

  • Glow More: 93 on mobile, 100 on desktop, with 100 for accessibility, best practices and SEO. The page loads in about 0.68 seconds.
  • VIP Sports & Fitness: 99 on mobile PageSpeed and 100 on desktop, with a catalogue of more than 500 products.

A score is not the goal in itself. What matters is that a shopper on a mid-range phone sees the product quickly and can add it to the bag without waiting.

Why not just WordPress?

WordPress and WooCommerce are a good choice for many stores, and I still build with them. They give the shop team a familiar admin and a large plugin ecosystem. The trade-off is that every page goes through PHP and a heavy theme, and speed then depends on caching and careful plugin choices.

A separate frontend and backend take more work up front, but each part does one job well. The storefront can be redesigned without touching the catalogue, and the API can serve a mobile app later if the client wants one.

When I recommend it

  • The catalogue is large, or the store expects a lot of traffic.
  • Most visitors are on phones and mobile data.
  • The client wants room to grow: a mobile app, more sales channels, or custom features later.

For a small shop with a few dozen products, a well-built WooCommerce store is often the simpler and cheaper answer. I would rather recommend that than build more than the business needs.

More writing