
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
[](https://deploy.workers.cloudflare.com/?url=https://github.com/acoyfellow/jotdb)
A lightweight, schema-less database built on Cloudflare Durable Objects. Think of it as Firestore's security rules, but with Zod validation built-in. Perfect for both internal and external APIs, with automatic type safety and validation.
Cloudflare Products: JotDB works with any Cloudflare product that supports Durable Objects:
- Cloudflare Workers
- Cloudflare Pages (with Functions)
- Cloudflare Workflows
- Cloudflare Queues
- Cloudflare Cron Triggers
JotDB combines the best of both worlds: the simplicity of NoSQL with the safety of schema validation. Here's what makes it special:
Perfect for:
JotDB uses Cloudflare Durable Objects under the hood, which means you can organize your data in several ways:
Global Store: Use a single instance for your entire application
const db = env.JOTDB.get(env.JOTDB.idFromName("global"));
Per-User Store: Create a separate instance for each user
const userDb = env.JOTDB.get(env.JOTDB.idFromName(`user:${userId}`));
Per-Event Store: Create temporary stores for events or sessions
const eventDb = env.JOTDB.get(env.JOTDB.idFromName(`event:${eventId}`));
Each instance is isolated and can have its own schema and options. This follows the Actor Model pattern, where each instance is an independent actor that manages its own state.
# Using npm
npm install jotdb
# Using yarn
yarn add jotdb
# Using pnpm
pnpm add jotdb
{
"durable_objects": {
"bindings": [
{
"name": "JOTDB",
"class_name": "JotDB"
}
]
}
}
import { JotDB } from 'jotdb';
export interface Env {
JOTDB: DurableObjectNamespace;
}
export default {
async fetch(request: Request, env: Env) {
// Initialize the database
const jotId = env.JOTDB.idFromName("my-db");
const db = env.JOTDB.get(jotId);
// Example operations
await db.set("user:123", { name: "John", age: 30 });
const user = await db.get("user:123");
await db.delete("user:123");
// Return the result
return new Response(JSON.stringify({ user }), {
headers: { 'Content-Type': 'application/json' }
});
}
};
| Method | Description | Parameters | Returns |
|---|---|---|---|
set(key, value) | Store a value | key: string, value: any | Promise<void> |
get(key) | Retrieve a value | key: string | Promise<any> |
delete(key) | Remove a value | key: string | Promise<void> |
clear() | Remove all values | none | Promise<void> |
keys() | Get all keys | none | Promise<string[]> |
has(key) | Check if key exists | key: string | Promise<boolean> |
getAll() | Get all data | none | Promise<Record<string, unknown> | unknown[]> |
setAll(objOrArr) | Set all data at once | objOrArr: Record<string, unknown> | unknown[] | Promise<void> |
push(item) | Add item to array | item: unknown | Promise<void> |
getSchema() | Get current schema | none | Promise<SchemaDefinition> |
setSchema(schema) | Set data schema | schema: SchemaDefinition | Promise<void> |
getOptions() | Get current options | none | Promise<JotDBOptions> |
setOptions(opts) | Set database options | opts: Partial<JotDBOptions> | Promise<void> |
getAuditLog() | Get audit log entries | none | Promise<AuditLogEntry[]> |
clearAuditLog() | Clear audit log | none | Promise<void> |
interface JotDBOptions {
autoStrip: boolean; // Automatically strip unknown fields
readOnly: boolean; // Enable read-only mode
}
type SchemaType = "string" | "number" | "boolean" | "email" | "array" | "object" | "any";
MIT License - feel free to use this in your own projects!
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Currently, testing is done manually in production. We're working on adding a comprehensive test suite. For now, you can test the functionality by:
FAQs
[](https://deploy.workers.cloudflare.com/?url=https://github.com/acoyfellow/jotdb)
The npm package jotdb receives a total of 2 weekly downloads. As such, jotdb popularity was classified as not popular.
We found that jotdb 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.