Skip to content

Dhruv2mars/block

Repository files navigation

block

TypeGPU-powered grid logo explorer.

Generate high-quality grid marks fast. Regenerate returns curated candidates, not raw random noise.

What It Does

  • Renders an x by x grid (2..64).
  • Generates + scores logo candidates (default 16).
  • Applies best candidate to main stage.
  • Lets you click any candidate to apply.
  • Supports symmetry bias (none, mirror-x, mirror-y, both).
  • Supports quality presets (curated-strict, balanced, exploratory).
  • Theme toggle with system-aware bootstrap, no refresh flash.

Stack

  • Vite + React + TypeScript
  • TypeGPU + WebGPU path (with safe CPU fallback)
  • Vitest + Testing Library + Playwright
  • Tailwind + shadcn primitives (minimal usage)
  • Bun package/runtime workflow

Quick Start

bun install
bun run dev

Open local URL shown by Vite.

Scripts

  • bun run dev start local dev server
  • bun run build typecheck + prod build
  • bun run lint eslint
  • bun run test unit/component tests
  • bun run test:coverage tests + 100% coverage gate
  • bun run test:e2e Playwright e2e

Quality Gates

Current repo gate target:

  • 100% statements
  • 100% branches
  • 100% functions
  • 100% lines

If coverage drops, CI should fail.

UX Notes

  • Slider changes are debounced to keep high-dimension interaction smooth.
  • Stale regenerate calls are ignored to avoid UI lag/churn.
  • Candidate generation uses adaptive search limits for high dimensions.
  • Empty/all-filled marks are filtered out.

Project Layout

  • src/App.tsx app shell + controls + candidate flow
  • src/lib/gpuGridEngine.ts canvas stage render + engine API
  • src/lib/typegpuBatch.ts WebGPU scoring integration path
  • src/lib/patternScoring.ts candidate generation + metrics + scoring
  • src/components/ UI controls (theme toggle + shadcn primitives)
  • e2e/ Playwright specs

Browser Target

  • Chromium with WebGPU enabled (best path).
  • Fallback path exists when WebGPU unavailable.

License

Private/internal unless changed by repo owner.

About

TypeGPU-powered grid logo explorer for curated logo mark generation.

Topics

Resources

Stars

Watchers

Forks

Contributors