{PuruVijay}.svelte

{PuruVijay}.svelte

@puruvj.dev

compressionist, performance freak. @sveltejs team. 9 years experience. Thrice Conference Speaker ex-@stackblitz. ❤️🎸 Hans Zimmer. CodeFu: https://github.com/puruvj

1.7K followers419 following484 posts

Pinned

🚀 Introducing aibind — AI SDK bindings for every JS framework ⚡ Reactive streaming 🌿 Branching chat history 🤖 Agents & tool calling 🔄 Model switching & racing 📝 Streaming markdown 💾 Durable streams SvelteKit · Next.js · Nuxt · SolidStart · TanStack · React Router

{PuruVijay}.svelte reposted

ogygia — SSR islands for SvelteKit. Plus lakes. No Kit patches. csr=false. Mark the interactive bits; the rest stays server HTML. Runtime ≈ 7.6 KB min+brotli (CE + optional SPA router). 🏝️ Client islands · 🛰️ Server islands · 🌊 Lakes · 🔌 Remotes & forms · 🧭 SPA router ogygia.puruvj.dev

{PuruVijay}.svelte reposted

🏝️ Island fever in the land of Svelte! @puruvjdev has made a brand new SvelteKit library that allows you to use islands. Check it out below!

ogygia — SSR islands for SvelteKit. Plus lakes. No Kit patches. csr=false. Mark the interactive bits; the rest stays server HTML. Runtime ≈ 7.6 KB min+brotli (CE + optional SPA router). 🏝️ Client islands · 🛰️ Server islands · 🌊 Lakes · 🔌 Remotes & forms · 🧭 SPA router ogygia.puruvj.dev

ogygia — SSR islands for SvelteKit. Plus lakes. No Kit patches. csr=false. Mark the interactive bits; the rest stays server HTML. Runtime ≈ 7.6 KB min+brotli (CE + optional SPA router). 🏝️ Client islands · 🛰️ Server islands · 🌊 Lakes · 🔌 Remotes & forms · 🧭 SPA router ogygia.puruvj.dev

View full thread

Also: • Lazy chunk after click → host island + plain await import() • Dynamic import + hydrate = build error (SSR needs a static shell) • csr=false HMR; FOUC bag so SPA swaps don’t blank CSS

ogygia — SSR islands for SvelteKit. Plus lakes. No Kit patches. csr=false. Mark the interactive bits; the rest stays server HTML. Runtime ≈ 7.6 KB min+brotli (CE + optional SPA router). 🏝️ Client islands · 🛰️ Server islands · 🌊 Lakes · 🔌 Remotes & forms · 🧭 SPA router ogygia.puruvj.dev

View full thread

🔌 Data stays Kit • +page.server props → islands (devalue) • classic form actions — zero JS • remotes: query, command, query.live, query.batch, form() Real Kit wire codec — not a reimplementation.

🧭 <OgygiaRouter /> SPA body swap + head merge. View Transitions on. $app/navigation still works. • data-ogygia-persist — chrome survives swaps • Kit-style link prefetch • Adopt one route at a time next to Kit pages

ogygia — SSR islands for SvelteKit. Plus lakes. No Kit patches. csr=false. Mark the interactive bits; the rest stays server HTML. Runtime ≈ 7.6 KB min+brotli (CE + optional SPA router). 🏝️ Client islands · 🛰️ Server islands · 🌊 Lakes · 🔌 Remotes & forms · 🧭 SPA router ogygia.puruvj.dev

View full thread

🛰️ Server islands defer = fallback HTML, then a signed fetch for real markup. Component JS never ships. Same schedules: load (w/ preload), idle, visible, media. Cookie-aware — the hole sees a real request.

🌊 Lakes hydrate: 'none' freezes a subtree inside an island. Markup stays; that subtree’s JS never ships. Remount: cache, empty, or SWR. An island inside a lake wakes up again.

ogygia — SSR islands for SvelteKit. Plus lakes. No Kit patches. csr=false. Mark the interactive bits; the rest stays server HTML. Runtime ≈ 7.6 KB min+brotli (CE + optional SPA router). 🏝️ Client islands · 🛰️ Server islands · 🌊 Lakes · 🔌 Remotes & forms · 🧭 SPA router ogygia.puruvj.dev

🏝️ Client islands Static hydrate / preset. JS when you say so: • load — on connect • idle — requestIdleCallback • visible — IntersectionObserver • media — e.g. mobile-only drawers Props via devalue. Nesting works.

Read somewhere about Council feature in Claude code. Couldn't find it, so I made it myself! Sith claude, but for composer 2.5. How? Prompted Claude code to make a skill of council, with multiple subagents being actors, pursuing the idea in multiple different directions, with one judge to guide...

..them all. Ofc, you can't test a skill. Or can you...? I told claude code to write a test of kind of workflows I usually do: perf audits, re-architecture, simplification, LCP test etc, it wrote actual bunch of tests. 78 in total. It runs them all, using cursor's CLI, then a judge Claude Opus...

neotraverse v1 is out. 🚀 5 million downloads a week. Zero dependencies. And the biggest release in its history. ~50 tree-shakeable helpers, ~5x faster than traverse, an adversarial security audit gated in CI, and a new core that walks 200,000-deep JSON without crashing. 🧵 neotraverse.puruvj.dev

View full thread

Object walkers are the classic home of prototype pollution, so I ran an adversarial audit (the kind where "looks safe" means keep digging). Found and fixed a JSON __proto__ injection AND a boxed-key bypass. Every finding has a regression test, gated in CI.

neotraverse v1 is out. 🚀 5 million downloads a week. Zero dependencies. And the biggest release in its history. ~50 tree-shakeable helpers, ~5x faster than traverse, an adversarial security audit gated in CI, and a new core that walks 200,000-deep JSON without crashing. 🧵 neotraverse.puruvj.dev

If you last saw neotraverse at 0.6, it was a class: new Traverse(obj).map(...). 1.0 makes the functional API the default: ~50 standalone, tree-shakeable functions. clone, merge, diff/patch, deepEqual, $ref resolution, async. The whole toolbelt is ~5.8KB, and get alone is a rounding error.

Hardening plus a rewrite usually cost performance. This time they bought it. ~4.96x faster than traverse on average. Up to 10x on clone. ~5.5x less memory per op, 6x+ on pure traversal. One context object per node, lazy paths, one write per key.

Re-designing neodrag v3 for an AI-first world, its almost done. And yep, its now DnDnSnR now, not just Drag, or DragnDrop. Highly integrated and composable. Ah and did I mention...CRDT friendly too?

shipped bundle-roast → e18e integration today. every package now gets badged against the community catalog. 🚩 flagged offenders, ✅ endorsed swaps. conflict-of-interest disclosure: yes, neotraverse is in the catalog. yes, i wrote it. yes, that's why i had to ship the chart. bundle-roast.puruvj.dev

🚀 Introducing aibind — AI SDK bindings for every JS framework ⚡ Reactive streaming 🌿 Branching chat history 🤖 Agents & tool calling 🔄 Model switching & racing 📝 Streaming markdown 💾 Durable streams SvelteKit · Next.js · Nuxt · SolidStart · TanStack · React Router

View full thread

You don't want your most expensive model answering "what's 2+2". aibind lets you define named models and route automatically: routeModel: (prompt) => { if (prompt.length < 200) return "fast" if (/explain|analyze/.test(prompt)) return "reason" return "smart" }

🚀 Introducing aibind — AI SDK bindings for every JS framework ⚡ Reactive streaming 🌿 Branching chat history 🤖 Agents & tool calling 🔄 Model switching & racing 📝 Streaming markdown 💾 Durable streams SvelteKit · Next.js · Nuxt · SolidStart · TanStack · React Router

View full thread

Streaming in your framework should feel native. In Svelte: stream.text is a reactive $state In Vue: stream.text is a ref In React: it's just a hook Same API everywhere. No adapters, no wrappers, no fighting the runtime.

Chat history is deceptively hard. Edit a past message? That's a branch. Regenerate? Another branch. aibind ships a full message tree — edit anywhere, branch anywhere, navigate back and forward. Like git, but for conversations.

🚀 Introducing aibind — AI SDK bindings for every JS framework ⚡ Reactive streaming 🌿 Branching chat history 🤖 Agents & tool calling 🔄 Model switching & racing 📝 Streaming markdown 💾 Durable streams SvelteKit · Next.js · Nuxt · SolidStart · TanStack · React Router

Why does this exist? Every time I built an AI feature, I was writing the same plumbing: - wire up the stream - parse chunks into state - handle errors mid-response - manage conversation history - figure out markdown rendering None of that is the actual product. aibind handles all of it.

{PuruVijay}.svelte reposted

I'm looking for opportunities! Full-time/part-time remote roles. Actions speak hella louder than words, so allow me to show you all the work I have done in the last 5 years as a professional developer 🧵1/n