Skip to content
System One

trungdq88/jev-tetris

Two AI models play real-time Tetris against each other: Jev faces Claude Haiku, Gemini Flash, or an open-weight typed-decision model, with the same piece sequence and clock for both sides.

Jev vs Claude Haiku, versus mode
Image from github.com

trungdq88/jev-tetris on GitHub

Stars
14
Forks
5
Language
JavaScript
Last push
21 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

// Shared proxy logic: forwards one request to the TypeSafe API with the key
// the visitor supplied. Used by server.mjs (local) and api/*.js (Vercel).

export const TYPESAFE_BASE = process.env.TYPESAFE_API_BASE || "https://api.typesafe.ai";
// Optional host-provided fallback key; leave unset for a public deployment.
export const SERVER_KEY = process.env.TYPESAFE_API_KEY || "";
export const UPSTREAM_TIMEOUT_MS = 30_000;

export function keyFromAuthorization(header) {
  const match = /^Bearer\s+(.+)$/i.exec((header || "").trim());
  const key = match ? match[1].trim() : "";
  return key || SERVER_KEY;
}

// Returns { status, headers, body } ready to be written to the client.

View in lib/typesafe.mjs

Open on GitHub

More like this

Use cases this is tagged with