Skip to content

Commit

Permalink
rename to hiDB
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Grahn committed Sep 28, 2019
1 parent 673ca05 commit fd5c968
Show file tree
Hide file tree
Showing 165 changed files with 169 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -5,5 +5,5 @@ node_js:
- "10"
script: >-
./install-and-test.sh
cd jiber-client
cd hidb-client
npm run send-to-coveralls
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at jacob@jiber.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at jacob@hidb.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
@@ -1,3 +1,3 @@
1. Write tests for new or changed features.
2. Ensure "npm run lint" and "npm run test" report no errors.
3. Jiber aims to be awesome while remaining as small and simple as possible. If you are adding a new feature that contains a lot of code, consider writing it as a separate package instead.
3. hiDB aims to be awesome while remaining as small and simple as possible. If you are adding a new feature that contains a lot of code, consider writing it as a separate package instead.
22 changes: 11 additions & 11 deletions README.md
@@ -1,13 +1,13 @@
[![Jiber](jiber.gif)](https://jiber.io)
[![HiDB](hidb.gif)](https://hidb.io)

[![Build Status](https://travis-ci.org/jacob-grahn/jiber.svg?branch=master)](https://travis-ci.org/jacob-grahn/jiber)
[![Coverage Status](https://coveralls.io/repos/github/jacob-grahn/jiber/badge.svg?branch=master&cache_bust=yay)](https://coveralls.io/github/jacob-grahn/jiber?branch=master)
[![Greenkeeper badge](https://badges.greenkeeper.io/jacob-grahn/jiber.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/jacob-grahn/hidb.svg?branch=master)](https://travis-ci.org/jacob-grahn/hidb)
[![Coverage Status](https://coveralls.io/repos/github/jacob-grahn/hidb/badge.svg?branch=master&cache_bust=yay)](https://coveralls.io/github/jacob-grahn/hidb?branch=master)
[![Greenkeeper badge](https://badges.greenkeeper.io/jacob-grahn/hidb.svg)](https://greenkeeper.io/)

Jiber is an open source API for realtime web apps. It sets up peer-to-peer connections via webRTC, and backs that up with a more reliable client/server WebSocket connection.
HiDB is an open source API for realtime web apps. It sets up peer-to-peer connections via webRTC, and backs that up with a more reliable client/server WebSocket connection.

- **Fast**: Updates are sent peer to peer to minimize latency.
- **Light**: jiber-client is 3kb, and has no dependencies.
- **Light**: hidb-client is 3kb, and has no dependencies.
- **Offline-First**: User actions are applied optimistically until a connection becomes available.

### Live Demos
Expand All @@ -16,18 +16,18 @@ Jiber is an open source API for realtime web apps. It sets up peer-to-peer conne

### Server Installation
```
npm i jiber-server
npm i hidb-server
```

### Client Installation
```
npm i jiber-client
npm i hidb-client
```

### Documentation
- [Get Started with jiber-server](/packages/jiber-server)
- [Get Started with jiber-client](/packages/jiber-client)
- See Jiber's Docs at [docs.jiber.io](http://docs.jiber.io)
- [Get Started with hidb-server](/packages/hidb-server)
- [Get Started with hidb-client](/packages/hidb-client)
- See HiDB's Docs at [docs.hidb.io](http://docs.hidb.io)

### Examples
Examples can be found in [/examples](/examples).
Expand Down
6 changes: 3 additions & 3 deletions greenkeeper.json
Expand Up @@ -2,9 +2,9 @@
"groups": {
"default": {
"packages": [
"jiber-client/package.json",
"jiber-redis/package.json",
"jiber-server/package.json"
"hidb-client/package.json",
"hidb-redis/package.json",
"hidb-server/package.json"
]
}
}
Expand Down
16 changes: 8 additions & 8 deletions jiber-client/README.md → hidb-client/README.md
@@ -1,13 +1,13 @@
### Installation
```
npm i jiber-client
npm i hidb-client
```

### Quick Example
```
// Create a data store, which will sync up our data with other users
const doc = $jiber
.createStore({url: 'wss://demo.jiber.io'})
const doc = $hidb
.createStore({url: 'wss://demo.hidb.io'})
.open('example')
// set a value
Expand Down Expand Up @@ -44,10 +44,10 @@ const clientSettings = {
// array of middleware that runs before an action is dispatched
middleware: [],
// jiber-server to synch data with
// hidb-server to synch data with
url: 'ws://localhost',
// passed to jiber-server to validate a session
// passed to hidb-server to validate a session
credential: undefined,
// array of stun servers to help establish WebRTC connections
Expand All @@ -68,8 +68,8 @@ Once you have your options worked out you'll want to create a store, and then cr
as you need.

```
// jiber-client's one and only method
const store = jiber.createStore(clientSettings)
// hidb-client's one and only method
const store = hidb.createStore(clientSettings)
// get your global state, which contains all docs
store.getState()
Expand All @@ -88,7 +88,7 @@ doc.dispatch({type: 'HELLO'}) // this is sent to your reducer in clientSettings.
doc.sayHello() // the same as the line above, thanks to clientSettings.actionCreators
```

See Jiber's Docs at [docs.jiber.io](http://docs.jiber.io)
See HiDB's Docs at [docs.hidb.io](http://docs.hidb.io)

### License
MIT
4 changes: 2 additions & 2 deletions jiber-client/docs/client.md → hidb-client/docs/client.md
Expand Up @@ -8,8 +8,8 @@ __Returns__

__Example__
``` javascript
import jiber from 'jiber-client'
const store = jiber.createStore()
import hidb from 'hidb-client'
const store = hidb.createStore()
```

# combineReducers(dictionary)
Expand Down
12 changes: 12 additions & 0 deletions hidb-client/docs/draw-with-friends-tutorial/01_setup.md
@@ -0,0 +1,12 @@
# Setup

## Here's What We're Making
#### https://codepen.io/jacob-grahn/pen/mqGmWb

## Install Node
### Go to https://nodejs.org/ to download and install the latest version of node

## Install the hiDB Client
#### To install the hiDB Client we first need to open command prompt, and then after that we need two simple commands. After these two commands, the hiDB client should be installed and ready to be used when we need it! One command is needed to init and the other is needed to actually install the client, they are shown below:
### npm init
### npm install hidb-client
Expand Up @@ -16,7 +16,7 @@ __Example Code to access this in Javascript is as follows__
const canvas = document.getElementById('line-canvas')
const ctx = canvas.getContext('2d')
```
##### This code will get the canvas with the given id of "line-canvas" and also get the context of the canvas so that we can draw onto it. It's also taken directly from the draw-with-friends example project included with jiber so you can reference it there.
##### This code will get the canvas with the given id of "line-canvas" and also get the context of the canvas so that we can draw onto it. It's also taken directly from the draw-with-friends example project included with hidb so you can reference it there.

## Draw something on the canvas
##### Say we wanted to create a simple rectangle with a width and height of 250, to do this we would use the code as follows.
Expand Down
@@ -1,10 +1,10 @@
# Jiber
# hiDB

## Import Jiber
## Import hiDB

## Set up a Store using our Reducer

## Point jiber to a demo server
## Point hiDB to a demo server

## Open up several windows and Draw

Expand Down
4 changes: 2 additions & 2 deletions jiber-client/docs/room.md → hidb-client/docs/room.md
Expand Up @@ -59,7 +59,7 @@ doc.dispatch({type: 'EAT_APPLES', quantity: 5})


# [any]
If you provide the actionCreators option when initializing jiber-client,
If you provide the actionCreators option when initializing hidb-client,
those methods will become available on your doc instances.

__Aruguments__
Expand All @@ -71,7 +71,7 @@ __Returns__

__Example__
``` javascript
const store = jiber.createStore({
const store = hidb.createStore({
actionCreators: {
eatApples: (quantity) => ({type: 'EAT_APPLES', quantity})
}
Expand Down
Expand Up @@ -18,10 +18,10 @@ const settings = {
// array of middleware that runs before an action is dispatched
middleware: [],

// jiber-server to synch data with
// hidb-server to synch data with
url: 'ws://localhost:80',

// passed to jiber-server to validate a session
// passed to hidb-server to validate a session
credential: undefined,

// array of stun servers to help establish WebRTC connections
Expand Down Expand Up @@ -79,15 +79,15 @@ __Default__


# url
Url of a jiber-server to synch data with.
Url of a hidb-server to synch data with.

__Default__
undefined
--------------------------------------------------------------------------------


# credential
Passed to jiber-server to validate a session.
Passed to hidb-server to validate a session.

__Default__
undefined
Expand Down
File renamed without changes.
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Draw With Friends</title>
<script src="../dist/jiber-client.bundle.js"></script>
<script src="../dist/hidb-client.bundle.js"></script>
</head>
<body style="background-color: grey; padding: 0; margin: 0;">
<canvas id="line-canvas" width="500" height="500"></canvas>
Expand All @@ -18,8 +18,8 @@

// open a doc for our masterful drawing
const url = 'ws://localhost:8080'
const jiber = new JiberClient({ url })
const doc = jiber.open('draw')
const hidb = new HiDBClient({ url })
const doc = hidb.open('draw')

// each 'pixel' is a 10px by 10px square
const scale = 10
Expand Down
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions jiber-client/package.json → hidb-client/package.json
@@ -1,8 +1,8 @@
{
"name": "jiber-client",
"name": "hidb-client",
"version": "0.1.12",
"description": "Synced data store",
"main": "dist/jiber-client.bundle.js",
"main": "dist/hidb-client.bundle.js",
"module": "dist/es6/index.js",
"types": "src/index.ts",
"scripts": {
Expand All @@ -13,7 +13,7 @@
"build": "tsc && npm run bundle && npm run minify",
"compile": "tsc",
"bundle": "rollup -c",
"minify": "uglifyjs -c -m -o dist/jiber-client.bundle.min.js dist/jiber-client.bundle.js",
"minify": "uglifyjs -c -m -o dist/hidb-client.bundle.min.js dist/hidb-client.bundle.js",
"send-to-coveralls": "cat ./coverage/lcov.info | coveralls"
},
"author": "Jacob Grahn",
Expand Down
Expand Up @@ -3,9 +3,9 @@ import resolve from 'rollup-plugin-node-resolve'
export default {
input: 'dist/es6/index.js',
output: {
file: 'dist/jiber-client.bundle.js',
file: 'dist/hidb-client.bundle.js',
format: 'umd',
name: 'JiberClient'
name: 'HiDBClient'
},
plugins: [
resolve()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,15 +1,15 @@
/* global test, expect */

import { JiberClient } from './jiber-client'
import { HiDBClient } from './hidb-client'
import { Action } from './action'

test('pass messages from server to docs', () => {
const jiber = new JiberClient()
const doc = jiber.open('bloop')
const hidb = new HiDBClient()
const doc = hidb.open('bloop')

doc.subscription.subscribe((_state: any, action: any) => {
expect(action.doc).toBe('bloop')
})

jiber.subscription.publish(new Action({ doc: 'bloop' }))
hidb.subscription.publish(new Action({ doc: 'bloop' }))
})
Expand Up @@ -9,7 +9,7 @@ import { Doc } from './doc'
import { ToughSocket } from './tough-socket'
import { Settings, CustomSettings } from './settings'

export class JiberClient {
export class HiDBClient {
public subscription: Subscription = new Subscription()
private settings: Settings
private socket: ToughSocket
Expand Down
1 change: 1 addition & 0 deletions hidb-client/src/index.ts
@@ -0,0 +1 @@
export { HiDBClient as default } from './hidb-client'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fd5c968

Please sign in to comment.