← Back to Projects

Mini Shopify-like API

By Bruce Wyatt|
Featured Image for the mini Shopify-like API project

Problem

As a self-taught developer with experience in MERN / Next.js and deploying apps on Vercel & Supabase, I wanted to push my backend and infrastructure skills further. While managed platforms are convenient, they abstract away many core concepts like containerization, API design, and database management.

Introduction

To challenge myself, I started building a mini-Shopify-style backend API, focused on a clean microservice architecture with Node.js, Express, PostgreSQL, and Docker. This project lets me combine my passion for e-commerce with hands-on experience in real backend systems.


Project Goals

  1. Gain practical experience in microservices and API design
  2. Learn how to containerize applications with Docker
  3. Practice database modeling and Postgres queries
  4. Prepare for cloud deployment and VPS hosting
  5. Build a portfolio-ready, interview-friendly backend project

What I’ve Built So Far

Product Service

I focused first on the Product Service, which is the core of any e-commerce system. The service supports full CRUD operations:

  • POST /products → Create a new product
  • GET /products → List all products
  • GET /products/:id → Fetch a single product
  • PUT /products/:id → Update product info
  • DELETE /products/:id → Remove a product

All endpoints are connected to a PostgreSQL database, running in a Docker container.


Example Code Snippet

Here’s the update product endpoint:

// routes/products.js router.put("/:id", async (req, res) => { const { id } = req.params; const { name, price, inventory } = req.body; if (!name && price === undefined && inventory === undefined) { return res.status(400).json({ error: "No fields to update" }); } const result = await updateProduct(id, { name, price, inventory }); if (result.rows.length === 0) { return res.status(404).json({ error: "Product not found" }); } res.json(result.rows[0]); });

Architecture Overview

The project is designed with separation of concerns in mind:

  • Product Service → Handles product management
  • Inventory Service (future) → Will manage stock and quantities
  • Docker Compose → Runs all services and PostgreSQL container
  • API Layer → Exposes endpoints to external clients

Architecture Diagram Placeholder:


Screenshots / Visuals to Add

You could add:

  • Docker containers running (docker ps)
  • Postgres terminal querying products
  • API responses from Postman / curl
  • VSCode project structure screenshot
  • Example microservice flow diagram

Placeholder examples:

  • Cloudinary

Key Learnings So Far

  • Hands-on experience with Dockerized Node.js services
  • Writing SQL queries and interacting with Postgres from Node.js
  • Structuring a project for scalability and maintainability
  • Understanding CRUD endpoints and proper REST API practices
  • Connecting multiple layers: routes → models → database
  • Preparing the foundation for microservices and cloud deployment

What’s Next

Next steps include:

  • Inventory Service → Another microservice to manage stock
  • Authentication → Basic API key system or JWT
  • VPS Deployment → Run the services on a cloud server
  • CI/CD → Automate builds and deployment using Docker + GitHub Actions
  • Kubernetes (future) → For full production-scale microservices experience