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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gof

v0.1.1

Published

An extreme fast and highly scalable Firebase geo-query library.

Downloads

24

Readme

geo on fire (gof) :fire: CircleCI Codacy Badge Inline docs npm version

Geo on fire is an open source library to query location based data in Firebase. It follows a whole new principle of architecture, which makes it extremly fast and highly scaleable. With the right setup you are able to query millions of locations in just fractions of a second. You can learn more about the principle in the advanced usage guide. (not online so far, stay tuned)

In addition it offers you the possibility to listen to the queries in real time and recieve changes based on the event types you've specified. But that's not all. There's a feature which gives you the ability to priorize data and make the user expirience even better.

And by the way, there is not just one query method. You can choose between a radius based query (see dog match demo) and a boundaries based query. (see event map demo)

And the best, you will automatically recieve the fetched entries. So there is no manual fetching needed.

Quick links

Download

Currently there are three ways to download the library. But before you download the library make sure Firebase is already installed, since it's not a dependency of gof itself.

Notice: NodeJS is not supported so far, but it will be added soon. Subscribe here to get mentioned when the time is ready.

Add it like this to your HTML

<!-- Firebase -->
<script src="https://www.gstatic.com/firebasejs/4.5.0/firebase.js"></script>

or install it from npm

$ npm install firebase --save

CDN

If you are running gof in the browser you can include it directly from the CDN like this:

<!-- gof -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gof.min.js"></script>

npm

Download it from the npm repository the following way:

$ npm install gof --save

bower

Or download it from bower the following way:

$ bower install gof --save

Getting started

Now let's get started. As you will see, the usage is very simple.

Before you're able to use gof you need to initialize your firebase project.

var fb = firebase.initializeApp(config); // get 'config' from firebase

Now you are able to create a gof reference by simply doing the following.

// the name of your database nodes e.g. events, hotels - is totally up to you
var name = 'entries'; 

// the firebase database ref - must be passed with the .ref()
var ref = fb.database().ref();

// creates a new geoOnFire instance
var gof = new geoOnFire(name, ref);

That's it! Now you are able to run gof operations. Go trough the guides to see how it works.

Guides

Basic usage

Basically all the user operations proivded by gof can be splitted in two cateogries. There are writing and there are reading operations. Make sure you always use the built-in methods the library provides to modify your geolocations data. Otherwise there's a chance that you get corrupt and invalid data.

writing data

reading data (geolocation queries)

Advanced usage

Here you can find some advanced concept to make the best out from gof.

Documentation

Demo's

Currently there are the two demo's available. These are just some basic implementations to give you an idea about how powerful gof is. They are far away from perfect.

Is there any gof using project you want to share with the world? Simply create an issue with the url and I do the rest.

Contributions

I would love to see your contributions to the project. Till now I was not able to create some guidelines. If there are already any interests so far, we can communicate trough the issues.

What's next

Check out the 1.0.0 milestone to see what's next. Generally I've got tons of ideas, but just a very few time to work on them. So if you are interested in contributing you are more than just welcome!

I'm also looking forward to migrate the library to other db services like mongoDB or pouchDB.

Motivation

So basically the reason why I'm doing this, is because I've seen a lot of people struggling while buildung their json database structure. Espacially when it comes to more complex queries, firebase does not support you well enough. (by the way I'm so happy to see the new cloud firestore) This library should kind of like give you an idea.

License

MIT