GithubHelp home page GithubHelp logo

postmark-awesome-graph's Introduction

Awesome Graph with 'Postmark API'

Table of Contents

Setting things up

This repository contains a Rails app with a React frontend. To get started, follow these steps:

  • cp .env-example .env and update the .env file with your Postmark Server API token and your account's domain.
  • Install the Ruby version found in .ruby-version (we like to use RVM).
  • Install NVM.
  • Run nvm install in the repository root.
  • Install Yarn (required by Webpacker).
  • Depending on your platform, you might need to install libsqlite3 for SQLite support.
  • Run bin/setup.

To verify that your dev environment is set up correctly, run the Rails server and open http://localhost:3000/ in your browser.

# Running the Rails server

$ bin/rails server

Taking the first snapshot

Run this Rake task to take the first snapshot of your app.

$ bin/rake snapshot:take

What should you see?

You’re given access to a Postmark server (?) used by some 3rd party app to send private message notifications to its users (a common use case for Postmark). The test app will build and present the network of communications within the community of the app’s users.

The app’s boilerplate consists of a Rake task snapshot:take that takes a (say, nightly) snapshot of all in-app communications, the Snapshot model that stores all in-app communications up to the time it was taken, a Rails controller that serves the latest communications snapshot, and a React view that presents this data to the end user.

Default data

Until your first snapshot is taken, the component will show the data hard-coded in the graph.jsx file. The graph shows a network of in-app communications where each node is a person and each connection is a message from one person to another. When the user highlights a line connecting two users, the inspector component should display the topics the two chatted about. See the screenshot below for an example.

Preview of the awesome graph

Result Example

Schedule the snapshots to run at midnight with Cron jobs

$ whenever --update-crontab

$ crontab -l # verify the changes were saved

Cron jobs run at the system level, so don't forget to clear crontab after you're done playing with this project.

$ crontab --clear-crontab

postmark-awesome-graph's People

Contributors

eduardosancho avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.