Giter VIP home page Giter VIP logo

gossip's Introduction

gossip

A minimal chat app over Go web-sockets.

  1. Goals
  2. Using
  3. Building
  4. Testing and Hacking
  5. Notable Make Commands

Goals

  1. Reduce heartbeat rate if window not visible.
  2. "Hide screen" when window visible for too long (AFK protection).
  3. Cleaner input area.
  4. Regularly replace timestamp with relative timestamps (about 3 minutes, 2 days, etc).
  5. All navigation done through simple nav bar.
    • rooms/options are 'bootstrap breadcrumbs' that drop down or something
      • {Gossip} / {organization | group} / {room | whisper}
    • people in users list are links to start PM session
      • {meta-key}+click may @mention someone in the current channel
  6. IRC-style commands
  7. Off-The-Record
  8. All the good and thought out encryption I can muster.
  9. Only keep last X messages -- scrolling loads more.
  10. Quickselect -- potentially on holding of a meta key;
    • Use something like this
    • Link to most recent and/or popular:
      1. People/ private rooms
      2. Rooms
      3. Groups
  11. Search

Using

TODO: Mongo documentation

From Source

First, read the building section. It will illustrate how to:

  1. Install Dependencies
  2. Build the Binary and Client

Then decide whether you want to:

  1. Run Locally
  2. Run In a Virtual Machine

From Binaries

Coming soon lol ...

Running

Now that we've got everything built/installed let's run the thing.

Locally

To run the server on the machine you built/downloaded on:

make run

This also requires a Mongo database be running on the system.

Assuming no changes were made to the Vagrantfile the application will be accessible at:

http://192.168.20.20

EC2

Coming soon... done in Vagrant.

Building

Much of the building and installation is done via make. There are a few prereqs.

Prerequisites

The following are requisites only for building. They are hard dependencies for it, however.

  1. The primary development language is Go
  2. Development of the reference client aided by node

All secondary libraries, utilities, and actions are installed by the make commands.

make deps

Do note that the node requirement may be expanded or completely removed. I am open to suggestions or pull requests on this matter.

For a list of what dependencies are used:

  1. Go: /deps.json
  2. node: /package.json

Steps

If all hard dependencies met, a simple make install will do. For sanity's sake, I'll describe the whole process. It is two parts.

Dependencies

  1. Install go:
    • Debian/Ubuntu/etc: apt-get install golang
    • MacOSX:
      • brew: brew install go
      • without brew: follow the go site instructions
  2. Install node:
    • Debian/Ubuntu/etc: apt-get install nodejs
    • MacOSX:
      • brew: brew install node
      • without brew: follow the node site instructions

Building Application

Now, to build the binary and client, simply run:

  1. make
  2. make install
    • binary installation directory set by $PREFIX
      • inline: PREFIX=/my/install/dir make install

The default make target will pull secondary dependencies, compile the binary, and generate distribution client code.

Intuitively, make install installs the binary into a globally executable location and the client into a servable directory.

Testing & Hacking

In the root directory you will find a Vagrantfile and an ansible/ directory.

Vagrant provides easy creation of machine environments using a variety of providers but most natable Virtualbox and EC2.

Ansible is a tool that allows easy provisioning of machines generated by Vagrant or some other means. Simply point it a single or set of boxes and let her rip.

Local

To start a local environment make sure you have Vagrant and Virtualbox installed.

Once this is done, simply run:

make local

Remote

Still working on this ...

Notable Make Commands

This list does not contain all the commands. It is meant to highlight the important ones.

default -- happens on a bare make

  • Does a "sum-total" build of the server binary and client.
  • It does not attempt to install it, however.

deps

  • Install all secondary dependencies for go and node

binary

  • Only build the server -- go portion of the codebase

client

  • Build the reference client into the ouput directory

clean

  • Remove intermediate files and built directory

install

  • Debian-focused, though should work on most *nices or BSDs
    • verified on Ubuntu 14.04 and MacOSX 10.9
  • Install the binary to the $PREFIX directory
    • if none supplied, /usr/local/bin is used
  • Install the client to /srv/gossip
    • this will be made variable soon

local

run

  • Run the server on the machine issuing the command
  • Will build the system first

====

Issues & Feedback

If you encounter problems with gossip, please feel free to raise an issue.

Contributing

Fork this repository and make a pull request!

License

gossip is released under the MIT license.

gossip's People

Contributors

anthonycorletti avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

germanf

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.