npm install pingdartdb-node

Your Database. Your Rules.

The official PingDartDB Node.js SDK gives you a powerful dynamic query builder that connects directly to your local MySQL or PostgreSQL database — with zero network overhead, encrypted offline key validation, nested table joins, and geospatial search built right in.

MySQL & Postgres
AES-256 Key Encryption
Zero Network Latency
Nested Joins Built-in
What is PingDartDB SDK?

Build apps your way, on your own database.

Unlike cloud database services, PingDartDB Node SDK works directly with your own MySQL or Postgres database running anywhere — localhost, your VPS, or any managed host.

You just install the package, paste in your PingDart SDK key (which validates your licence offline using AES-256 decryption), and start running powerful queries through a clean JSON-based API — no raw SQL, no ORM setup, no migrations needed.

  • No cloud lock-in — your data stays in YOUR database
  • Works on localhost, VPS, AWS RDS, and more
  • Free tier validates fully offline — zero network cost
  • Paid tier adds remote sync & team access
index.js
const PingDartDB = require('pingdartdb-node');

// Your PingDart SDK key
const db = new PingDartDB('pd_YOUR_SDK_KEY_HERE', {
  host: 'localhost',    // or your VPS IP / RDS endpoint
  user: 'root',
  password: 'your_db_password',
  database: 'my_application',
  type: 'mysql'          // or 'postgres'
});

// Connect once at startup
await db.connect();

// Now use the full query builder...
const users = await db.table('users').read({
  conditions: { status: 'active' },
  pagination: { page: 1, limit: 10 }
});

console.log(users.data);
// → [{ id: 1, name: 'Alice', status: 'active' }]

Everything a developer needs.

No setup friction. No boilerplate. Just clean queries from day one.

Zero Latency Queries

Your SDK key is decrypted locally using AES-256. Free tier never touches our servers. Queries go straight from your app to your database.

Intuitive Query Builder

Read, insert, update, delete, and count records using a simple JSON-based API. Supports operators like >, <, !=, BETWEEN, IN, and LIKE.

Deep Nested Joins

Use the 'margedata' engine to join multiple tables recursively — users → orders → order_items — all in one clean query, returned as nested JSON.

Geospatial Range Search

Find nearby records using the Haversine formula. Just pass lat, lng, and radius in km. Perfect for delivery apps, store finders, and ride apps.

Secure Key Validation

Paid tier keys are verified asynchronously in the background on connect(), so your app never blocks. License expiry errors surface gracefully.

MySQL & PostgreSQL

Seamlessly switch between databases without touching your query logic. We translate JSON → SQL for you, handling dialect differences automatically.

Bulk Operations

Insert hundreds of records in one call using bulk insert. All records are batched into a single optimized SQL query for maximum efficiency.

Free Tier Available

Start building immediately with a free SDK key. Free tier is validated completely offline — no network calls, no limits on queries per second.

Clear Documentation

Every method is documented with real code examples, expected responses, and error codes. Visit /doc/sdk for the full interactive guide.

Every operation. One clean API.

No matter what you need to do — read, write, update, delete, or do geospatial queries — the syntax is always the same simple pattern.

queries.js
// Fetch active users with their orders
const results = await db.table('users').read({
  conditions: { status: 'active' },
  search: { name: 'john' },           // LIKE search
  orderBy: 'created_at DESC',
  pagination: { page: 1, limit: 20 },

  // Deep join — fetch related orders
  margedata: [
    {
      target_table: 'orders',
      target_column: 'user_id',
      target_value: 'id',
      target_label: 'user_orders',
      margedata: [                     // Nested join!
        {
          target_table: 'order_items',
          target_column: 'order_id',
          target_value: 'id',
          target_label: 'items'
        }
      ]
    }
  ]
});
console.log(results.data);
// { id: 1, name: 'John', user_orders: [{ id: 101, items: [...] }] }
Response — 200 OK
{
  "success": true,
  "data": [
    { "id": 1, "name": "Alice", "status": "active", "user_orders": [...] }
  ],
  "totalCount": 1,
  "totalPages": 1
}
Step-by-Step Guide

Create your SDK key in 60 seconds.

Follow these steps exactly to generate your key and connect your database.

01

Register or log in to PingDart

Required

Visit pingdart.com and create a free account or log in. You will land on the User Dashboard automatically.

02

Go to Settings → Security

Dashboard

From the top navigation in your dashboard, click Settings. In the settings page, click the Security tab at the top. Scroll down until you see the section titled 'PingDartDB Local SDK Keys'.

03

Click 'Create SDK Key'

One Click

Press the green 'Create SDK Key' button. A modal will appear asking for an App Name (e.g. 'My Node App') and the tier — choose Free for local offline use, or Pro for remote database sync.

04

Copy your pd_... key

Important

Your key will be shown once and looks like: pd_AbcXyz123....encryptedPayload. Copy it immediately and store it in your .env file as PINGDART_SDK_KEY. Never commit it to git!

.env / index.js
PINGDART_SDK_KEY=pd_YourKeyHere
05

Install and connect

Final Step

Run the install command and initialize the SDK in your project using the key from your .env file.

.env / index.js
npm install pingdartdb-node

const db = new PingDartDB(process.env.PINGDART_SDK_KEY, {
  host: 'localhost', user: 'root',
  password: 'pass', database: 'mydb',
  type: 'mysql'
});
await db.connect();

Simple, honest pricing.

Start free. Scale when you need to.

Free Tier
₹0 / forever
  • Fully offline key validation (AES-256)
  • Unlimited local queries
  • MySQL & PostgreSQL support
  • Full query builder (CRUD + Joins + Geo)
  • 1 SDK key per account
Most Popular
Pro Tier
Contact for pricing
  • Everything in Free
  • Remote database sync
  • Team key management
  • Background license verification
  • Priority email support
  • Multiple SDK keys

Common questions.

Does my data go through PingDart's servers?
No. On the free tier, the SDK validates your key entirely locally using AES-256 decryption. Your database queries go directly from your server to your database — PingDart never sees your data.
What databases are supported?
MySQL and PostgreSQL are fully supported. The SDK automatically adjusts quoting characters and query syntax (e.g. backticks vs double-quotes) based on your db type.
What does the pd_ key look like?
Your SDK key starts with 'pd_' followed by an encrypted payload string. It looks like: pd_AbcXyz...EncryptedData. Keep it in your .env file and never commit it to git.
Can I use this in production?
Yes. The SDK is designed for production workloads. The free tier has no query limits. For high-availability setups with remote sync, consider the Pro tier.
How do I renew an expired key?
Log into your PingDart dashboard → Settings → Security, then delete the old key and create a new one. The new key will include a fresh expiry date.

Your database queries.
Done the smart way.

Join developers who use PingDartDB to build faster, query smarter, and never write raw SQL again.