Inspiration
Human memory rewrites itself to make us look smart. When things go right, I always catch myself saying, "I knew it all along." When they go wrong, it's "Nobody could have seen that coming." Hindsight bias is undefeated.
I realized that my intuition is completely unmeasurable if I can just quietly edit the past in my head. I wanted to build a "truth serum" for my own decision-making—a tool that forces intellectual honesty, mathematically measures how good my gut feeling actually is, and physically prevents me from lying to myself.
What it does
Doxa is a tamper-proof decision journal. You write down what you predict, how confident you are, and later, what actually happened. It cures overconfidence in three visceral ways:
- The Adversarial Interrogator: If I try to log a decision with over 85% confidence, Doxa stops me. A local AI reads my reasoning, pulls up my past failed predictions, and aggressively cross-examines me, highlighting my own words to point out logical gaps before I can finalize the entry.
- The Cryptographic Auditor: Once a decision is logged, it's sealed into a SHA-256 hash chain. If I try to retroactively edit my prediction or reasoning to make myself look better, the entire chain visibly breaks in the Auditor view.
- The Counterfactual Sandbox: Instead of boring static charts, I built a 60fps interactive sandbox. It tells me hard truths like, "When you say you're 90% sure, you're historically only right 74% of the time." I can drag a "What If" slider to see exactly how deflating my ego in the past would have mathematically improved my overall accuracy score today.
How I built it
I engineered Doxa to be lightning-fast, private, and mathematically rigorous.
- Frontend: I used Next.js 16 (Turbopack) and Tailwind CSS v4, crafting a premium "Deep Obsidian" aesthetic so it feels like a high-end editorial tool, not a clunky spreadsheet.
- The Math Engine: I built a custom Bayesian grid-fitting engine and Murphy Brier score decomposition entirely in pure client-side TypeScript. It runs instantly in the browser without relying on heavy Python backends.
- Cryptography: I used the native Web Crypto API to compute canonical SHA-256 digests in the browser, chaining each decision block to the last to create a mathematically undeniable ledger.
- Adversarial AI: I integrated local-first LLMs (via Ollama) to ensure my reasoning and data stay completely private and offline.
Challenges I ran into
Translating complex statistics (like Bayesian posteriors) into a UI that an exhausted person actually wants to look at was incredibly hard. My early versions felt like reading an academic math paper. I had to completely rethink the UX, eventually building an animated SVG fan chart that responds instantly to a slider.
Also, building a local-first hash chain meant writing a rock-solid JSON stringifier that behaves identically across the browser client and the SQLite database to avoid false-positive chain breaks. Doing the math, cryptography, and UI/UX design entirely solo was a massive balancing act.
Accomplishments that I'm proud of
I'm really proud of the Tamper Simulator. It's an interactive visualizer that lets you deliberately try to cheat your past entries, just so you can watch the cryptographic hashes cascade into a failure state in real-time.
I'm also incredibly proud of the math. I wrote 246 Vitest unit tests to ensure my calibration algorithms perfectly recover known probability distortions without flinching.
What I learned
I learned that math and cryptography alone don't change behavior—the human ego is too stubborn. The only way to make brutal honesty palatable is through world-class UX. I found that if you wrap hard truths in beautiful, interactive micro-interactions, people actually become fascinated by their own flaws rather than getting defensive about them.
What's next for Doxa
- Automated Resolution: Integrating with calendars and APIs to automatically grade my predictions when their target dates arrive.
- Mobile Companion: A fast, text-message-based interface so I can log rapid-fire predictions on the go.
- Team Pooling: Allowing startup founders to pool their decisions anonymously to see if their collective intuition is actually grounded in reality.
Built With
- ai
- bayesian-statistics
- cryptography
- gemini
- llm
- next.js
- ollama
- prisma
- react
- recharts
- sha-256
- sqlite
- svg
- tailwindcss
- typescript
- vitest
- web-crypto-api
Log in or sign up for Devpost to join the conversation.