
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
kinetic-sql
Advanced tools
The Type-Safe, Real-Time SQL Client for Node.js. The "Tailwind" of Database Clients.
Kinetic SQL is a next-gen Node.js client that wraps PostgreSQL, MySQL & SQLite with a developer experience similar to Supabase, but for your own backend.
Kinetic SQL turns your database into a reactive extension of your code.
INSERT, UPDATE, and DELETE events instantly.Express, Fastify, and Vanilla JS, with a dedicated module for seamless NestJS integration out of the box.KineticModule for zero-config integration with NestJS Framework.# For PostgreSQL:
npm install kinetic-sql drizzle-orm postgres
# For MySQL:
npm install kinetic-sql drizzle-orm mysql2 @rodrigogs/mysql-events
# For SQLite (Local Dev / Edge):
npm install kinetic-sql better-sqlite3
import { KineticClient } from 'kinetic-sql';
/* PostgreSQL/MySQL Example */
/* Connects using your DATABASE_URL env var by default */
const db = await KineticClient.create({
type: 'pg', // or 'mysql'
connectionString: process.env.DATABASE_URL,
realtimeEnabled: true
});
/* SQLite Example */
const db = await KineticClient.create({
type: 'sqlite',
filename: './dev.db'
});
Run this command in your terminal. It reads your DB and patches the library automatically.
# PostgreSQL (Default)
npx k-sql gen --connection "postgres://..."
OR
npx k-sql gen --type pg --host localhost --user postgres --db mydb
# MySQL
npx k-sql gen --type mysql --host localhost --user root --db mydb
# SQLite
npx k-sql gen --type sqlite --db ./dev.db
Kinetic SQL exports a native NestJS module for zero-config setup. Using the library in your NestJS app is as simple as:
// app.module.ts
import { Module } from '@nestjs/common';
import { KineticModule } from 'kinetic-sql/nestjs';
@Module({
imports: [KineticModule.forRoot({
type: 'sqlite', // or 'pg' | 'mysql'
filename: './dev.db',
debug: true, // 👈 Enable colorful logs
}),],
})
export class AppModule {}
subscribe method to listen to any changes to the table you want to monitor. In the example below, we listen to changes on the tasks table./* 'tasks' is auto-completed! */
const sub = await db.subscribe('tasks', (event) => {
console.log(event.action); // 'INSERT' | 'UPDATE' | 'DELETE'
console.log(event.data.title); // Typed Reference!
});
// If you want to stop listening to the events, you can simply call:
await sub.unsubscribe();
OR Call stored procedures as native JS methods bridging the gap between your Backend and the Database.Extend SQL with JavaScript: Why write complex SQL logic when you can just write JavaScript? Define a function in your Node.js app and call it inside your SQL queries. 😊
/* Define a function in your app */
client.raw.function('calculate_tax', (price, taxRate) => {
return price * (1 + taxRate);
});
/* Use it directly in SQL! */
const result = client.raw.prepare(`
SELECT
symbol,
price,
calculate_tax(price, 0.18) as final_price
FROM stocks
`).all();
console.log(result);
/* Output: [{ symbol: 'KINETIC-AI', price: 150, final_price: 177 }, ...] */
Call Stored Procedures: Invoke complex database logic without writing raw SQL strings (Using Postgres for the examples below) ✨
/* Calls the 'create_user' stored procedure safely along with auto-completion and type-safety! */
const { data, error } = await client.rpc('create_user', {
username: 'kapil',
role: 'admin'
});
/* Calls the stored procedure 'add_todo' (Auto-completed!) */
const { data, error } = await db.rpc('add_todo',
/* Param names are checked! */
{ title: "Build cool app", user_id: 123 }
);
import { sql, eq } from 'kinetic-sql';
const users = await db.orm
.select()
.from(sql`users`)
.where(eq(sql`id`, 1));
const db = await KineticClient.create({
type: 'pg',
host: 'localhost',
port: 5432,
user: 'postgres',
password: 'password',
database: 'mydb',
realtimeEnabled: true
});
const db = await KineticClient.create({
type: 'mysql',
host: 'localhost',
port: 3306,
user: 'root',
password: 'password',
database: 'mydb',
realtimeEnabled: true // Requires Binary Logging enabled on server
});
const db = await KineticClient.create({
type: 'sqlite',
filename: './dev.db' // Path to your file
});
LISTEN/NOTIFY used)log_bin = ON for Realtime features)better-sqlite3)MIT
FAQs
Zero-config, type-safe Postgres & MySQL client with Realtime subscriptions.
The npm package kinetic-sql receives a total of 31 weekly downloads. As such, kinetic-sql popularity was classified as not popular.
We found that kinetic-sql 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.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.