All work

Company Hub

A live interview-prep site that ranks LeetCode questions by how often each company actually asks them.

When
Jun 2026 to now
What
Live product, built and run alone
Stack
Next.js 15, TypeScript, PostgreSQL, Prisma
Links
companyhub.fun
Code on GitHub

Why it exists

When you prepare for a specific company, the useful question is what that company actually asks and how recently. Company Hub organises practice around that: every company has its own list of questions ranked by frequency, with filters for how recent the data is.

The question data comes from the open-source leetcode-companywise-interview-questions dataset.

What I built

  • Company explorer and problem bank. 3,400 questions across 656 companies, with difficulty mix, topic breakdowns and frequency per company.
  • Accounts. Auth.js v5 with Google sign-in and TOTP two-factor authentication.
  • Practice tools. LeetCode progress sync, graded spaced repetition, study sheets and a Monaco code editor that works in 9 languages.
  • Data model. 21 Prisma models on PostgreSQL.

Running it in production

The interesting problems only appeared once real people used it.

  • Connection pool exhaustion. Serverless functions opened more database connections than PostgreSQL allowed. Moving to a transaction-mode pooler fixed it.
  • Foreign-key violations (P2003). Stale sign-in tokens referred to user records that no longer existed, so writes failed. I traced the cause and fixed it.
  • Abuse. Rate limiting and account lockout on sign-in.