Skip to content
ReactViteD3.jsThree.jsJavaScriptCSSVercelGitLab CI
July 19, 2026

Primorama

Primorama's Explore page showing a polar spiral of the 9,592 primes up to 100,000.

Live: primorama.vercel.app

Primorama sieves the primes live in the browser and draws them fourteen different ways: spirals, gaps, counting functions and a rotating 3D suite. You can inspect individual primes, hear them as music, browse the record-breaking giants and test yourself with minigames.

What it does

  • Explore: 14 visualizations, including the Ulam, Sacks and polar spirals, Gaussian primes, prime gaps, π(x) counting, twin primes, the Goldbach comet, Chebyshev bias and Riemann ψ(x) rebuilt from ζ zeros. Every 2D graph zooms and pans, and clicking a point shows its rank, neighbouring gaps, twin status and Mersenne, Fermat or palindrome tags.
  • 3D: residue lattice, spiral horn and modular residue rods, built with three.js and lazy-loaded so the rest of the app stays light.
  • Sonify: each prime maps to a pentatonic note and the gaps become the rhythm, played through the Web Audio API.
  • Records: every known Mersenne prime with discoverer, year, method and the perfect number it generates.
  • Play: four minigames (Prime or Not, Guess the Next Prime, Sieve It! and Goldbach Builder) with three difficulty tiers and saved high scores.
  • Everywhere: light and dark themes, plus English and Greek.

How it’s built

  • A segmented Sieve of Eratosthenes in a Web Worker handles ranges up to 50,000,000 without freezing the UI.
  • D3 draws the SVG charts and canvas renders the dense point fields, so both stay sharp when zoomed.
  • React 19 with React Router 7 on Vite 8, which also handles worker bundling and code-splitting.
  • It’s a fully static SPA with no backend, auth or tracking. Fonts are self-hosted so the page never loads anything from another domain.

DevOps and security

  • Deployed on Vercel from GitLab, with an SPA rewrite so deep links resolve.
  • Strict security headers: a Content Security Policy locked to 'self', plus X-Frame-Options: DENY, nosniff, Referrer-Policy and Permissions-Policy.
  • GitLab CI runs SAST and secret-detection scans on the repo.

Turning Ideas Into Code. Anything in mind?

Get in touch

Tell me about your project, role or idea. I usually reply within a couple of days.

I only use your name, email and message to reply to you. No cookies, no tracking.Privacy policy

Esc