{"id":18685800,"url":"https://github.com/grapesjs/storage-firestore","last_synced_at":"2025-04-12T04:51:47.081Z","repository":{"id":41905046,"uuid":"132336594","full_name":"GrapesJS/storage-firestore","owner":"GrapesJS","description":"Cloud Firestore storage wrapper for GrapesJS","archived":false,"fork":false,"pushed_at":"2023-06-12T09:22:42.000Z","size":300,"stargazers_count":35,"open_issues_count":0,"forks_count":19,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T04:51:42.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrapesJS.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":"2018-05-06T12:32:54.000Z","updated_at":"2025-01-03T20:12:56.000Z","dependencies_parsed_at":"2023-07-25T01:17:02.034Z","dependency_job_id":"de4476a3-4138-4382-9f31-ddbb33b6721b","html_url":"https://github.com/GrapesJS/storage-firestore","commit_stats":null,"previous_names":["artf/grapesjs-firestore"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstorage-firestore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstorage-firestore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstorage-firestore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fstorage-firestore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrapesJS","download_url":"https://codeload.github.com/GrapesJS/storage-firestore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519473,"owners_count":21117757,"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":[],"created_at":"2024-11-07T10:24:18.713Z","updated_at":"2025-04-12T04:51:47.059Z","avatar_url":"https://github.com/GrapesJS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GrapesJS Firestore\n\nGrapesJS storage wrapper for [Cloud Firestore](https://firebase.google.com/docs/firestore), flexible, scalable NoSQL cloud database to store and sync data for client/server-side development.\n\n\u003e Requires GrapesJS v0.19.* or higher\n\n\n## Summary\n\n* Plugin name: `grapesjs-firestore`\n* Storage\n  * `firestore`\n\n\n\n\n\n## Options\n\n|Option|Description|Default|\n|-|-|-\n| `type` | Type id used to register the new storage. You can use this option in case you want to replace the already available storages (eg. `remote`). | `'firestore'` |\n| `apiKey` | Firebase API key | `''` |\n| `authDomain` | Firebase Auth domain | `''` |\n| `projectId` | Cloud Firestore project ID | `''` |\n| `docId` | Document id | `'gjs'` |\n| `collectionName` | Collection name | `'projects'` |\n| `enableOffline` | Enable support for offline data persistence | `true` |\n| `settings` | Firestore database [settings](https://firebase.google.com/docs/reference/js/firebase.firestore.Settings) | `{ timestampsInSnapshots: true }` |\n\n\n\n\n\n## Download\n\n* CDN\n  * `https://unpkg.com/grapesjs-firestore`\n* NPM\n  * `npm i grapesjs-firestore`\n* GIT\n  * `git clone https://github.com/GrapesJS/storage-firestore.git`\n\n\n\n\n\n## Usage\n\nBefore start using this plugin you have to create and enable Cloud Firestore project in [Firebase Console](https://console.firebase.google.com). When you create a Firestore project, it also enables its API, which you can get from [Cloud API Manager](https://console.cloud.google.com/projectselector/apis/api/firestore.googleapis.com/overview).\n\n```html\n\u003clink href=\"https://unpkg.com/grapesjs/dist/css/grapes.min.css\" rel=\"stylesheet\"/\u003e\n\u003cscript src=\"https://unpkg.com/grapesjs\"\u003e\u003c/script\u003e\n\u003cscript src=\"path/to/grapesjs-firestore.min.js\"\u003e\u003c/script\u003e\n\n\u003cscript src=\"https://www.gstatic.com/firebasejs/8.10.1/firebase.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://www.gstatic.com/firebasejs/8.10.1/firebase-firestore.js\"\u003e\u003c/script\u003e\n\n\u003cdiv id=\"gjs\"\u003e\u003c/div\u003e\n\n\u003cscript type=\"text/javascript\"\u003e\n  var editor = grapesjs.init({\n      container : '#gjs',\n      ...\n      storageManager: { type: 'firestore' },\n      plugins: ['grapesjs-firestore'],\n      pluginsOpts: {\n        'grapesjs-firestore': {\n          docId: 'someID',\n          apiKey: '\u003cAPI_KEY\u003e',\n          authDomain: '\u003cPROJECT_ID\u003e.firebaseapp.com',\n          projectId: '\u003cPROJECT_ID\u003e',\n        }\n      }\n  });\n\u003c/script\u003e\n```\n\nBy default, Firebase allows everyone to read/write data inside your DB by knowing the API credentials, which is ok for the first setup and development but, obviously, not for production.\nTo get more about the Firestore security checkout [this guide](https://firebase.google.com/docs/firestore/security/overview).\n\n\n\n\n## Development\n\nClone the repository\n\n```sh\n$ git clone https://github.com/GrapesJS/storage-firestore.git\n$ cd grapesjs-firestore\n```\n\nInstall dependencies\n\n```sh\n$ npm i\n```\n\nStart the dev server\n\n```sh\n$ npm start\n```\n\n\n\n\n\n## License\n\nBSD 3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrapesjs%2Fstorage-firestore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrapesjs%2Fstorage-firestore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrapesjs%2Fstorage-firestore/lists"}