{"id":15471138,"url":"https://github.com/gpestana/muffler","last_synced_at":"2026-02-17T01:02:30.370Z","repository":{"id":71290255,"uuid":"83211229","full_name":"gpestana/muffler","owner":"gpestana","description":"JSON objects storage for fast prototyping. Sitting on top of Github's gist","archived":false,"fork":false,"pushed_at":"2017-03-09T16:44:59.000Z","size":20,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T03:41:55.101Z","etag":null,"topics":["bootstrapping","database","github-gist","json","json-objects-storage"],"latest_commit_sha":null,"homepage":null,"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/gpestana.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-26T13:40:10.000Z","updated_at":"2020-10-08T11:23:44.000Z","dependencies_parsed_at":"2023-04-29T17:47:03.823Z","dependency_job_id":null,"html_url":"https://github.com/gpestana/muffler","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gpestana/muffler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpestana%2Fmuffler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpestana%2Fmuffler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpestana%2Fmuffler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpestana%2Fmuffler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpestana","download_url":"https://codeload.github.com/gpestana/muffler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpestana%2Fmuffler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29528240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"ssl_error","status_checked_at":"2026-02-17T00:54:25.811Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bootstrapping","database","github-gist","json","json-objects-storage"],"created_at":"2024-10-02T02:10:14.241Z","updated_at":"2026-02-17T01:02:30.358Z","avatar_url":"https://github.com/gpestana.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Muffler.js\n\n#### JSON objects storage for fast prototyping, sitting on top of Github's gist.\n\n![muffler](https://raw.githubusercontent.com/gpestana/muffler/master/muffler.png)\n\nMuffler is the ideal database for prototyping web services which require a \ndocument-based storage. No need for setting up any infra, pay for any service \nnor learn any new technology. Just plug Muffler.js in and start storing and\nretrieving json blobs from/in the clouds.\n\nMuffler.js uses Github's gist to store the data. For now, all the data must be\npublicly available.\n\nIf the data storage requirements are loose enough, Muffler.js can be also used\nin production.\n\n### Features\n- JSON objects storage\n- No backend required\n- HTTPS\n- CRUD API\n  - `create()`\n  - `get()`\n  - `update()`\n  - `delete()`\n- Backend and frontend integration\n\n\n### Get it running\n```\nnpm install muffler\n```\n\n### API\n\n#### databaseIndex(databaseId, cb)\nLists all documents in a database\n\n```javascript\nconst muffler = require('muffler');\n\nmuffler.databaseIndex(\n  'databaseId', (err, res) =\u003e {\n    if(err) return console.log(err);\n    console.log(res);\n});\n```\n\n#### create(databaseId, newDoc, authToken, cb)\nCreates a document in a database\n\n```javascript\nconst muffler = require('muffler');\n\nconst newContent = 'this is the new content';\nconst authToken = ' fa249990930b19bef4949f8af1d36db70a91123'\nmuffler.update(\n  'userAccount', '274bff0b1fb7a8f1f130cf1de266d111', newContent, authToken, \n  (err, res) =\u003e {\n    if(err) return console.log(err);\n    console.log(`New document created with content ${newContent}`);\n});\n```\n\n#### get(databaseId, documentId, cb)\nGets a document from database\n\n```javascript\nconst muffler = require('muffler');\n\nmuffler.get('274bff0b1fb7a8f1f130cf1de266d111', 'document.json', (err, res) =\u003e {\n  if(err) return console.log(err);\n  console.log(res);\n}); \n```\n\n#### update(accountId, objectId, contents, authToken, cb)\nUpdates a document from a database. If the document does not exist, created it.\n\n```javascript\nconst muffler = require('muffler');\n\nconst updateContent = 'this is the new content';\nconst authToken = ' fa249990930b19bef4949f8af1d36db70a91123'\nmuffler.update(\n  'userAccount', '274bff0b1fb7a8f1f130cf1de266d111', updateContent, authToken, \n  (err, res) =\u003e {\n    if(err) return console.log(err);\n    console.log(`Updated with ${newContent}`);\n});\n```\n\n#### delete(accountId, objectId, authToken)\nDeletes a document from a database\n\n```javascript\nconst muffler = require('muffler');\n\nconst authToken = ' fa249990930b19bef4949f8af1d36db70a91123'\nmuffler.delete('userAccount', '274bff0b1fb7a8f1f130cf1de266d111', authToken, \n  (err, res) =\u003e {\n    if(err) return console.log(err);\n    console.log('object deleted');\n});\n```\n\n\n### Caveats\nThere is no way to ensure atomicity of transactions.\n\nThe document is the finer granularity for edit/update. This means that at\nthis point, when a field changes the whole blob needs to be updated. \n\n**Security**: When using Muffler.js in the frontend, do not forget you are exposing the \nauthentication token to the world. Only expose the authentication token when \ncreate/update/delete is necessary. Obfuscate the code when keeping auhtentication\ntoken in the browser, but bear in mind this is no silver bullet. **Important**:\nif using the access token on the browser, create a token authorized to modify\nonly gist documents.\n\nUse in production at your own responsability.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpestana%2Fmuffler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpestana%2Fmuffler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpestana%2Fmuffler/lists"}