Engineering
Behind the scenes on how we do dev at Trophy
EngineeringDesigning an MCP Tool Around a Side Effect You Can't Take Back
An email to a real person can't be recalled. How we split an MCP tool into create and send, word its errors, and think about idempotency and retries.

How Trophy Aggregates Over 30 Million Streaks in ClickHouse
How we power our analytics dashboards with ClickHouse querying over 100M+ rows with 100ms latency.

How to Prevent Points Farming and Gaming in Gamification Systems
Users will find ways to game your points system. Rate limiting and anomaly detection are partial defenses. Idempotent event tracking is the architectural solution — here's why, and how Trophy implements it

The Gamification Data Model: How to Structure Streaks, Achievements, Points & Leaderboards
Every gamification feature has known technical problems. The harder problem is designing a data model where those features can talk to each other — and where the features you'll want later don't require a rebuild.
Other Posts
EngineeringStreak Timezone & DST Handling: The Complete Implementation Guide
Naive UTC-based streak logic breaks for users in non-UTC timezones and fails silently twice a year on DST transitions. Here's the correct implementation, with code.
Read more →
EngineeringHow to Sync XP Across Devices Without Firebase (2026)
Firebase solves XP sync by treating it as a data problem. There's a better model — server-authoritative XP that any device reads from a single source of truth.
Read more →
EngineeringHow to Scale a Leaderboard Beyond Basic Redis (2026)
Redis ranking is fast and correct. Segmentation, resets, and durability are the hard parts. Here's the full production architecture — and where Trophy fits.
Read more →
EngineeringHow We Built Production-Ready SaaS Calculators in Next.js (And Kept Them Shareable)
We built calculators based on common questions we hear from customers with an emphasis on shareability, performance and auditability. Here's how we did it.
Read more →
EngineeringHandling Time Zones in Global Gamification Features
Time zones break gamification features in subtle ways. A user in Tokyo and a user in New York can't fairly compete on daily goals without careful handling.
Read more →
Migration and EvolutionThe Technical Architecture Behind Scalable Gamification
Building gamification that works at 1,000 users is different from building for 100,000. Here's what changes and why.
Read more →
EngineeringHow we built a block-based template editor for gamification emails
Read about how we built our email-builder. Hear the difficulties and successes we had + lessons learned.
Read more →
EngineeringHow We Built Our Developer Docs With Mintlify & Fern
Learn how we built our developer docs site at Trophy.
Read more →