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

downstream

v0.1.5

Published

A multi-platform and real-time social media aggregation framework.

Downloads

35

Readme

Downstream · npm version GitHub license PRs Welcome

Downstream is a multi-platform and real-time social media aggregation framework.

Installation

Downstream is released as a Node.js package on the npm registry.

Node.js 12.9 or higher is required to use Downstream in your project.

To install Downstream for your project, run the below command from your terminal:

npm install downstream

Usage

1. Downstream aggregates data via Channels.

  • Built-in Channels aggregate posts from platforms like Facebook, Instagram, or Twitter.
  • Create your own Channels to easily aggregate data from other platforms and sources.
  • Use a WebChannel to expose Downstream on your local network or string multiple Downstream instances together via a simple HTTP interface.
// channels.js

const { builtin } = require('downstream');
const { TwitterStreamChannel } = builtin;

const credentials = {
    consumerKey: process.env.TWITTER_CONSUMER_KEY,
    consumerSecret: process.env.TWITTER_CONSUMER_SECRET,
}

const twitterChannel = new TwitterStreamChannel({ credentials });

module.exports = { twitterChannel };

2. Access and mutate your aggregated data via hooks.

// hooks.js

async function logHook(post, next) {
  console.log(post);
  await next();
}

module.exports = { logHook };

3. Initialize and start a new Downstream instance.

// main.js

const { Downstream } = require('downstream');
const { twitterChannel } = require('./channels');
const { logHook } = require('./hooks');

const downstream = new Downstream();

// register Channels
downstream.register(twitterChannel);

// use hooks
downstream.use(logHook);

// log any errors
downstream.on('error', console.log);

downstream.start();

Documentation

Our detailed API documentation is available in the docs/ folder.

Examples

Several examples are available in the examples/ folder.

Contributing

See our Contributing Guidelines for details. We welcome outside contributions!

People

Downstream is actively built and maintained by the Technologies & International Development (T+ID) Lab at Georgia Tech to support the Aggie platform and other research initiatives.

This project would not be possible without the amazing work done by the original contributors to the Aggie platform whose work on the original backend for Aggie inspired the idea and architecture behind Downstream. Thank you.

License

GNU GPLv3