GithubHelp home page GithubHelp logo

waldyrious / abyss Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 2.23 MB

node.js ephemeral messaging and file sharing platform built on Mithril and RethinkDB

CSS 13.75% JavaScript 84.29% HTML 1.59% Shell 0.37%

abyss's Introduction

Features

  1. Ephemeral group and individual messaging--message ownership is shared among all message recipients
  2. Push notifications
  3. Login with just your phone number (confirmed with a text code)
  4. No usernames, all identities via phone numbers
  5. Choose and change your own nickname at any time
  6. Real-time updates via socket.io and RethinkDB changefeed
  7. Drag-and-drop file uploads with automatic image rotation fix
  8. Inline display of pictures, sounds and videos. Other files are downloadable.
  9. Built-in internet radio player (needs working stations)

Installing

First install:

  1. RethinkDB
  2. Node.js 4.0 or later

Running locally

  1. git clone the repo and cd into the project
  2. Start an instance of Rethinkdb: rethinkdb This will start an instance of RethinkDB with datafiles in the working directory. Once running, go to http://localhost:8080 to access the RethinkDB admin tool. Leave Rethinkdb running in a terminal tab.
  3. Install node modules: npm i This installs the node_modules for the project.
  4. Build front end: npm run watch This continually builds the front end upon file change. Leave it running in a terminal tab too. npm run build does a single build. These are defined in package.json.
  5. Start the server. node runner.js This restarts the server each time you change a file. If you need to debug, node-debug server.js or node server.js will run without restarting the server on file change.

Create file secret/secret.json

This is the configuration file.

{
    "blobs": "/opt/abyss/blobs",
    "cluster": false,
    "spdy": true,
    "http2": false,
    "https": true,
    "httpredirect": false,
    "wwwredirect": false,
    "gcmapikey": "insertkeyhere",
    "sendverificationcodes": false,
    "rethinkdboptions": {
        "servers": [
            { "host": "localhost", "port": 28015 }
        ],
        "db": "test",
        "discovery": true
    },
    "cookieKeys": [
        "random stuff",
        "more random stuff"
    ],
    "jwtSecret": "another random string",
    "slowstreams": false,
    "verificationfrom": "[email protected]"
}

Setup DB Schema

Run schema.js. It's safe to re-run this as it won't drop anything.

Running the server:

  1. From the command line, node server.js to run.
  2. Run node debug server.js to debug.
  3. Run node-debug -p 8081 server.js to use a web based debugger. First you'll need to have run npm i -g node-inspector to have 'node-debug' available.

Library API reference

Node.js Cheat Sheet

Mozilla MDN The JavaScript reference.

NodeJS API NodeJS APIs.

Bluebird Promise API. Most Node modules use callback-based APIs for performance. Bluebird lets you easily convert them to Promise based APIs, which are much easier to use, and have better error handling and stacktraces, though they incur a small perf hit.

Lodash API Utility belt library. Useful for working with arrays and objects.

Koa minimalist web application framework

Mithril minimalist MVC frontend framework

JavaScript Design Patterns

MomentJS Date and time handling library

Tape Tape: minimalist, TAP producing test library.

abyss's People

Contributors

abrekken avatar

Watchers

 avatar  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.