npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

teqverse-nosql-sdk

v1.0.9

Published

A client library for interacting with the Teqverse NoSQL database API, suitable for MVPs.

Readme

teqverse-nosql-sdk

A NoSQL Client Library for the PHP File-Based NoSQL Database API by Teqverse.

This SDK lets you interact with your Teqverse NoSQL instance easily from your JavaScript or Node.js applications, abstracting away manual HTTP calls while enabling you to manage collections, documents, files, and user data seamlessly.


🚀 Features

✅ Register & authenticate users
✅ Create, read, update, soft-delete & permanently delete documents
✅ Collection management
✅ File upload & delete
✅ User data backup, restore & export
✅ Public knowledge base management (admin)
✅ System management & maintenance (admin)


📦 Installation

npm install teqverse-nosql-sdk

or

yarn add teqverse-nosql-sdk

🌱 Basic Usage

1️⃣ Import the SDK

import NoSQLClient from 'teqverse-nosql-sdk';

const client = new NoSQLClient();

2️⃣ Register or Login

// Register a new user
await client.registerUser('username', 'password');

// Login
const loginResponse = await client.loginUser('username', 'password');
console.log(loginResponse);

3️⃣ Create a Collection

await client.createCollection('my_tasks');

4️⃣ Create a Document

const doc = await client.createDocument('my_tasks', { title: 'Buy Groceries', done: false });
console.log(doc);

5️⃣ Read a Document

const data = await client.readDocument('my_tasks', doc.id);
console.log(data);

6️⃣ Update a Document

await client.updateDocument('my_tasks', doc.id, { done: true });

7️⃣ List Documents

const list = await client.listDocuments('my_tasks', { limit: 10, offset: 0 });
console.log(list.documents);

8️⃣ Delete a Document

await client.softDeleteDocument('my_tasks', doc.id);

📂 File Upload Example

const fileInput = document.querySelector('#fileInput');
const file = fileInput.files[0];
const upload = await client.uploadFile(file);
console.log(upload);

🔐 Admin Operations

If your user is an admin (role: 'admin'), you can:

await client.toggleEmergencyMode('enable');
await client.listUsers();
await client.updateUserRole('targetUserId', 'admin');

📊 Backups & Exports

// Create a backup
const backup = await client.backupUserData();

// Download the backup
const response = await client.downloadBackup(backup.backup_file);
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = backup.backup_file;
document.body.appendChild(link);
link.click();
link.remove();

// Export collection to CSV
await client.exportCollection('my_tasks', 'csv');

⚙️ API Reference

The SDK includes the following methods:

  • registerUser(username, password)
  • loginUser(username, password)
  • createCollection(collectionName)
  • deleteCollection(collectionName)
  • createDocument(collectionName, data)
  • readDocument(collectionName, documentId)
  • updateDocument(collectionName, documentId, newData)
  • softDeleteDocument(collectionName, documentId)
  • permanentDeleteDocument(collectionName, documentId)
  • listDocuments(collectionName, options)
  • searchDocuments(collectionName, query, options)
  • uploadFile(file)
  • deleteFile(filename)
  • backupUserData()
  • downloadBackup(filename)
  • restoreUserData(backupFile)
  • cleanupOldBackups(daysToKeep)
  • promoteDocumentToPublic(collectionName, documentId)
  • demoteDocumentFromPublic(documentId)
  • optimizeDbAndCheckIntegrity(dbType)
  • toggleEmergencyMode(mode)
  • listUsers()
  • updateUserRole(targetUserId, newRole)
  • deleteUser(targetUserId)
  • getSystemStatus()
  • exportCollection(collectionName, format, options)

Each method returns a promise and provides clear error messages for straightforward debugging.


❓ FAQ

Q: What is the backend URL used?
A: It uses https://nosql.teqverse.com.ng/ by default.

Q: Can I use this in the browser?
✅ Yes, it supports modern browsers and Node.js environments.

Q: Does it handle authentication automatically?
⚡️ You handle login and store userId in the session if needed. Use client.setAuth(userId, role) to manually set user authentication if needed.


❤️ Contributions

PRs are welcome to extend this SDK for additional methods or enhancements.


📄 License

MIT License.


📢 Need Help?

For backend setup, guides, or issues, contact [email protected] or visit Teqverse.