{"id":51295430,"url":"https://github.com/mrshoeshoe66/elementary-db","last_synced_at":"2026-06-30T14:01:08.662Z","repository":{"id":56714134,"uuid":"484269550","full_name":"MrShoeShoe66/elementary-db","owner":"MrShoeShoe66","description":"A not so basic json database","archived":false,"fork":false,"pushed_at":"2023-10-24T18:14:29.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T00:12:55.235Z","etag":null,"topics":["backup","database","json"],"latest_commit_sha":null,"homepage":"","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/MrShoeShoe66.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,"governance":null}},"created_at":"2022-04-22T02:28:18.000Z","updated_at":"2025-07-30T06:30:56.000Z","dependencies_parsed_at":"2023-01-22T17:45:16.057Z","dependency_job_id":null,"html_url":"https://github.com/MrShoeShoe66/elementary-db","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"75b45b5089fa04238d07538ca1efc76ce40178da"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/MrShoeShoe66/elementary-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoeShoe66%2Felementary-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoeShoe66%2Felementary-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoeShoe66%2Felementary-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoeShoe66%2Felementary-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrShoeShoe66","download_url":"https://codeload.github.com/MrShoeShoe66/elementary-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrShoeShoe66%2Felementary-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34969682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["backup","database","json"],"created_at":"2026-06-30T14:01:07.618Z","updated_at":"2026-06-30T14:01:08.648Z","avatar_url":"https://github.com/MrShoeShoe66.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elementary-db, A not so basic json database\n\nA not so baisc json database system for Node.js including a method for Encryption, and a system for a Remote Database using a simple key and value pair system with an easy to use functionality for the end user and developer\n\nDeveloped By [MrShoe_](https://github.com/MrShoeShoe66/)\n\nVERSION: v3.1.4\n\n# Install\n\nuse this command to install\n\n```shell\nnpm install elementary-db\n```\n\n# Usage\n\n## Setup\n\nTo setup use the following\n\n```js\nconst Database = require('elementary-db');\nconst db = new Database('database');\n```\n\nOr you can do this\n\n```js\nconst Database = require('elementary-db');\nconst db = Database.init('database');\n```\n\nAnd note use this to init a database that suports old files\n\n```js\nconst Database = require('elementary-db');\nconst db = new Database('database', {\n  \"useOld\": true\n});\n```\n\n## Config\n\nTo set any config use the `.configure` function\n\n### Example\n\nSet autosave to false use this command\n\n```js\ndb.configure('autosave', false)\n```\n\n### All Config Settings\n\n - AutoSave\n   - Save a project to disk after evey change\n   - Value Type: True/False\n   - Default Value: True\n   - Setting value: 'autosave'\n - DontSave\n   - Disable The ability to save to the drive, only load a file but dont save to it\n   - Value Type: True/False\n   - Default Value: False\n   - Setting value: 'dontsave'\n\nInfo about data encryption is found at line 163\n\n#### Get Current Config\n\n```js\ndb.getConfig(\"Config-Value\")\n```\n\n**NOTE**: More configuration will be avalible in a latter update! Check back soon!\n\n## Usage\n\n### Get data\n\nto grab data use the `.get` function\n\n```js\ndb.get(key)\n```\n\n### Set data\n\nUse `.set` to set data\n\n```js\ndb.set(key, value)\n```\n\n### Delete data\n\nTo delete data use `.del`\n\n```js\ndb.del(key)\n```\n\n### Get keys\n\nTo grab the keys use this\n\n```js\ndb.keys()\n```\n\n### Has data\n\nTo check if a key use `.has`\n\n```js\ndb.has(key)\n```\n\n### Save to disk\n\nTo save the data to the json source use `.save`\n\n```js\ndb.save()\n```\n\n**NOTE**: You don't need to use this command unless you set 'autosave' to false\n\n### Get or set all data\n\nTo get all data use `.getAll`\n\n```js\ndb.getAll()\n```\n\nTo setall data use `.setAll`\n\n```js\ndb.setAll(newJsonData)\n```\n\n## Convert from .json to .edb\n\nuse this function to convert a .json file to the newest version of an .edb version\n\n```js\nDatabase.convertToNew('file.json')\n```\n\nthen in your database just input the name, \"file\"\n\n# Array \n\nUnfortunetly We are no longer suporting the array database format, sorry for the inconvenionce to those using this format, we have provided a aternative method for similar results bellow this message\n\n```js\nconst Backup = new Database('database')\nif (Backup.has('data')) {\n   const array = Backup.get('data')\n} else {\n   Backup.set('data', [])\n   const array = Backup.get('data')\n}\n```\n\nAgain, sorry for the inconvenience. \n\n# Encryption\n\nTo inetalise a encrypted database use this using this to setup the database object\n\n```js\nconst Database = require('elementary-db');\nconst db = new Database('database', {\n  \"encrypted\": true,\n  \"encryptedKey\": 'encryption key'\n});\n```\n\nThen the database will work like normal, now the database just has an extra layer of protection\n\nAnd as a side note, we HIGHLY recomend you turn off autosave if you have this enabled, it is on by default but the automatic saving to the disk can slow down other processes \n\n### IMPORTANT NOTE:\n\nThe key MUST be at least 256 bits long or 32 charicters long as a minimum, but if you are very worryed about your user data and or procecsing time, we would recomend you encrypt and decrypt your own private data or use both for an extra player of protection\n\nExample code: ;wch)xTdO0!@Ccv6mxwC8r3cyJmvV-x}\n\nCodes can also not contain the charicter \"\\\" or \"/\"\n\n# Remote\n\nIMPORTANT NOTICE: The remote feture is a beta feture and is still in development, so some parts may be broken and not work on ocations, to report any bugs, got to the github isuse tab, [HERE](https://github.com/MrShoeShoe66/elementary-db/issues) or send an email to [mrshoeshoe66@gmail.com](mailto:mrshoeshoe66@gmail.com)\n\n## Usage\n\n### Client\n\nHere is how to create a connection to a server\n\n```js\nconst Database = require('elementary-db')\n\nconst server = new Database.remote('\u003cSERVER-IP\u003e', { Settings })\n```\n\nThen after that the database works almost the same, the only change is that all the all the functions are now asynchronous and will have a small delay in the value return as it needs to return a promies object to allow time for the request to be sent to the server\n\n#### Settings\n\nThe settingns is used to dictate if the server is secured or not\n\nExample:\n\n```js\nconst Database = require('elementary-db')\n\nconst server = new Database.remote('\u003cSERVER-IP\u003e', { secure: true })\n```\n\nAnd as a note, it's considered secured here when its through https trafic instead of http trafic, and it can either be secured through the package itself or through another routeing softwhere! Just thought I should clarify \n\n##### Settings Options\n\n - secure\n  - Is the server run with https?\n  - Values:\n    - true/false\n - password\n  - Password for database\n  - Simple text value\n\n### Server \n\nCreating a server is the easy part, here is how you do it\n\n```js\nconst Database = require('elementary-db')\n\nconst server = new Database.remote.server({ settings })\n```\n\nAnd to start the server simply use this command\n\n```js\nserver.start()\n```\n\nBut make sure to initiate the server with this first\n\n```js\nserver.createServer()\n```\n\nAfter the server starts an output similar to this\n\n```shell\nelementary-db database server running at ip of: 127.0.0.1\n```\n\nand the ip is used to connect to the server from the client\n\n#### Settings\n\nCurrently, the only availible setting is a password, herw is how yout set it up\n\n```js\nconst server = new Database.remote.server({\n  password: 'Password'\n})\n```\n\n#### Make it secure!\n\nI would recomend forwarding it through Nginx, but if you would rather do it through the package, use this instead:\n\n```js\nserver.createServerSecure( keyfilepath, certfilepath )\n```\n\nwhere to 2 inputs are the path to the certifacate files\n\n### Errors \u0026 Logs\n\nIf there is an error, details wil apear in the edblogs.txt file, client and server side\n\nbut on the server if anything happens, like a connection from a client or an error, it will also show up in the edblogs.txt file with timestamps of when it happened","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrshoeshoe66%2Felementary-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrshoeshoe66%2Felementary-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrshoeshoe66%2Felementary-db/lists"}