17
A shop with no backend, yet

Sabuj

The storefront of a Kolkata plant nursery — shop, checkout, OTP accounts, order tracking — where every plant has a goofy mascot drawn in code.

JavaScript vanilla-jsthree.jse-commerceprocedural-art
click to turn
Seeded, not drawn

A small spec plus a hash of the product id — the same plant on every page, every visit. Change the pot and it is redrawn. A reconstruction of art.js, not the file itself.

Product page — the mascot redrawn in the chosen pot
running Product page — the mascot redrawn in the chosen pot
One data layer, two answers
eleven pagesa shell + one scriptui.js injects chromefilters in the URL Api.*api.jsthe only door USE_MOCKconfig.js true local data filesmock-data.jsshort artificial delayOTP is always 1234 false REST under API_BASE17 endpoints, specifiedserver recalculatesevery total same shapeseither way Storecart · wishlistfires store:change ART.JS — NO IMAGE FILES spec + hash(product id) → the same plant on every page, every visit

The pages never know which side of the flag they are on. Response shapes are identical either way.

The whole contract, from a page
const { items, total } = await Api.listProducts({
  category: "flowering", pet: 1, sort: "rating"
});

Store.add({ id: "p10", name: "Red Joba", unit: 299,
            size: "s", pot: "terracotta" });

document.addEventListener("store:change", updateBadges);

Verbatim from the README. The cart is an event, not a framework — badges, drawer and checkout all just listen for store:change.

The goofy illustrations

Product photos show the real plant. Everywhere else a plant is drawn by code: twenty types — monstera, snake plant, palm, cactus, bonsai, tuberose spikes, even seed packets — composed from four leaf primitives and a quadratic-curve walker, with a face on the pot that blinks on a random offset and grins on hover.

One SVG filter — feMorphology dilate, flood, merge — draws the sticker outline round the whole silhouette instead of stroking every leaf. The 3D hero follows the same idea in Three.js: a lathe-turned pot, and monstera leaves cut from THREE.Shape with real holes for the fenestrations.

The Three.js monstera — light and dark

Kolkata, specifically

Pincode checks know 7000xx from Howrah from the rest of Bengal. The season band follows Bengal’s calendar — Grishma, Borsha, Sharat, Sheet — and opens on the current one. Plants carry their Bengali names, and the delivery map draws the Hooghly.

Sabuj is Bengali for green.

Illustration library — one generator, every plant
running Illustration library — one generator, every plant

Status, honestly

It is a frontend, and mock mode says so on the page: the OTP is always 1234, orders live in localStorage, and an order advances itself with time since it was placed so the tracker has something to show.

The README specifies every endpoint the backend must implement, and the one rule it must not skip: the server recalculates prices and totals itself. The client’s figures are for display only.

Outcome

Sabuj-PlantHouse

Chapter 18
No Filter

A studio site for a studio of one — a WebGL brand mark, a Matter.js block pit, wire ropes you can drag, and a harness that gates every change.

continue
17 — Sabuj
scroll · drag · ← →