{"id":20489284,"url":"https://github.com/flamelink/flamelink","last_synced_at":"2025-10-24T21:37:17.629Z","repository":{"id":25830397,"uuid":"104923189","full_name":"flamelink/flamelink","owner":"flamelink","description":"JavaScript SDK for integrating with Flamelink CMS 🔥","archived":false,"fork":false,"pushed_at":"2022-12-10T20:30:45.000Z","size":1319,"stargazers_count":192,"open_issues_count":32,"forks_count":22,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-29T05:05:57.264Z","etag":null,"topics":["cms","firebase","javascript","sdk"],"latest_commit_sha":null,"homepage":"https://flamelink.github.io/flamelink/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flamelink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-26T18:31:21.000Z","updated_at":"2024-04-13T12:11:02.000Z","dependencies_parsed_at":"2023-01-14T03:30:44.625Z","dependency_job_id":null,"html_url":"https://github.com/flamelink/flamelink","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamelink%2Fflamelink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamelink%2Fflamelink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamelink%2Fflamelink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamelink%2Fflamelink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flamelink","download_url":"https://codeload.github.com/flamelink/flamelink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294536,"owners_count":20915340,"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":["cms","firebase","javascript","sdk"],"created_at":"2024-11-15T17:12:09.422Z","updated_at":"2025-10-24T21:37:17.544Z","avatar_url":"https://github.com/flamelink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flamelink JavaScript SDK\n\n![NPM Version](https://img.shields.io/npm/v/flamelink/latest.svg?colorB=purple\u0026logo=npm\u0026style=flat-square)\n![NPM Version](https://img.shields.io/npm/v/flamelink/next.svg?colorB=red\u0026logo=npm\u0026style=flat-square)\n![NPM Downloads](https://img.shields.io/npm/dt/flamelink.svg?logo=npm\u0026style=flat-square)\n[![](https://data.jsdelivr.com/v1/package/npm/flamelink/badge)](https://www.jsdelivr.com/package/npm/flamelink)\n\n\u003e ## **:warning: NOTE :warning:**\n\u003e \n\u003e Version 0.x.x (flamelink@latest) of the SDK \u003c/ins\u003eonly supports the Firebase Realtime Database\u003c/ins\u003e, and is being deprecated. \n\u003e \n\u003e Please consider upgrading to the \"@next\" version of the SDK (flamelink@next) which supports both Cloud Firestore and the Realtime Database\n\u003e \n\u003e - [Installation](https://flamelink.github.io/flamelink-js-sdk/#/getting-started)\n\u003e - [Migration Guide](https://flamelink.github.io/flamelink-js-sdk/#/migration-guide)\n\u003e - [Repository](https://github.com/flamelink/flamelink-js-sdk)\n\u003e \n\u003e Alternatively please ensure you have specified a fixed version in your package manager file (\"flamelink\": \"0.19.14\") to avoid updating to the latest version of Flamelink on your next installation\n\n \n  \n![logo](https://raw.githubusercontent.com/flamelink/flamelink/master/docs/_assets/icon.svg?sanitize=true)\n\n\u003e Easily integrate with your Flamelink CMS.\n\nThis SDK is intended to be used in a browser or on a NodeJS server environment.\n\nIf you are unfamiliar with Flamelink, please visit our [flamelink.io](https://www.flamelink.io/) website for more info on features, pricing and more.\n\n**NOTE: THIS SDK SUPPORTS THE \u003c/ins\u003eFIREBASE REALTIME DATABASE ONLY\u003c/ins\u003e.**\n\n**If you are looking for Cloud Firestore support, please use our [new SDK](https://flamelink.github.io/flamelink-js-sdk) that supports both.**\n\n## Prerequisites\n\nIt goes without saying that you will need to have a [Flamelink](https://www.flamelink.io) project for this SDK to be of any use to you.\n\nApart from the Flamelink project, the only real hard dependency is either the [Firebase JavaScript SDK](https://www.npmjs.com/package/firebase) or [Firebase Admin SDK](https://firebase.google.com/docs/admin/setup), depending on whether you use Flamelink from the browser or server. Take a look at the installation instructions on their README, but in short, just make sure you add `firebase` or `firebase-admin` as a dependency to your project.\n\nOnce you have `firebase` installed, you can install `flamelink` using any of the following options (we recommend installing with `npm` or `yarn`):\n\n## Installation\n\nInstall with `npm`\n\n```bash\nnpm install --save flamelink\n```\n\nor with `yarn`\n\n```bash\nyarn add flamelink\n```\n\nor with a `\u003cscript\u003e` tag hosted from any of these CDN's\n\n### jsDelivr\n\nAdd the following script tag to the `\u003cbody\u003e` of your index.html file:\n\n```html\n\u003cscript src=\"//cdn.jsdelivr.net/npm/flamelink/dist/flamelink.js\"\u003e\u003c/script\u003e\n```\n\nThis will always load the latest version of this SDK for you. If you want to load a specific version, you can specify the version number as well (1.0.0 in the example):\n\n```html\n\u003cscript src=\"//cdn.jsdelivr.net/npm/flamelink@1.0.0/dist/flamelink.js\"\u003e\u003c/script\u003e\n```\n\n\u003e See the [jsDelivr website](https://www.jsdelivr.com/?query=flamelink) for more options\n\n### unpkg\n\nAdd the following script tag to the `\u003cbody\u003e` of your index.html file:\n\n```html\n\u003cscript src=\"//unpkg.com/flamelink/dist/flamelink.js\"\u003e\u003c/script\u003e\n```\n\nThis will always load the latest version of this SDK for you. If you want to load a specific version, you can specify the version number as well (1.0.0 in the example):\n\n```html\n\u003cscript src=\"//unpkg.com/flamelink@1.0.0/dist/flamelink.js\"\u003e\u003c/script\u003e\n```\n\n\u003e See the [unpkg website](https://unpkg.com) for more options\n\n## Usage\n\n### Importing/Adding the dependencies\n\nFirst ensure that you load the `flamelink` package to your file. When using the `\u003cscript\u003e` tag version, you will need to load both `firebase` and `flamelink` which will then be globally available on the browser's `window` object.\n\nDepending on your app setup, you can import the package using `require()` statements:\n\n```javascript\nvar flamelink = require('flamelink');\n```\n\nor using ES2015/ES6 imports:\n\n```javascript\nimport flamelink from 'flamelink';\n```\n\n### Creating your Flamelink app instance\n\nYou can create your `flamelink` app instance by passing in an existing `firebaseApp` instance along with all the other `flamelink` config options (if using this option you need to remember to import `firebase` or `firebase-admin` yourself):\n\n```javascript\nimport * as firebase from 'firebase';\nimport flamelink from 'flamelink';\n\nconst firebaseConfig = {\n  apiKey: '\u003cyour-api-key\u003e', // required\n  authDomain: '\u003cyour-auth-domain\u003e', // required\n  databaseURL: '\u003cyour-database-url\u003e', // required\n  projectId: '\u003cyour-project-id\u003e', // required\n  storageBucket: '\u003cyour-storage-bucket-code\u003e', // required\n  messagingSenderId: '\u003cyour-messenger-id\u003e' // optional\n};\n\nconst firebaseApp = firebase.initializeApp(firebaseConfig);\n\nconst app = flamelink({ firebaseApp });\n```\n\n?\u003e **Tip:** Go to your [Firebase console](https://console.firebase.google.com/) to find these config settings.\n\nWhen using the `firebase-admin` SDK on server-side, you need to specify a `isAdminApp` property along with your `firebaseApp` instance, like this:\n\n```javascript\nconst admin = require('firebase-admin');\nconst flamelink = require('flamelink');\nconst serviceAccount = require('path/to/serviceAccountKey.json');\n\nconst firebaseConfig = {\n  credential: admin.credential.cert(serviceAccount), // required\n  databaseURL: '\u003cyour-database-url\u003e', // required\n  storageBucket: '\u003cyour-storage-bucket-code\u003e' // required if you want to your any Storage functionality\n};\n\nconst firebaseApp = admin.initializeApp(config);\n\nconst app = flamelink({ firebaseApp, isAdminApp: true }); // Remember `isAdminApp: true` here!!!\n```\n\n\u003e You can use any of the [different ways to create the admin firebaseApp instance](https://firebase.google.com/docs/admin/setup), as long as you remember to set the `isAdminApp: true` option.\n\n### Using your flamelink app\n\nOnce you have an instance of the [`flamelink` app](https://app.flamelink.io), you can start using it to interact with your data stored in your firebase database. Suppose you want to retrieve all your products created under the \"Content\" section in `flamelink`.\n\n_Using standard Promises:_\n\n```javascript\napp.content.get('products')\n  .then(products =\u003e console.log('All of your products:', products))\n  .catch(error =\u003e // handle any errors)\n```\n\n_Using async-await:_\n\n```javascript\nconst products = await app.content.get('products');\nconsole.log('All of your products:', products);\n```\n\nRead our [docs](https://flamelink.github.io/flamelink) for more specifics!\n\n\u003e 🔥🔥🔥 **Flame on!!** 🔥🔥🔥\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflamelink%2Fflamelink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflamelink%2Fflamelink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflamelink%2Fflamelink/lists"}