Kalder
Membership and loyalty platform for brands
- Built at
- Kalder, via Crea Inc.
- Period
- 2022 - 2023
- Role
- Backend engineer
What it is
Kalder let brands run membership programs on the blockchain. Members signed in with their wallet, minted an NFT membership card, completed quests that paid rewards in the brand's token, joined events by scanning a QR code and kept their card in Apple Wallet. Brand staff managed all of this from a portal, and Kalder operators from a separate admin API. Kalder has since been acquired and repositioned around card-linked rewards; this case study covers the 2022 to 2023 product.
The backend was a NestJS service on MySQL built by the Crea Inc. team for Kalder, a client in Brooklyn, NY. I worked on it as a backend engineer from July 2022 to September 2023.
System overview
- Modular monolith with two deployables from one codebase: the REST API (brand, consumer, admin and landing routes, each with its own OpenAPI document) and a worker process.
- MySQL through TypeORM with migrations run at startup, UUID keys and JSON columns for pass templates and brand configuration.
- Queues on Redis and scheduled jobs for reminders, waitlists, notification emails, chain synchronization and pass generation.
- White-label support from one API: the brand is resolved from the request domain, and each brand has its own contracts, chain, signer, email sender, templates and pass design.
- Wallet-based sign-in with JWTs; brand roles enforced by guards; the operator API behind its own access controls.
- A global interceptor wraps responses in one envelope and validates them against response DTOs; error tracking, centralized logs and health checks.
Engineering
Apple Wallet pass pipeline
A mint enqueues a job that renders the brand's pass template, signs it with the Apple certificates, uploads the pass to S3 and emails the member a branded message with the card image. A bulk job backfilled passes for members who minted before passes existed.
QR check-in with verification on chain
Event check-in accepts two QR formats: a pass code or a signed message from the app. The backend checks event registration, rejects duplicates and confirms NFT ownership on chain for the brand's network.
Self-healing mint sync
A scheduled job compares mint attempts in the database with owners on chain, marks recovered mints, updates counts and enqueues pass generation, so a failed callback never leaves a member without a card.
Quests with token rewards
Experiences move through waiting, submitted, verified, rejected, expired and full states, with several proof types, drop codes, waitlists, quotas and rewards paid in brand tokens.
Contract-first delivery
New endpoints started as mock services in front of the real API, so the frontend could integrate before the backend landed; runtime response validation kept the contract honest.
Testing and delivery
- End-to-end tests with Jest and Supertest against a real MySQL test database, with factories, seeders and mocked wallet, email, storage and signing services.
- Load test scripts for the complete mint flow with latency thresholds.
- GitHub Actions deploys develop, staging and production to Heroku as web and worker containers; branch policy and reviewer assignment on pull requests.
Stack
Kalder stack: NestJS, TypeScript, MySQL, TypeORM, Redis, Bull, Apple Wallet, ethers, AWS S3, Heroku
My part
- Backend engineer on the Crea Inc. team for Kalder, July 2022 to September 2023; one of the main contributors over that period.
- Worked on the quest engine, the email notification system, whitelist and waitlist flows, the worker foundation, centralized logging, the brand overview and the operator API protections, plus Apple Wallet passes and the QR check-in flow.