Downstream is a multi-platform and real-time social media aggregation framework.
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
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.jsconst{ builtin }=require('downstream');const{ TwitterStreamChannel }=builtin;constcredentials={consumerKey: process.env.TWITTER_CONSUMER_KEY,consumerSecret: process.env.TWITTER_CONSUMER_SECRET,}consttwitterChannel=newTwitterStreamChannel({ credentials });module.exports={ twitterChannel };2. Access and mutate your aggregated data via hooks.
// hooks.jsasyncfunctionlogHook(post,next){console.log(post);awaitnext();}module.exports={ logHook };3. Initialize and start a new Downstream instance.
// main.jsconst{ Downstream }=require('downstream');const{ twitterChannel }=require('./channels');const{ logHook }=require('./hooks');constdownstream=newDownstream();// register Channelsdownstream.register(twitterChannel);// use hooksdownstream.use(logHook);// log any errorsdownstream.on('error',console.log);downstream.start();Our detailed API documentation is available in the docs/ folder.
Several examples are available in the examples/ folder.
See our Contributing Guidelines for details. We welcome outside contributions!
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.