npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sails-firebase

v0.1.6

Published

Sails.js/Waterline adapter for Firebase

Readme

sails-firebase

Sails.js/Waterline adapter for Firebase.

Build Status npm version

Warning

This adapter is still under active development and in no manner is advised using it in a production environment.

Check the project issues board for announcements, bug reports, upcoming features and discussions.

Only mandatory semantic interface methods were implemented. The next steps is bringing queryable and associations to life asap.

Introduction

Overview

The Firebase Realtime Database synchronized in realtime to every connected client.

It allows you build cross-platform apps with our iOS and Android, all of your clients share one Realtime Database instance and automatically receive updates with the newest data.

However the current Firebase architecture force the developers to implement a lof of business logic as part of the mobile applications, leading to some side-effects:

  • Business logic code duplication among Android, iOS, Windows and all mobile platforms
  • Due version fragmentation, business logic is affected by apps being (not) updated.

Sails.js and Waterline as Mobile Orchestrator

This Waterline Firebase Adapter provides missing piece to Sails.js become a mobile orchestrator. The server application read and writes directly into Firebase, which updates all mobile devices connected to it in realtime; just like a message passing distributed system.

Configure and Install

Dependencies

At your Sails.js project, install the adapter library:

$ npm install sails-firebase --save

Configure

Create an application at Firebase admin console, then access the project settings menu:

https://console.firebase.google.com/project/<YOUR PROJECT NAME>/settings/general/

Go to the account services menu and create download a server private key, which will contain valid credential and databaseUrl.

You will add an adapter atribute and copy it into connection.js configuration file:

// ./config/connections.js
module.exports.connections = {

  firebase: {
    adapter: 'sails-firebase',

    credential: {
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "client_email": "<YOUR EMAIL CLIENT>",
      "client_id": "<YOUR CLIENT ID>",
      "client_x509_cert_url": "<YOUR CLIENT X509 CERTIFICATE>",
      "private_key": "<YOUR PRIVATE KEY>",
      "private_key_id": "<YOUR PRIVATE KEY ID>",
      "project_id": "<YOUR PROJECT ID>",
      "token_uri": "https://accounts.google.com/o/oauth2/token",
      "type": "service_account",
    },

    databaseURL: "https://<YOUR PROJECT NAME>.firebaseio.com",
  }

};

and also configure your model:

// ./config/models.js
module.exports.models = {
   'connection': 'firebase'
};

Contributing

If you wish to contribute to Waterline Firebase Adapter, first we would like to thank you for dedicating your time on this project.

Before create a pull request, keep some things in mind:

  • Be polite with other community developers.
  • Run the integration tests locally and be sure they pass.
  • Keep the code style.
  • Create awesome commit messages (use emojis and read Udacity Git Style Guide)

The adapter currently provides only semantic inteface. If you are submitting other interfaces, add it to the package.json file:

{
  "waterlineAdapter": {
    "type": "sails-firebase",
    "interfaces": [
      "semantic"
    ],
    "waterlineVersion": "~0.12.1"
  }
}