A fully static web application that catalogs alternative meanings for the acronym LGTM. Generate a random interpretation, browse the full collection, filter by category and rarity, and share individual entries via permanent URLs.
Live at: https://lgtm.airscript.it
LGTM collects hundreds alternative meanings for "LGTM" (Looks Good To Me), organized by:
- Rarity — common, regular, rare, legendary (weighted random generation)
- Category — funny, sarcastic, wholesome, dev, existential, corporate, chaotic
The site is fully static (no server-side rendering, no database). All data lives in data/lgtm.json.
Requires Node.js >= 24 and pnpm >= 10.
pnpm installpnpm dev # Start local dev server at http://localhost:4321
pnpm build # Build static output to ./dist
pnpm preview # Serve the built output locally| Route | Description |
|---|---|
/ |
Homepage with weighted-random generator island |
/random |
Static redirect page — picks a random entry client-side and immediately navigates |
/browse |
Full catalog with keyword search, category/rarity filter, and sort |
/lgtm/[id] |
Detail page for a single entry, shareable URL |
/categories |
Grid of all categories with sample entries |
/categories/[category] |
All entries within a single category |
The navbar includes a 3-state theme toggle: system (default) → light → dark → system.
- Default follows the OS
prefers-color-schememedia query - The selected mode is persisted to
localStorageunder the keylgtm-theme - A no-flash inline script in
<head>reads the stored value and setsdata-themeon<html>before CSS paints, preventing a flash of the wrong theme on reload
Uses Vitest with React Testing Library and jsdom.
pnpm test # Run tests once
pnpm test:watch # Run tests in watch modeTest files live in src/test/ and cover:
lgtm.test.ts— data loader functions and constantsrandom.test.ts— weighted random selection logicThemeSwitcher.test.tsx— 3-state cycle, localStorage persistence, aria labelsRandomGenerator.test.tsx— rendering, navigation calls, generate interactionLegendaryEffect.test.tsx— particle component rendering and accessibility attributes
GitHub Actions runs on every push and pull request to main:
- Checkout
- Set up pnpm
- Set up Node.js 24
pnpm install --frozen-lockfilepnpm buildpnpm test
See .github/workflows/ci.yml.
Deployed as a static site on Vercel via the @astrojs/vercel adapter (static output mode). No server functions are used.
To deploy your own fork, connect the repository to a Vercel project. No environment variables are required.
- Fork the repository
- Add new entries to
data/lgtm.jsonfollowing the existing schema (numericid,acronym: "LGTM",meaning,category,rarity, optionaldescriptionandtags) - Keep IDs contiguous — the next ID is
max(existing ids) + 1 - Run
pnpm buildandpnpm testbefore opening a pull request