惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
量子位
A
About on SuperTechFans
G
Google Developers Blog
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research

Echo JS

billboard.js 4.1.0: Live resizing, configurable subchart, React subpath & CSP-safe worker From 1,256ms to 96ms: Fixing INP in a Massive React Dropdown GitHub - evoluteur/cymatics: Play a frequency and watch the sand settle into its Chladni figure, computed from the wave equation. Memdeklaro - The Basics of Decentralized Identity (DID) and Self-Sovereign Identity (SSI) How Railmid Works GitHub - evoluteur/platonic-solids: Turn the five Platonic solids in 3D, show their duals, read their measurements, and print the nets to fold your own. Sharing Application State in a URL GitHub - evoluteur/sacred-geometry: Sacred Geometry Generator: draw, tune, and export Vesica Piscis, Seed of Life, Flower of Life, Metatron's Cube, and the Golden Spiral as SVG Best of Self-Sovereign Identity: Digitalcourage, World Passport and Memdeklaro Reads Are Subscriptions - Migrating from Zustand to Coaction GitHub - evoluteur/binaural-beats: Simple web page to play binaural beats for sleep, meditation, relaxation, and focus: Delta, Theta, Alpha, Beta, and Gamma brainwave frequencies, with an optional pink or brown noise bed. toast-queue — Accessible, customizable toast notifications Building a High-Performance Data Grid in React, Vue, and Svelte I built a flight recorder for AI sessions React Authentication With JWT, Zustand, and Axios | JavaScript Tools Blog My idempotency library had one job. A dropped connection made it run the payment twice. "half-open" twice is not the same state: the bug that shaped breakwater 1.0 GitHub - evoluteur/evolutility-server-node: Framework for building REST APIs for CRUD with models rather than code (using Node.js, Express, and PostgreSQL). React Router v8 in Action: Lazy Loading and Nested Routes One $ for every environment | Xec My test suite had 100% coverage. Mutation testing still found real bugs. What JavaScript Obfuscation in the AI Era | JavaScript Tools Blog Using Mongoose Studio with Apache Cassandra via Data API GitHub - trekhleb/yesbrainer: 🧠 A council of AI models for the decisions that aren't no-brainers — they answer in parallel, debate to consensus, or get judged to a verdict. Browser-only, open source, bring your own keys (BYOK), no backend. Node.js has plenty of circuit breakers. So why did I build another one? My Redis library said the write succeeded. Redis was down. GitHub - Techthos/gadget: Prebuilt, interactive HTML widgets for MCP Apps in Go — data tables and forms, self-contained in a single binary, host-themed, spec-compliant. GitHub - evoluteur/react-morph-charts: React component for bubble chart, bar chart, and pie chart, with animated morphing transitions between charts, on hover, and on window resize. Interactive Metaballs Tutorial
The type-safe data layer for Kysely | Kysera
2026-08-03 · via Echo JS

v0.10.0ESM-onlyTypeScript strictNode 22+ · Bun · Deno

Repositories, functional queries, and a plugin core that hardens both — in a toolkit that never hides your SQL. Not an ORM, by design.

Works with PostgreSQL · MySQL · SQLite · MSSQL

const executor = await createExecutor(db, [

rlsPlugin({ schema: rlsSchema }),

softDeletePlugin(),

])

// One plugin core — both patterns

const orm = await createORM(executor, []) // Repository

const ctx = createContext(executor) // Functional DAL

// Filters and policies apply to every query —

// including inside transactions

Not an ORM. A data-access toolkit.

SQL you can still see

Kysera is a thin layer over Kysely, not a replacement for it. Every query is still a Kysely query; every escape hatch stays open — drop to the raw instance or a sql template whenever you need to.

One plugin core, two patterns

Plugins intercept queries at the executor, so the Repository pattern and the functional DAL share the same soft-delete filters and RLS policies — in and out of transactions. Repositories add an atomic audit trail on top. Mix both styles in one codebase (CQRS-lite).

Hardened by default

Row-level security enforces SELECT, UPDATE, and DELETE in SQL. Soft delete narrows mutations to live rows. Opt-outs are scoped per statement — there is no global bypass switch to forget about.

Pick a pattern. Or both.

Structured CRUD where you want conventions, composable functions where you want reach — against the same executor, the same plugins, the same transaction.

Repository

users.repository.ts

import {

createORM, createRepositoryFactory, zodAdapter

} from '@kysera/repository'

const orm = await createORM(executor, [])

const users = orm.createRepository(exec =>

createRepositoryFactory(exec).create({

tableName: 'users',

mapRow: row => row,

schemas: { create: zodAdapter(CreateUser) },

})

)

const user = await users.create({

email: 'ada@example.com',

name: 'Ada',

})

await users.softDelete(user.id) // added by the plugin

await users.findAll() // deleted rows filtered

Functional DAL

users.queries.ts

import {

createQuery, createContext, withTransaction,

type DbContext

} from '@kysera/dal'

const userByEmail = createQuery(

(ctx: DbContext<DB>, email: string) =>

ctx.db

.selectFrom('users')

.selectAll()

.where('email', '=', email)

.executeTakeFirst()

)

const ctx = createContext(executor)

await userByEmail(ctx, 'ada@example.com')

// soft-delete filter applied automatically

await withTransaction(executor, async tx => {

await userByEmail(tx, 'ada@example.com')

}) // plugins survive; nested calls → savepoints

Four plugins. No magic.

Each plugin declares a priority tier and runs in a fixed, inspectable order — security → filters → transforms → audit — no matter how you register them.

Batteries included — separately.

Thirteen focused packages. Install what you use; tree-shake the rest.

0

Third-party runtime deps

3

Runtimes: Node, Bun, Deno

Tested in CI against live PostgreSQL and MySQL on every push; concurrency claims are proven by racing tests. A benchmark suite tracks overhead each release: the executor without plugins measures within noise-to-13% of raw Kysely on the execute path, and a full three-plugin stack costs ~15–20%.

Up and running in a minute

Add the packages to an existing project, or let the CLI scaffold one — config, migrations, and a health check included.

Install

npm install kysely zod

npm install @kysera/executor @kysera/repository @kysera/soft-delete

ESM-only, Node 22+. Zod is optional — bring Valibot or TypeBox instead, or skip validation entirely.

Or scaffold a project

npx @kysera/cli init my-app

npx @kysera/cli doctor

init sets up config and migrations; doctor verifies the whole environment in one shot.

Use

import { Kysely, PostgresDialect } from 'kysely'

import { createExecutor } from '@kysera/executor'

import {

createORM, createRepositoryFactory, zodAdapter

} from '@kysera/repository'

import { softDeletePlugin } from '@kysera/soft-delete'

import { z } from 'zod'

const db = new Kysely<Database>({

dialect: new PostgresDialect({ pool })

})

const executor = await createExecutor(db, [softDeletePlugin()])

const orm = await createORM(executor, [])

const users = orm.createRepository(exec =>

createRepositoryFactory(exec).create({

tableName: 'users',

mapRow: row => row,

schemas: {

create: zodAdapter(

z.object({ email: z.string().email(), name: z.string() })

)

},

})

)

const user = await users.create({ email: 'ada@example.com', name: 'Ada' })

await users.softDelete(user.id)

await users.findAll() // soft-deleted rows are filtered out

Keep your SQL. Gain the toolkit.