Cái Gương
A haunting bronze prophecy mirror for your phone: look in, breathe on the glass, wipe the mist with your finger and read the words rising from the smoke. Journal, share cards, rare full-moon prophecies. Camera stays on-device. Free and offline.
Cái Gương (“The Mirror”) is a bronze prophecy mirror on your phone: “Look into the mirror, and I shall give you a prophecy.” You look in, breathe on the glass until it fogs, then wipe the mist with your finger to read a message rising out of the smoke. Free, works offline, no account, open source.
Open Cái Gương · Source on GitHub
Purpose
Online fortune-telling is usually one button and a paragraph. We wanted a small ritual for fun, with the mood of Vietnamese folk tales: a dark shrine, flickering candles, an old bronze mirror that speaks. Look in once a day, read one line, and check a few days later whether it “came true”.
The mirror ritual
- Camera in the mirror: the front camera appears inside the bronze frame, desaturated and rippling like water, with a blood-red ghost that lags a beat behind you. With the camera off you get an obsidian mirror.
- The mirror waits to see you: it only wakes when someone is in front of it (the browser’s face detection when available, otherwise an on-device skin-tone check). When it sees you, it pulses like a portal.
- Five realms: Today, Love, Career, Fortune, Wellbeing. Ask silently or type your question.
- Breathe: hold the button or blow into the mic and mist spreads over the glass.
- Wipe: the mist clears wherever your finger goes. Words appear mirrored, flip around, and each letter drifts up out of the smoke.
The prophecies
- A hand-written corpus in Vietnamese and English, in the voice of an ancient mirror: an invocation, an omen (a golden carp swimming upstream, a pagoda bell tolling thrice…), a realm-specific message, advice, and four lucky signs: colour, number, hour (Rat…Pig), direction. Tens of thousands of combinations per realm.
- The mirror does not lie twice: the same question in the same realm on the same day returns the same prophecy.
- It avoids repeating lines you received recently.
- Full-moon spirit hour: the moon phase is computed from the date. Full-moon nights unlock rare prophecies (the Moon Lady, Cuội under the banyan…) marked ✦.
Journal, streak and share card
- The Book of Prophecies keeps every prophecy with its question and date. Mark Came true? Yes / Not yet, or delete.
- A 🔥 streak counts consecutive days of gazing.
- Export / import backup as a JSON file. No cloud sync.
- A 1080×1350 PNG share card with the mirror, the message and lucky signs, shared straight to social apps or downloaded.
An underworld mood
Everything is drawn with WebGL (three.js): near-black void with slow blood-red and jade smoke, breath fog you can wipe by hand, a ring of Hán-Nôm glyphs orbiting the mirror, rising embers and spirit wisps, plus bloom, chromatic aberration, film grain and vignette. Sound is synthesized on the device: a low drone, wind, chimes and distant whispers. Sound and haptics can be turned off in Settings.
How to use it, step by step
- Open the app on a phone or computer. Use “Add to Home screen” to install it like an app.
- Watch the intro or tap to skip.
- Tap Gaze into the mirror and allow the camera, or choose Obsidian mirror to play without it.
- Look straight into the glass. When the mirror sees you, its rim lights up. After about 8 seconds it carries on even if it cannot see your face clearly.
- Pick a realm: Today, Love, Career, Fortune or Wellbeing.
- Ask silently, or type your question (optional).
- Hold Hold to breathe on the glass until the bar fills, or tap 🌬 and blow gently into the mic.
- Wipe the mist with your finger (or mouse). The more you wipe, the more words appear.
- Read the prophecy and the four lucky signs. It is saved to your journal automatically.
- Tap Create share card for a PNG, or Ask again for another question.
- A few days later, open the 📜 journal and mark Came true?.
Privacy and disclaimer
Privacy: camera frames are processed only on your device, to draw the reflection and check that someone is in front of the mirror. No photo or video is ever uploaded. No accounts, no cloud, no tracking ads. Your journal lives in your browser; to move devices, use Export backup to a JSON file and Import backup on the new one.
For entertainment only: the prophecies are hand-written lines combined by date and question. They are not medical, financial or legal advice. Health and money lines are deliberately gentle and make no claims; one even says “ask a physician, not a mirror”.
Under the hood
- Installable PWA that works offline after the first visit, in Vietnamese and English.
- Vite, three.js with custom GLSL shaders, postprocessing (bloom, chromatic aberration, film grain, vignette), GSAP for the cinematic sequences, WebAudio for sound.
- Adaptive quality that drops effects when the frame rate falls, and respects the OS reduced-motion setting.
- No paid AI APIs, no keys. Source on GitHub.