The Life Weave

The Life Weave — Case Study | Danny Xa
← Back to All Work
AI SaaS · Full-Stack Engineering · Bilingual Product

The Life Weave

A production-grade AI astrology SaaS — 6 Eastern and Western divination systems unified into one reading engine, with live Stripe payments, user auth, admin tooling, and bilingual UX. Built and shipped in 5 months.

TypeAI SaaS Product
TimelineNov 2025 – Apr 2026 (~5 months)
StackNext.js · Supabase · Claude API · Stripe
StatusLive in production · Closed beta
thelifeweave.com
↗ Visit

The Brief

No existing product. No codebase. No team. The goal was to design, build, and ship a production-grade AI SaaS that unifies six Eastern and Western divination systems into a single coherent reading experience — with a working payments layer, user auth, and admin tooling from day one.

Market insight: astrology communities are large, highly engaged, and underserved by AI tools. Most AI in this space produces generic horoscope copy. The Life Weave was positioned as a convergence engine — synthesizing Bát Tự, Tử Vi Đẩu Số, I Ching, Human Design, Numerology, and Western Astrology into one personalized reading.

What Was Built

Product

  • Six divination systems integrated into a unified AI reading engine
  • Anonymous-first funnel — free past validation reading with no login required, then signup-to-save gate
  • 5 feature surfaces: Daily Fortune, Decision Weaver, Compatibility, Full Reading, Settings
  • Destiny Card XP system — gamified user progression with levels, XP, and AI-generated portrait tied to birth data
  • AI portrait generation via fal.ai FLUX Pro 1.1 with fixed seed-per-user for style consistency across sessions
  • Bilingual UX — Vietnamese-first with English toggle

Technical

  • Next.js 16 App Router with TypeScript throughout — no JS fallbacks
  • Supabase — PostgreSQL with row-level security policies across all user tables
  • Claude Sonnet API — custom prompt system with locale-aware token budgeting (VI=3,000 / EN=2,500) to account for Vietnamese diacritic tokenization overhead
  • Stripe live mode — 4 credit packs ($1.99 / $4.99 / $9.99 / $39.99), webhook-verified fulfillment, idempotency-keyed credit deduction
  • Admin dashboard — user management, reading history, transaction log, error monitoring, and operational kill switches
  • Referral system — generate_referral_code + process_referral RPCs, DB-complete
  • PWA-ready — manifest.json, service worker, VAPID push notification infrastructure
The Life Weave app — full interface
The Life Weave — production app interface showing the reading engine and bilingual UX

Key Engineering Decisions

  • All AI routes use Claude Sonnet only — no Haiku fallback in production (quality requirement)
  • Explicit INSERT/UPDATE logic replaced upsert after discovering readings table has no unique constraint on user_id
  • PowerShell + Vietnamese UTF-8: solved diacritic corruption using .mjs Node scripts with line-number-based replacement
  • Scripts use raw.includes() check before replacing — exits with code 1 if anchor not found, preventing silent failures
  • Supabase system_error_logs table used as primary debugging method — more reliable than Vercel MCP build logs for this project

Economics

  • Cost per AI reading: ~$0.02–$0.05
  • Cost per AI portrait: ~$0.03
  • Gross margin potential: ~99%
  • Break-even reads for $20 AI budget: 400–1,000 free readings

What This Demonstrates

Skills Demonstrated

End-to-end ownership of a production software product — product thinking, system design, and full-stack engineering in a single role. Frontend (Next.js, TypeScript), backend (API routes, RPCs), database (schema, RLS, migrations), payments (Stripe), AI integration (Anthropic), and DevOps (Vercel CI/CD) — all built with production discipline: idempotency keys, row-level security, error logging, kill switches, and locale-aware token management. Not just “it works” — but “it holds up.”

Open to Remote
Opportunities

I’m currently available for remote agency roles or contract work in web, SEO, and digital growth. If you need someone who ships fast and measures everything — let’s talk.

Send Me an Email →

Need More Customers
From Google?

I work with local businesses that want measurable results — more calls, more bookings, more visibility. Focused on results, not vanity metrics.

Visit 5 Spices Agency →