
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
Documentation · Manifesto · Examples · Getting Started · Discord
Foldkit is a TypeScript frontend framework built on Effect. It gives your entire application one architecture: a Schema-defined Model as the single source of truth, fact-named Messages, an exhaustive update function, and explicit Commands for side effects. Routing, server rendering, UI components, Submodels, and browser lifecycles all use that same Model and Message flow.
Foldkit uses The Elm Architecture instead of component-owned state and hook lifecycles. That discipline is a real commitment. Foldkit works best when the team wants shared conventions across the application and is ready to build on Effect throughout. If your backend already uses Effect, Foldkit carries the same tools and patterns into the browser: Schema, services, Streams, and scoped resources.
A Foldkit program can own the whole page or run as a widget inside an existing application, React included, through Runtime.embed. The same program can render on the server at build time or per request, then hydrate in place. Coming from React? Start here, or compare the same pixel-art editor built in both frameworks.
[!NOTE] Foldkit is in beta and under active development. The core API is stable, but breaking changes may occur in minor releases. See the changelog for details.
create-foldkit-app scaffolds a complete setup with Tailwind, TypeScript, Oxlint, Prettier, and the Vite plugin for state-preserving HMR. Pick a rendering mode (browser-only SPA, static generation, or server rendering) and, for a SPA, the example to start from.
npx create-foldkit-app@latest
A complete Foldkit program. State lives in a single Model, events become Messages, and a pure function handles every transition. main.ts defines the program and entry.ts boots the Runtime, so main.ts stays importable from tests without booting a Runtime as a side effect.
// src/main.ts
import { Match as M, Schema as S } from 'effect'
import { Command, Runtime } from 'foldkit'
import { Document, HtmlBuilder } from 'foldkit/html'
import { m } from 'foldkit/message'
import { evo } from 'foldkit/struct'
// MODEL
export const Model = S.Struct({ count: S.Number })
export type Model = typeof Model.Type
// MESSAGE
const ClickedDecrement = m('ClickedDecrement')
const ClickedIncrement = m('ClickedIncrement')
const ClickedReset = m('ClickedReset')
export const Message = S.Union([
ClickedDecrement,
ClickedIncrement,
ClickedReset,
])
export type Message = typeof Message.Type
// UPDATE
export const update = (
model: Model,
message: Message,
): readonly [Model, ReadonlyArray<Command.Command<Message>>] =>
M.value(message).pipe(
M.withReturnType<
readonly [Model, ReadonlyArray<Command.Command<Message>>]
>(),
M.tagsExhaustive({
ClickedDecrement: () => [evo(model, { count: count => count - 1 }), []],
ClickedIncrement: () => [evo(model, { count: count => count + 1 }), []],
ClickedReset: () => [evo(model, { count: () => 0 }), []],
}),
)
// INIT
export const init: Runtime.ApplicationInit<Model, Message> = () => [
{ count: 0 },
[],
]
// VIEW
export const view = (model: Model, h: HtmlBuilder<Message>): Document => ({
title: `Counter: ${model.count}`,
body: h.div(
[],
[
h.p([], [model.count.toString()]),
h.button([h.OnClick(ClickedDecrement())], ['-']),
h.button([h.OnClick(ClickedReset())], ['Reset']),
h.button([h.OnClick(ClickedIncrement())], ['+']),
],
),
})
// src/entry.ts
import { Runtime } from 'foldkit'
import { Model, init, update, view } from './main'
const application = Runtime.makeApplication({
Model,
init,
update,
view,
container: document.getElementById('root'),
})
Runtime.run(application)
Source: examples/counter.
Routing, server rendering, UI components, composition, and browser lifecycles all use the same Model and Message flow. The pieces below ship as one system and are documented in depth at foldkit.dev.
Got* envelope.Runtime.embed.@foldkit/ui package.Every feature has the same visible structure: a Schema-defined Model, fact-named Messages, exhaustive update, and explicit Commands. AI-generated changes follow code paths a person can inspect and test. Foldkit DevTools and its MCP server expose the same Model and Message history while the application runs.
Some of what you can build with Foldkit. See all example apps on foldkit.dev.
MIT
FAQs
A TypeScript frontend framework, built on Effect and architected like Elm
The npm package foldkit receives a total of 9,385 weekly downloads. As such, foldkit popularity was classified as popular.
We found that foldkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.