A Hybris-grade commerce platform, built end to end.

Capsule Commerce is a headless, API-first platform with the architecture of SAP Hybris and commercetools, without the licensing. I designed, built and adversarially audited it alone.

1,018 tests~154k lines of code6 deployed services27 documented featuresJava 21, Spring Boot 4

How it fits together

A multi-module Spring Boot 4 backend on Java 21, a Next.js storefront, a React 19 backoffice and a stateless Python AI service. Six services, built in CI and deployed as containers.

How it fits together live request paths

Search runs BM25 and vector retrieval. The AI sidecar handles natural-language queries and rescues zero-hit ones, and an AI outage never blocks checkout.

The parts worth showing

A couple of dozen real subsystems. These are the ones people lean in for.

Search + AI

Hybrid and natural-language search

OpenSearch blends BM25 keyword and kNN vector scores. A stateless LLM sidecar turns plain-English queries into grounded, structured filters and rescues zero-hit searches. An AI outage never blocks checkout.

Marketplace

Multi-vendor selling

A merchant registry with per-seller isolation enforced in the persistence layer, and per-merchant consignments so one order can ship from several sellers.

Orchestration

Business-process engine

Fulfilment, consignment and delivery run as XML-defined processes with wait, branch and loop nodes, cluster locks, and a live flow diagram in the admin with replay, restart and signal controls.

Pricing

Promotion engine

Eight action types (percentage, fixed, BOGO, bundles, tiered ladders, fixed-price groups) with conditions, vouchers, per-customer caps and proportional per-line attribution. Money is computed on the server.

Backoffice

Visual query builder

A FlexibleSearch-style tool: query any entity with explicit joins and mass-edit, every value parameter-bound, with a sensitive-field blocklist. Results round-trip to CSV that ImpEx reads straight back.

Data

ImpEx import and export

Templated CSV, dry-run validation, row-level transactional import, reference resolution by business code and soft-delete semantics, with one shared column-deriver so exports re-import cleanly.

Auth

OAuth2 with RS256 and JWKS

Three grants, asymmetric JWTs published at a JWKS endpoint, refresh-token rotation with reuse detection, HttpOnly refresh cookies, and per-IP, per-client and per-user lockouts.

Payments

Pluggable payment SPI

Mock, Stripe and Razorpay chosen by config, recurring mandates, signed idempotent webhooks, money in integer minor units, and refunds that are never falsely marked done.

Catalog

Typed catalog and inventory

Base and variant products, staged-to-online catalog sync, classification attributes, and stock reservation at checkout with a TTL reaper, so concurrent checkouts cannot oversell.

Platform

Cron and jobs engine

Scheduled and on-demand jobs with cluster locking, live progress, abort and retry policies, plus a sandboxed Groovy scripting console.

Built like production, audited like an adversary

What separates a portfolio project from a platform: I run adversarial reviews on my own code and act on what they find.

0

backend tests: 1,000 in Java on real PostgreSQL via Testcontainers, 18 in Python.

Audited like an adversary

A six-lane security and architecture review of my own code found real issues. All fixed.

  • Closed an order-code enumeration oracle on the storefront.
  • Fixed optimistic-lock lost updates that weakened brute-force lockout.
  • Clamped an unbounded discount overshoot in the promotion engine.
  • Concurrency discipline: pessimistic lock-then-refresh, atomic conditional-update counters and optimistic versioning. No silent lost updates on money paths.
  • The server computes money. Client amounts are never trusted, and entity-level invariants hold even through the generic CRUD path.
  • Fail-open by design. Search and AI degrade gracefully, and nothing external can block an order.
  • Dev and prod parity. Tests run on real PostgreSQL through Testcontainers with Flyway and schema validation.

What it is, and what it isn't

This is a solo reference platform engineered to production patterns, not a system battle-tested at scale.

Deliberate scope today: single-tenant per deployment with seller-level row isolation, no live payment-gateway round-trip test yet, and no automated frontend test suite.

I know where the gaps are because I audit for them. Knowing your system's edges is the senior skill.

Stack

Java 21Spring Boot 4PostgreSQL 16 + FlywayOpenSearch 2.19Python, FastAPI, LiteLLMReact 19, Vite, MUINext.js 16, Tailwind 4OAuth2, RS256, JWKSGroovy scriptingMicrometer + PrometheusDocker, GHCRGitHub ActionsMaven multi-module

See it running

Both halves run on the same Spring Boot backend: the storefront a shopper sees and the backoffice that runs it.

"Make my lips pop"

A real recording of natural-language search.

The Capsule Commerce storefront home page

The storefront

The home page a shopper lands on. A React backoffice runs alongside it.

Prefer a guided tour? I give a live 30-minute walkthrough over screen-share. Pick a lane or let me drive:

  • Checkout with stacked promotions
  • The process engine's live flow diagram
  • Plain-English search on the real index
  • An ImpEx export and re-import round trip

Write back. I answer fast.

Open to senior backend, platform and AI engineering roles, and to consulting on SAP Commerce, Java and marketplace integrations.