Base Endpoint URL:https://db.nafij.me/api/v1
Add storage to any Vercel project in 2 minutes
nrdb_live_xxxxxxxxx).NAFIJ_DB_KEY=nrdb_live_xxxxxxxxxxxxxxxxxxxxxxxxLightweight client for Next.js, Node.js, and Edge runtimes
npm install @nafij/dbimport { NafijDB } from "@nafij/db";
// Automatically uses process.env.NAFIJ_DB_KEY
const db = new NafijDB();
// --- 1. QUICK STORAGE ---
await db.quick.set("theme", "dark");
const theme = await db.quick.get("theme");
await db.quick.delete("theme");
// --- 2. COLLECTION API ---
const users = db.collection("users");
// Insert document
const user = await users.insert({
name: "Nafij",
email: "hello@example.com"
});
// Query documents
const result = await users.find({ limit: 50 });
// Find by ID
const doc = await users.findOne(user.id);
// Update document
await users.update(user.id, { name: "Nafij Rahaman" });
// Delete document
await users.delete(user.id);Public endpoints for status checking
Returns service version and platform status.
Pings MongoDB cluster and reports health status.
High-speed key-value JSON operations
Retrieve a stored JSON value by key name. Requires Authorization: Bearer <NAFIJ_DB_KEY>
Store or overwrite a JSON value. Body: { "value": { ... } } or raw JSON object.
Deletes the key-value record from Quick Storage.
Full MongoDB document CRUD endpoints
Query documents. Supports query parameters: ?page=1&limit=50&sort=createdAt&order=desc
Insert a new document into the specified collection.
Partially update an existing document by its ID.
Delete a document by ID.
Deterministic response schema
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or revoked API key."
}
}Default rate limit quota is 300 requests per minute per API key token. Responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.