tMemory featured image

tMemory

Published on February 16, 2025

Flip pairs, beat the clock, and compare your best runs across terminal and web.

πŸš€ What is tMemory?

tMemory started as a command-line love letter to the classic Memory card game. It blends React, Ink, and a Supabase-backed API so every flip, combo, and photo-finish can land on a shared leaderboard. The experience now spans a polished CLI, a Next.js-powered leaderboard site at https://tmemory.griffen.codes/, and an API that keeps both in sync.

npm version
npm downloads
License

✨ Key Features

  • Core Gameplay β€” Single-player, head-to-head, and AI showdowns with grid sizes from 2Γ—2 up to custom 12Γ—12 layouts.
  • Competitive Edge β€” Global leaderboards track your best times with optional filters by game mode, rows, and columns so you can β€œSee how you stack up against players from all over the world. Filter by game type and board size to find your competition.”
  • Dual Experiences β€” Jump in instantly via npx tmemory or check the web experience for a quick visual leaderboard at https://tmemory.griffen.codes/.
  • Smart Opponent β€” Face an AI rival that remembers the board and forces you to optimize every flip.
  • Custom Boards β€” Design bespoke layouts directly in the CLI to craft practice drills or community challenges.

🎯 Perfect For

  • Speedrunners hunting tighter reaction windows and quicker clears.
  • Terminal fans who want a polished, animated CLI game built with Ink.
  • Friendly competition circles that need a shared leaderboard without spinning up infrastructure.
  • Developers exploring how React can power both terminal interfaces and serverless scoreboards.

⚑ Quick Start

Bash
# Play instantly
npx tmemory

# Or install for repeated play
npm install -g tmemory
tmemory

πŸ“ˆ Impact & Proof

🧱 Technology Stack

  • CLI: React + Ink UI, ink-playing-cards, TypeScript.
  • Backend: Next.js App Router handlers with Zod validation, Supabase/PostgreSQL storage, profanity filtering.
  • Distribution: Published as tmemory on npm with a compiled CLI entry point in dist/cli.js.

Give the CLI a spin, climb the leaderboard, and let me know where you placeβ€”I’m always ready for a rematch.