DEV Community

Cover image for Building Yarrow: an AI I Ching divination SaaS in a few weeks (Next.js + Supabase + Stripe + DeepSeek)
Master Saw
Master Saw

Posted on

Building Yarrow: an AI I Ching divination SaaS in a few weeks (Next.js + Supabase + Stripe + DeepSeek)

Hey πŸ‘‹

Just shipped Yarrow β€” an I Ching ("Book of Changes") divination web app that uses an LLM to write the interpretation.

Live: https://iching.lifefinetuning.com

The flow

  • User types a question
  • 3 coins are tossed 6 times (the casting itself is pure logic, no AI)
  • The resulting King Wen hexagram (1 of 64) is identified, plus any changing-line transformation
  • An LLM steeped in the Wilhelm/Baynes tradition writes the reading
  • Responds in whatever language you asked in (English, Chinese, etc. β€” handled by the model)

Tech stack

  • Next.js 16 + Tailwind 4 + TypeScript on Vercel
  • Supabase (auth + Postgres + magic-link email via Resend)
  • Stripe (monthly $9.99 / annual $79)
  • DeepSeek for the AI (cheap, works well for both English and Chinese)
  • Resend for transactional email
  • PostHog for product analytics + Session Replay

Things I think are interesting

  • The hexagram engine is pure logic, not AI. I encode all 64 hexagrams as binary strings and look up the King Wen number. The AI only writes the interpretation β€” it can never hallucinate a hexagram.
  • Each reading gets a public shareable URL (/r/[id]) with its own dynamically generated OG image (your question + the hexagram visual).
  • Anti-abuse: anonymous quota uses an IP+UA hash (not a cookie), so clearing cookies doesn't reset it. Reading slots are reserved BEFORE the AI call so people can't disconnect mid-stream to skip the count.

Free tier

  • 1 reading per day anonymous
  • 3 per day signed-in
  • Unlimited on subscription

What I'm looking for

  • General UX feedback β€” is the page clear? Does it feel respectful or like fortune-cookie BS?
  • I Ching practitioners β€” does the system prompt feel grounded or shallow?
  • Other devs β€” anything you'd structure differently in the auth/payment/share flow?

Solo builder in Malaysia. Happy to answer technical questions or hear honest criticism. πŸ™

Top comments (0)