Calcimate (Current Job)
The 6-beat story
Section titled “The 6-beat story”- What: Calcimate is an ed-tech platform where students learn math through interactive modules and quests.
- My role: I work full-stack: interactive module UI, the Hono API, auth, and the progress-tracking data model.
- Architecture:
Browser (Next.js app, React, GSAP, React-DND, Howler)│▼Cloudflare Workers ── Next.js (deployed via OpenNext)│ └─ API routes → Hono app│ ├─ Better-auth (sessions)│ └─ Drizzle ORM▼Azure Database for PostgreSQL (users, sessions, quests, progress)
- Hard problem: [pick ONE you really solved, e.g., drag-and-drop on touch devices, getting Postgres connections to work well from Workers, animation performance on low-end phones, or syncing progress reliably.]
- Result: [engagement/completion change, if measured; features shipped]
- Improve: Put connection pooling/caching (Cloudflare Hyperdrive) in front of the DB, add proper latency monitoring (p95 by region), and add E2E tests for the drag-and-drop flows.
Cloudflare Workers, Hono, OpenNext
Section titled “Cloudflare Workers, Hono, OpenNext”Q: Why Cloudflare Workers instead of a normal Node server on AWS/Render?
“Workers run on V8 isolates at Cloudflare’s edge, so there’s essentially no cold start like Lambda, and they scale automatically. We don’t manage servers. Pricing is also cheap for our traffic. The tradeoff is that it’s not a full Node environment, so some npm packages don’t work, and there are CPU-time limits per request. We enable the nodejs_compat flag for the Node APIs we need.”
Q: Why Hono and not Express?
“Express is built on Node’s http module, so it doesn’t run natively on Workers. Hono is built on Web Standards (Request/Response), so it runs on Workers, Bun, Deno, and Node. It’s tiny and fast, has Express-like middleware, and has first-class TypeScript, including typed routes and an RPC client, so the frontend gets typed API calls.”
Q: What is @opennextjs/cloudflare? How is it related to Hono?
“OpenNext is an adapter. next build produces output meant for Node or Vercel, and OpenNext transforms that output so the Next.js app runs on Cloudflare Workers, including SSR, route handlers and middleware. So it’s how we deploy the Next.js app. Hono is our API framework. [Explain your setup: either Hono is mounted inside a Next.js catch-all route handler like app/api/[[...route]]/route.ts, or it’s a separate Worker.] They’re two separate pieces.”
Know which one your project actually does.
Q (🔴 will be asked): You wrote "sub-100ms global latency". How did you measure it?
Only answer with what’s true. A strong honest answer:
“That was the response time we saw for [which endpoints] from [where: Cloudflare analytics / browser network tab / a load test from multiple regions]. Static and cached responses served from the edge are well under 100ms. For requests that hit the database, latency depends on the distance to our Azure Postgres region, which is in [region]. For users far from that region, a DB round trip adds time. To improve that, I’d use Hyperdrive for connection pooling and query caching, or cache read-heavy data at the edge.”
If you can’t say this confidently, remove the number from your resume. This is the line most likely to make an interviewer distrust the rest.
Q: How do Cloudflare Workers connect to Azure PostgreSQL? Isn't TCP an issue?
“Workers support outbound TCP via the connect() API, so Postgres drivers like postgres.js/pg work with nodejs_compat. The problem is that opening a new connection per request is slow (TCP + TLS + Postgres auth = several round trips). Hyperdrive solves this: it keeps a pool of warm connections close to the DB and can cache reads. [Say what you actually used: Hyperdrive, a direct connection, or the Neon/serverless driver.]”
Q: What are the limitations of Workers you ran into?
Prepare one real example. Common ones: an npm package that depended on Node fs/native modules; bundle-size limits; CPU-time limits for heavy work; no long-running processes (use Queues/Cron triggers instead); env vars accessed via bindings (c.env) not process.env (with compat it’s partially available).
Interactive UI: GSAP, React-DND, Howler
Section titled “Interactive UI: GSAP, React-DND, Howler”Q: Why GSAP and not CSS animations or Framer Motion?
“GSAP is great for sequenced, timeline-based animations: step 1, then 2, overlapping 3. That’s hard to coordinate in CSS. It’s also performant, it handles cross-browser quirks, and it lets us control animations (pause, reverse, seek) from code when the student answers. For simple hover effects I still use CSS/Tailwind.”
Follow-up — how do you use GSAP in React? The useGSAP hook from @gsap/react (or useLayoutEffect + gsap.context()), scoped to a ref, so animations are cleaned up on unmount. Animate transform and opacity for performance.
Q: How does React-DND work? What did you build with it?
“React-DND uses a provider with a backend: HTML5Backend for mouse, TouchBackend for mobile. Draggable items use useDrag with a type and an item payload, and drop zones use useDrop with an accept type and a drop handler. In our modules, students drag [numbers/shapes/answer tiles] into [slots], and on drop we validate the answer, play a sound and trigger a GSAP animation.”
Follow-up — mobile? HTML5 drag-and-drop doesn’t work on touch, so you need TouchBackend or a multi-backend. Know what you did.
Follow-up — accessibility? Drag-and-drop isn’t keyboard accessible by default. A good answer: you’d add a click-to-select/click-to-place alternative.
Q: What is "spatial audio" and how did you do it with Howler?
“Howler.js wraps the Web Audio API with an HTML5 Audio fallback. It handles sprites, preloading and mobile autoplay unlocking. Its spatial plugin lets you set stereo panning (sound.stereo(-1..1)) or a 3D position (sound.pos(x,y,z)), so a sound appears to come from where the item is on screen.”
If you only played sound effects (correct/wrong/click), say “audio feedback” and change the resume. Don’t claim spatial audio unless you used stereo()/pos().
Q (🔴): How did you measure the 50% engagement increase?
You need: which metric (avg. session time? modules completed? return rate?), baseline (before the interactive version), source (analytics tool, DB query), time window.
Example: “We compared the average time spent per module and the completion rate for the 2 weeks before and after we launched the interactive version, using [PostHog/GA/our DB events]. Completion went from X to Y.”
If you don’t know → remove the number.
Auth & Data: Better-auth, Drizzle, Postgres
Section titled “Auth & Data: Better-auth, Drizzle, Postgres”Q: What is Better-auth and why not NextAuth/Auth.js or Clerk?
“Better-auth is a TypeScript-first, framework-agnostic auth library. It stores users and sessions in our own database through adapters (we used the Drizzle adapter), supports email/password and OAuth, and has plugins for things like 2FA and organizations. Compared to Clerk, we own the data and don’t pay per user. Compared to Auth.js, it works with Hono outside Next.js and has a simpler API and better type safety.”
Q: How does Better-auth keep a user logged in? JWT or session?
“By default it’s database sessions: on login it creates a session row and sets an httpOnly cookie with the session token. Every request, the server validates the cookie against the session table (it can also cache the session in a signed cookie to avoid a DB hit). Because sessions are in the DB, logout and revocation are easy: delete the row.”
Q: Why Drizzle and not Prisma?
“Drizzle is lightweight, with no separate query engine binary, so it works in edge runtimes like Workers. Its schema is plain TypeScript, and its query API is close to SQL, so I know exactly what SQL runs. Migrations are generated with drizzle-kit. Prisma has a nicer high-level API but historically was heavier on the edge.”
Q: Draw your schema for quests and progress tracking.
Prepare something like this (adapt it to your real schema):
users(id, name, email, created_at)quests(id, title, grade, order)modules(id, quest_id → quests, title, type)user_progress( user_id → users, module_id → modules, status ('not_started' | 'in_progress' | 'completed'), score, attempts, completed_at, PRIMARY KEY (user_id, module_id))Talking points: composite primary key prevents duplicate progress rows; an index on user_id for “load my progress”; upsert (ON CONFLICT DO UPDATE) when saving progress; a transaction if completing a module also unlocks the next quest/awards XP.
Q: How do you prevent progress being lost or double-counted?
“Saves are idempotent upserts keyed on (user, module), so retrying the same request doesn’t create duplicates. Awarding points happens in a transaction with the completion update. On the client, we [save on each step / debounce saves / retry on failure].”
Q: Why Biome? What did you migrate from?
“We used ESLint + Prettier: two tools, multiple configs and plugins, and it was slow. Biome is a single Rust-based tool for linting and formatting, and it’s much faster [give your before/after]. The migration was biome migrate eslint / biome migrate prettier, then fixing rules that differ. The tradeoff: Biome doesn’t support every ESLint plugin yet, so some rules [e.g., certain React/Next plugin rules] weren’t available.”
Team & process (they’ll ask)
Section titled “Team & process (they’ll ask)”Q: How big is the team? How do you get work? How is code reviewed and deployed?
Prepare real answers: team size, your manager, how tasks arrive (Jira/Linear/Notion), PR reviews, how deploys happen (wrangler deploy via GitHub Actions? manual?), staging vs prod. Vague answers here look like you weren’t really involved.