Skip to main content
April 21, 20266 min read

Building AM Commerce: Platform-First Architecture

Why I designed AM Commerce as a platform first, and a marketplace second.

architectureplatformcommerce

AM Commerce started as a marketplace problem and quickly became a platform problem. Once you build catalogs, orders, payments, tenants and merchant tooling for one product, you realize you have just built about eighty percent of every commerce product the region needs. The interesting question is what you do with that realization.

My answer was to invert the usual order: build the platform first, then build Armenian Mall as the first tenant on top of it.

What "platform-first" actually means

It is easy to say "platform" and end up with a tangled monolith with hopeful folder names. What I wanted instead was a set of explicit boundaries:

  • Identity and tenants are owned by the platform. No product is allowed to invent its own user model.
  • Catalog, orders and payments live behind stable APIs. Product-specific logic sits in adapters, never inside the core.
  • Integrations are first-class services with their own contracts, retries and observability — not glued into business logic.

The practical test is simple: can a second product (B2B portal, education marketplace, internal ops tool) be built on the same backbone without forking any core code? If yes, it is a platform. If no, it is a monolith with marketing.

The stack, briefly

FastAPI for services, with strict domain models. PostgreSQL as the source of truth, with versioned migrations and no clever cross-service joins. Redis for queues and caches. Next.js App Router for the storefront and admin. Background workers, signed webhooks and audit logs throughout.

None of this is exotic. The discipline is in the boundaries, not the components.

Why this matters for Armenia

The regional market does not need another bespoke marketplace. It needs a backbone that small teams can build credible commerce products on without re-implementing the basics every time. AM Commerce is my attempt at that backbone — opinionated where it matters, quiet where it doesn't, and ready for the next product before the current one is even finished.