Skip to content

Instantly share code, notes, and snippets.

View furic's full-sized avatar
🎮
Developing game with Pixi.js and Svelte

Richard Fu furic

🎮
Developing game with Pixi.js and Svelte
View GitHub Profile

Repository Pattern & Read/Write Separation for Zoo Service — Analysis

Context

Alex suggested introducing the repository pattern and clearer read/write transaction separation for the Zoo backend service. This analysis evaluates the benefits, costs, and whether it's worth doing now vs. later.


Current State of Zoo

JetStream vs Core NATS for Zoo Streams — Analysis

Current State

  • Zoo uses core NATS (createStream) — same as Slide and Crash in production
  • JetStream exists in the codebase but is only used by the balance service for transfer events
  • Infra tooling is ready: jetstream-writer, jetstream-reader, registry, AsyncAPI contracts

What JetStream Adds

@furic
furic / MIGRATION.md
Created March 24, 2026 03:05
Zoo service migration analysis (SSE/WS vs GraphQL subscriptions)

Zoo: GraphQL → HTTP Migration Analysis

Current Architecture

Zoo uses the multiplayer microservice pattern (same as Crash/Slide):

Frontend
  ↓ GraphQL Mutation/Query
Backend GraphQL Resolver
@furic
furic / SKILL.md
Created March 16, 2026 15:37
Two-pass difference matting: extract transparent alpha from AI-generated images using white/black background pairs. Based on technique by Julien De Luca (https://jidefr.medium.com/generating-transparent-background-images-with-nano-banana-pro-2-1866c88a33c5)
name extract-alpha
description Remove background from AI-generated images using two-pass difference matting. Use when the user has white/black background image pairs that need transparent backgrounds.
argument-hint [name] [textures_dir] [output_dir]

Two-Pass Difference Matting

Extract transparent alpha from AI-generated images that lack transparency support.

@furic
furic / unmask-city-scores.json
Last active February 16, 2026 23:05
Unmask the City Scores
[
{
"score": 22837,
"time": 81.17619854561958,
"explored": 100,
"fragments": 10,
"difficulty": "hard",
"date": "2026-02-04T13:30:00.353Z"
},
{

Svelte Lazy Loading Components: Svelte 4 vs Svelte 5 (Runes)

Description

This gist demonstrates how to lazy load Svelte components using dynamic imports, comparing the syntax between Svelte 4 and Svelte 5 (runes mode). Lazy loading is a powerful technique to optimize bundle size and improve performance by loading components only when needed (e.g., widgets, modals, or rarely-used UI).


Svelte 4 Syntax