{"id":14956929,"url":"https://github.com/dandimrod/pluridb","last_synced_at":"2026-01-20T03:34:29.495Z","repository":{"id":49991880,"uuid":"321908706","full_name":"dandimrod/PluriDB","owner":"dandimrod","description":"A flexible database for the frontend.","archived":false,"fork":false,"pushed_at":"2021-07-14T22:42:21.000Z","size":28432,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T05:13:11.473Z","etag":null,"topics":["indexeddb","indexeddb-wrapper","mongodb","sql"],"latest_commit_sha":null,"homepage":"https://dandimrod.dev/PluriDB","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dandimrod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-16T07:52:08.000Z","updated_at":"2021-06-06T19:14:50.000Z","dependencies_parsed_at":"2022-08-29T22:02:18.781Z","dependency_job_id":null,"html_url":"https://github.com/dandimrod/PluriDB","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandimrod%2FPluriDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandimrod%2FPluriDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandimrod%2FPluriDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dandimrod%2FPluriDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dandimrod","download_url":"https://codeload.github.com/dandimrod/PluriDB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648905,"owners_count":20972943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["indexeddb","indexeddb-wrapper","mongodb","sql"],"created_at":"2024-09-24T13:13:45.151Z","updated_at":"2026-01-20T03:34:29.437Z","avatar_url":"https://github.com/dandimrod.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to PluriDB\n\nA flexible database for the frontend.\n\n## What is PluriDB?\n\nPluriDB is a database capable to adapt to a lot of storage apis used in the frontend, including indexedDB and localstorage. It also uses fallbacks to check what the perfect storage will be for every user.\n\nTo access the database, you can use modules to use the language you are more confortable with, from SQL to MongoDB.\n\n### Main features\n- Compatible with any storage api (Included custom ones)\n- Compatible with many languages to access the database (Included custom ones)\n- Compatible with any datatypes (Included custom ones)\n- Compatible with web workers (Using a different thread will improve the performance of your webpage)\n- Works in both in browser and in node.\n- Works with any framework.\n- UMD and ESModule options available.\n- 0 dependencies.\n- Easy backups and restore from your server.\n\n## Demo\n\nYou can check an [online demo](https://dandimrod.dev/PluriDB/demo/) of how the database works and what different operations you can use on it!\n\n## Installing PluriDB\n\nYou have two different methods to install PluriDB:\n\n### NPM\n\nInstalling PluriDB using NPM is as easy as using the command:\n\n    npm i --save pluridb\n\nYou can also install additional modules by checking the [list](https://dandimrod.dev/PluriDB/docs/#modules).\n\n### CDN\n\nYou can use [https://cdn.jsdelivr.net/npm/pluridb@latest/](https://cdn.jsdelivr.net/npm/pluridb@latest/PluriDB.js) to access the latests builds of PluriDB.\n\nTo use it directly from your page, use:\n\n```html\n    \u003cscript src=\"https://cdn.jsdelivr.net/npm/pluridb@latest/PluriDB.js\"\u003e\u003c/script\u003e\n```\nYou can also add additional modules by checking the [list](https://dandimrod.dev/PluriDB/docs/#modules).\n\n## Quick start guide\n\n### Loading the modules\n\nBefore the instatiation of the database, you should load any of the modules you want to use to the database, since if you instatiate the database before, it won't be able to recognize any new modules.\n\nTo load a module, you can use:\n```js\n    const PluriDB = require('pluridb');\n    const PluriDBModule = require('pluridb-module');\n\n    PluriDB.loadModule(PluriDBModule);\n```\n    \n\nLearn more about modules [here](https://dandimrod.dev/PluriDB/docs/#modules).\n\n### Instatiation of the database\n\nDuring the creation of the instance you will set up the majority of the configuration paramethers the database is going to accept.\n\nYou can set it up like:\n```js\n    db = new PluriDB('demo',{\n        worker: true, // Will it use a webworker or not?\n        api: 'indexdb', // What technology to use\n        fallback: true, // Allows fallback?\n        db:{\n            backup: undefined, // function for backup\n            restore: undefined, // function for restore\n            encrypt: false, // password for encryption\n        }\n    });\n```\nYou can learn more about the options you can set on the database [here](https://dandimrod.dev/PluriDB/docs/#/databaseApi?id=new-pluridbdbname-options).\n\n### Initiate the database\n\nAfter the instatiation of the database, you need to initiate it. This step ensures that all the modules are loading correctly and that the password to the database is correct.\n\nHere we can see how to initiate the database:\n```js\n    db.init((error, result)=\u003e{\n        if(error){\n            console.error(error);\n        }\n        console.log(result);\n    })\n```\nOr as a promise:\n```js\n    db.promise.init().then(console.log).catch(console.error)\n```\nYou can check more information on init and other high level operations of the database [here](https://dandimrod.dev/PluriDB/docs/#/databaseApi?id=dbinitcallback).\n\n### Accessing and modifying the data.\n\nFinally, for interacting with the database you can use a module as the api to interact with the data. You can access the list [here](https://dandimrod.dev/PluriDB/docs/#/modules?id=storage-modules).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandimrod%2Fpluridb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdandimrod%2Fpluridb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdandimrod%2Fpluridb/lists"}