← Projects

Personality Engine

A fast, no-backend personality quiz I built solo for an online community event. It held up to viral traffic.

Ran as a one-month event, now offline

View code
Demo uses sample data to protect user privacy.

The ask

The organizers of a month-long online community event wanted a set of quick, shareable personality quizzes: type in a name, get a result. It had to stay up when posts went viral, without a server to manage.

How I built it

The trick was making results feel personal without storing anything. Each username went through a hash function that always gave the same answer, so people could compare results and screenshot them. With no backend, there was nothing to crash when traffic spiked.

  • Same name, same result. A hash function turned every username into a consistent answer.
  • Built to be shared. One-tap image cards and an X share button that trimmed results to fit.
  • One set of building blocks. Every quiz reused the same layout and hashing code, so adding a new one was quick.
HTML + CSS
every page and the shared design
JavaScript
hashing and quiz logic, all in the browser
html2canvas
turned results into shareable images
GitHub Pages
free static hosting
Google Analytics
traffic tracking
Git + GitHub
version control

The whole trick

function hash(str) {
  let h = 0;
  for (let i = 0; i < str.length; i++) {
    h = Math.imul(31, h) + str.charCodeAt(i) | 0;
  }
  return Math.abs(h);
}

Same username in, same number out. No database needed.

Result

Over 1.5 million visits in one month, with zero downtime and zero server costs.

1.5M+ visitors

What I'd change

Try a quiz

A simplified mini version I rebuilt for this page. The real site looked different, so watch the demo above for that.

Personality Engine
Enter a name. Get the truth.
@

Red Flag Meter
@anyusername