E-Commerce Store

Jul 2024Jun 2026

A high-performance e-commerce platform with a Next.js frontend and a decoupled Go microservices backend deployed on AWS Lambda, using an event-driven architecture for real-time inventory tracking and order management.

card image

Image: Perplexity Hub

Next.jsTypeScriptGoSQLiteAWS LambdaCloudflare
Built as a freelancer for client

Overview

A responsive e-commerce platform for selling pre-owned products. The frontend is built with Next.js and Tailwind CSS, backed by a decoupled Go microservices architecture deployed on AWS Lambda. An event-driven system handles real-time inventory tracking, order management, and secure admin controls.

Approach

The system is split into three layers, each optimized for its specific responsibility.

Frontend uses Next.js with the App Router to mix Server-Side Rendering (SSR) for dynamic, SEO-critical product pages with Static Site Generation (SSG) for static assets. React Server Components minimize client-side JavaScript bundles, keeping Core Web Vitals performant.

Backend consists of 7 Go microservices (auth, customers, invoices, notifications, orders, products, uploads), each compiling to a single binary for near-native execution speeds. Lightweight goroutines handle concurrent requests with minimal memory overhead, making it well-suited for the high-throughput demands of e-commerce traffic.

Database uses Cloudflare D1, a serverless relational database built on SQLite that runs at the edge. Data is positioned physically close to the compute layer, eliminating traditional database connection overhead and complex connection pooling.

How It Works

  • AWS Lambda (ARM Linux): Go functions compile to single binaries targeting GOOS=linux GOARCH=arm64, leveraging AWS Graviton's ARM-based architecture for up to 34% better price-performance over x86. Functions scale automatically with traffic, and Go's minimal footprint keeps cold starts fast.
  • Event-driven architecture: Inventory updates, order events, and admin actions flow through an event system that keeps the frontend in sync without polling.

Tech Stack

  • Frontend: Next.js, React 19, TypeScript, Tailwind CSS
  • Backend: Go (Golang)
  • Database: Cloudflare D1 (SQLite at the edge)
  • Deployment: AWS Lambda (ARM64), Cloudflare