A single-page web app of the classic childhood paper-and-pencil fortune-telling game that predicts romantic compatibility. Type your name, type your crush's name, and let FLAMES decide your fate.
F — Friends · L — Lovers · A — Anger · M — Marriage · E — Enemies · S — Sweethearts
- Enter your name — big serif input, press Enter or tap Next
- Enter your crush's name — same deal
- Letter crossing — matching letters get crossed out with a staggered animation, remaining count is revealed
- FLAMES countdown — a pointer hops through F-L-A-M-E-S, eliminating letters one by one based on the remaining count
- Result reveal — card-style reveal with emoji, meaning, and your names. Save or share the result as an image
- Vanilla JS (no framework)
- Vite for bundling
- GitHub Pages for deployment
- Google Fonts (Playfair Display + Inter)
flames/
index.html # entry point, SEO meta tags, fonts
vite.config.js # GitHub Pages base path
src/
main.js # step manager wiring + imports
style.css # CSS variables, reset, base layout
lib/
step-manager.js # state machine for step transitions
flames-algorithm.js # pure game logic (no DOM)
steps/
name-input.js / .css # step 1 & 2: name entry
letter-crossing.js / .css # step 3: cross out matching letters
flames-countdown.js / .css # step 4: pointer eliminates FLAMES letters
result-reveal.js / .css # step 5: card result + save/share + play again
public/
favicon.svg # rose "F" favicon
og-image.svg # social media preview card
.github/
workflows/deploy.yml # GitHub Pages CI/CD
Every step exports a function with this signature:
export function createStepName(container, context, onComplete) {
// container: DOM element to render into
// context: shared object { name1, name2, result, meaning, ... }
// onComplete: call with optional updates, e.g. onComplete({ name1: 'Neil' })
}- Normalize both names to lowercase alpha characters
- For each letter in name1, find the first unmatched match in name2 — mark both as matched
- Count remaining (unmatched) letters from both names
- Starting with
[F, L, A, M, E, S], count tonand eliminate that letter, continuing from the next position - Last letter standing is the result
- Color palette: Dusty rose, lavender, terracotta, sage, gold, mauve on warm cream
- Typography: Playfair Display (serif, headlines) + Inter (sans, body)
- Animations: CSS transitions for crossing/elimination, opacity fades between steps, spring scale on result card
- Responsive:
clamp()typography, flexbox layout, mobile-first
npm install
npm run dev # start dev server
npm run build # production build to dist/
npm run preview # preview production buildPushes to main auto-deploy to GitHub Pages via the workflow in .github/workflows/deploy.yml.