Inspiration
A few weeks ago, my friend and I were arguing over a political compass test they took on TikTok. They landed square in "Libertarian Left," but when we talked about actual policies, they strongly favored national border protections, aggressive state funding for nuclear energy, and strict regulation on AI development. None of those positions fit into a neat two-axis quadrant.
The traditional 2D Political Compass (and even popular 8values variants) compresses too much into too little. If you're a pacifist who loves free global trade, or a militarist who supports decentralized local government, a 2D chart simply averages your scores into an inaccurate middle ground.
We wanted to build something that actually respects political nuance without feeling like a boring university exam — and most importantly, something that doesn't hoard people's political beliefs in some centralized SQL database.
What It Does
The 12 Axes takes the open-source 12Axes model and turns it into a fast, mobile-friendly interactive quiz:
- 12 Independent Vector Scores: Instead of two aggregated coordinates, you get measured across twelve distinct axes categorized into Government, Diplomacy, Economy, and Society. You can explore how each axis is measured on our 12 Axes Breakdown Guide.
- Multiple Test Lengths for Real Humans: The classic full test has 288 statements, which takes around 25 minutes. We noticed in early analytics that over half of our mobile visitors abandoned before question 60. So we engineered a 60-statement Quick Test, a 36-statement Mini Test, and a brand-new 2-minute warm-up map at /political-test.
- Historical & Political Figures Matching: Rather than just giving you an abstract label like "Social Liberal," the algorithm calculates weighted Euclidean distances to compare your vectors against over 28 historical and contemporary figures (from Lula and Keynes to Milei and Orwell). Check out the full lineup on our Political Figures Lineup.
- Model Comparison: For people coming from other political quizzes, we wrote an honest breakdown comparing our 12 dimensions against the 8values system at 12 Axes vs 8values.
- Native Spanish and Portuguese Editions: With a massive surge of visitors coming from Mexico, Brazil, and Latin America, we localized every single statement and result description natively at /es/ and /pt/.
How We Built It
We wanted the entire app to be static, instant, and deployable to the edge as a single lightweight Cloudflare Worker:
- Frontend & Routing: Built on TanStack Start and React 19, bundled with Vite. TanStack Start gives us file-based routing and lightning-fast client hydration without needing a heavy Node server.
- Styling: Tailwind CSS with a custom accessible color palette. A strict design rule we enforced: never rely on color alone. Every single score bar renders explicit pole labels and percentages so colorblind users aren't left guessing.
- Zero-Backend Architecture: Storing people's political survey answers in a database is both an ethical nightmare and a GDPR headache. We solved this by serializing all 12 axis percentage scores into a compact base-36 hash string stored entirely inside the URL search parameter (
?r=...). Your answers never leave your browser window. - Client-Side Canvas Share Card: When you finish, the 9:16 vertical share card (optimized for WhatsApp, TikTok, and Instagram Stories) is drawn directly on an HTML5
<canvas>in your browser. No server-side rendering queue, no Lambda cold starts.
Challenges We Ran Into
- The Question Fatigue Problem: 288 questions is thorough, but brutal on mobile screens. We spent hours analyzing user drop-off curves. The drop-off was steep in the first 25 questions, but anyone who crossed 30 questions almost always finished. That insight led us to create the shorter 36 and 60 question presets while maintaining mathematical fidelity to the 12 core axes.
- The Dip vs Trade Axis Bug: In older upstream versions of 12axes, diplomacy was accidentally conflated with trade policies. We had to rewrite the scoring logic to ensure economic protectionism/globalism remained strictly orthogonal to military diplomacy and internationalism.
- Edge Bundle Constraints: Keeping the entire multilingual bundle (English, Spanish, Portuguese) under Cloudflare Worker script size limits required aggressive tree-shaking and using Paraglide for compile-time message localization.
Accomplishments That We're Proud Of
- Zero tracking accounts: zero passwords, zero emails collected, zero backend tracking of quiz answers.
- 100% pure client-side math that works offline after the initial page load.
- Seamless mobile sharing: generating clean 1080x1920 image cards directly on mobile Safari and Chrome without server roundtrips.
What We Learned
People don't want a political quiz to tell them who to vote for or box them into a dogmatic corner. They want a neutral, well-calibrated mirror to articulate what they actually value. Writing neutral copy that describes each pole as its own supporters would describe it was the hardest — and most rewarding — part of the project.
What's Next for The 12 Axes
- Adding customizable side-by-side comparison links so friends can see their exact axis-by-axis delta.
- Expanding localized political figure matches for more European and Asian political contexts.
Built With
- cloudflare-workers
- react
- tailwindcss
- tanstack-router
- typescript
- vite