Skip to main content
Lightning Jar - Web Studio Lightning Jar Wordmark
Technologies

Foldkit

Frontend Framework · Open Source (MIT)

Foldkit is a TypeScript front-end framework built on Effect that follows The Elm Architecture. The whole state of an app is one value, the Model. Everything that happens is a Message, and one pure function, update, turns the current Model and a Message into the next Model plus any side effects to run, which are returned as values and not performed in place.

We are evaluating Foldkit, not adopting it. We built OK Tuner, a free browser instrument tuner, in Foldkit to find out how its architecture suits work where an AI coding agent writes most of the code and a person reviews it. What helped: state changes that are tested without a browser, state unions the compiler checks at every use, resources such as a microphone whose lifetime follows the Model, and a conventions file and DevTools server made for agents.

What it cost: more code than the Svelte component the tuner was ported from, views written as function calls and not markup, a large script for a small app, and two things to learn, of which Effect is the bigger. Foldkit is pre-1.0 and marks its server rendering experimental. SvelteKit remains our default for content sites and for anything that leans on a server.

Visit Foldkit →

How We Use It

  • Client-side tools with real state: devices, streams and multi-step flows
  • Projects where an AI coding agent writes most of the code and behavior has to be checkable in tests
  • Learning The Elm Architecture in TypeScript

Frontend Frameworks

Why this matters: The right framework reduces complexity and improves Core Web Vitals, which translates directly into better UX and SEO outcomes. Frontend frameworks are essential for building interactive and dynamic user interfaces. They provide a structured approach to organizing code, managing state, and handling user interactions. Preferred defaults: SvelteKit for app-first builds; Astro for content-heavy sites; Nuxt when teams prefer Vue.

Ask Eljay

Ask about the studio's work, research, packages, or writing. A few starters:

Answers come from this site's own content and link their sources. For anything that matters, email hello@lightningjar.com.