No description
  • TypeScript 89.7%
  • CSS 7.8%
  • HTML 1.1%
  • JavaScript 1%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yani bcfa0ab7ac
Some checks failed
CI / verify (push) Has been cancelled
CI / deploy (push) Has been cancelled
Commit 3D redesign (scene/panels/HUD) and align e2e specs
The 3D-redesign work lived only in the working tree. This captures the
new scene-state/panel-host/scene modules, the rewritten HUD, and the
e2e specs updated to match, so the whole project can be re-published
cleanly to the remote.

Co-Authored-By: Yani <[email protected]>
2026-07-27 04:45:26 -04:00
.github/workflows M17: deploy readiness — GitHub Pages CI + .nojekyll + README deploy docs 2026-07-26 15:33:53 -04:00
public M17: deploy readiness — GitHub Pages CI + .nojekyll + README deploy docs 2026-07-26 15:33:53 -04:00
src Commit 3D redesign (scene/panels/HUD) and align e2e specs 2026-07-27 04:45:26 -04:00
tests Commit 3D redesign (scene/panels/HUD) and align e2e specs 2026-07-27 04:45:26 -04:00
.dockerignore Add Coolify-compatible Docker Compose for static PWA deploy. 2026-07-26 22:52:19 -04:00
.gitignore M0-M2: scaffold + core skeleton + economy engine 2026-07-26 09:47:44 -04:00
docker-compose.yml Add Coolify-compatible Docker Compose for static PWA deploy. 2026-07-26 22:52:19 -04:00
Dockerfile Add Coolify-compatible Docker Compose for static PWA deploy. 2026-07-26 22:52:19 -04:00
index.html Commit 3D redesign (scene/panels/HUD) and align e2e specs 2026-07-27 04:45:26 -04:00
nginx.conf Add Coolify-compatible Docker Compose for static PWA deploy. 2026-07-26 22:52:19 -04:00
package-lock.json M0-M2: scaffold + core skeleton + economy engine 2026-07-26 09:47:44 -04:00
package.json M11: balance sim harness (greedy bot, CI gate) 2026-07-26 11:29:38 -04:00
PLAN.md M0-M2: scaffold + core skeleton + economy engine 2026-07-26 09:47:44 -04:00
playwright.config.ts M0-M2: scaffold + core skeleton + economy engine 2026-07-26 09:47:44 -04:00
README.md M17: deploy readiness — GitHub Pages CI + .nojekyll + README deploy docs 2026-07-26 15:33:53 -04:00
tsconfig.json M0-M2: scaffold + core skeleton + economy engine 2026-07-26 09:47:44 -04:00
vite.config.ts M15: hardening + release 2026-07-26 12:00:46 -04:00

Alley Cat Empire 🐈‍⬛

A zero-cost, cat-themed idle tycoon game for mobile. Plain TypeScript + Vite + Canvas, no backend, no ads, no in-app purchases. Your save lives in your browser; play offline.

Persona: Yani — a chain-smoking alley cat building a neon empire, one dumpster at a time.

Run (dev)

npm install
npm run dev          # vite dev server (mobile viewport via Playwright)

Test

npm run typecheck    # tsc --noEmit (the real gate)
npm test             # vitest unit tests
npm run e2e          # Playwright (mobile-chromium) end-to-end
npm run balance      # greedy-bot balance simulation (CI gate on economy)

Full gate: npm run typecheck && npm test && npm run e2e

Build & deploy

npm run build        # → dist/  (PWA: manifest + service worker + svg icon + .nojekyll)
npm run preview      # serve the built PWA locally

Upload dist/ to any static host (GitHub Pages, Netlify, Cloudflare Pages, a subfolder — base: './' makes it host-path agnostic). It is installable and works offline once loaded.

Zero-cost GitHub Pages: push to main and the included .github/workflows/ci.yml runs the full gate (typecheck + unit + e2e + build) and deploys dist/ to GitHub Pages automatically. Enable Settings → Pages → Source: GitHub Actions on the repo. public/.nojekyll is copied into dist/ so GitHub Pages serves it unmodified.

Features

  • Tap to earn catnip; buy buildings (dumpster → … → empire tower) that produce catnip passively via globalMult.
  • Upgrades with explicit mult multipliers; achievements each grant +1% global mult.
  • Offline earnings: claim capped + decayed catnip on return (welcome-back modal). The cap is a player setting (default 8h, 124h) in Settings.
  • Nine Lives (prestige): burn a life for Karma (floor(sqrt(lifetime/1e6))), resets the run but keeps Karma + achievements. Karma adds +10% per point.
  • Audio: synthesized WebAudio blips (no asset files), mutable.
  • Settings: mute, reduced-motion, offline cap, save export (download) / import (file).
  • Canvas ambience: drifting fireflies + neon pulse (respects reduced-motion).
  • PWA: installable, offline-first service worker.

Architecture

src/
  core/      engine, economy, state, save (versioned, migrates)
  content/   buildings, upgrades, achievements (data-driven)
  ui/        hud (event-delegated), ambience (canvas)
  audio/     sfx (WebAudio synth)
  platform/  storage (localStorage wrapper + MemoryStorage for tests)
  sim/       balance.ts (headless greedy-bot economy check)
public/      manifest.webmanifest, sw.js, icon.svg
tests/       unit/ (vitest) + e2e/ (playwright, mobile-chromium)

Deterministic and testable headless: Engine + MockClock + MemoryStorage run the whole game in Node, which is what the unit/balance/sim suites exercise.

Save format

Versioned JSON in localStorage (alley-cat-empire/save). Export/import round-trips through public/. Malformed imports are rejected (importSave returns null), and a good import is always merged over a fresh base so missing fields are safe.