Giter Club home page Giter Club logo

orbit's People

Contributors

andyli avatar aphelionz avatar claus avatar dignifiedquire avatar greenkeeperio-bot avatar haadcode avatar jihdeh avatar masadeus avatar richardlitt avatar shamb0t avatar theobat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orbit's Issues

use different ipfs repos

background

It seems to me (sorry need to do more digging, will get to it later if i can) orbit asumes the ipfs repo is in ~/.ipfs always. this makes it a bit difficult when playing with repos of different versions (eg fs-repo@1 ([email protected]) and fs-repo@2 ([email protected])

requests

would be nice if orbit:

  • maybe default to a different location?
  • allows specifying the path to the repo as part of the running cmd. node index.js --repo <repo-path>
  • maybe supported IPFS_PATH (go-ipfs does) -- env vars have no place in apps. but maybe for development its ok. not sure.
  • or maybe keep it in orbit-db-cache.json ? not sure, likely doesnt belong there.

sorry, i need to understand the internals better to provide good suggestions. maybe @diasdavid has better thoughts

Cleaner local state when running the app

right now running orbit locally ( node index.js) uses some local state in its home directory. its not clear what is "dirty" and can be removed. (its not super clear from the gitignore either)

it may be better to have either:

  • a clear account of what those files are in the readme, (or via clean target in a Makefile / Gruntfile)
  • or put all those under a directory, like orbit-data or something.

can't start after updates?

cant start after updates. i made sure to:

# reinstall all modules because npm does not always recover nicely from installed deps...
> rm -rf node_modules/
> npm install

here's what i tried?

# just trying to boot it up
~/git/ipfs/orbit > node index.js
2016-04-16T00:27:54.395Z [DEBUG] Orbit.Main: Running in 'release' mode
2016-04-16T00:27:54.398Z [INFO]  Orbit.Main: Starting IPFS...
2016-04-16T00:27:54.399Z [DEBUG] ipfs-daemon: Starting IPFS daemon
2016-04-16T00:27:54.400Z [DEBUG] ipfs-daemon: Using IPFS data directory: '/Users/jbenet/.ipfs', exists: true
# failed. hmm repo version problem? im on 0.4.1-dev with fs-repo@3
~/git/ipfs/orbit > cat ~/.ipfs/version
3

# maybe it doesnt like my repo? let's try a new one.
~/git/ipfs/orbit > ls -al ~/ | grep ipfs
lrwxr-xr-x     1 jbenet  staff      6 Apr 13 21:03 .ipfs@ -> .ipfs5
drwxr-xr-x     8 jbenet  staff    272 Apr 13 21:03 .ipfs3/
drwxr-xr-x     9 jbenet  staff    306 Apr  9 22:55 .ipfs4/
drwxr-xr-x     7 jbenet  staff    238 Apr  9 22:56 .ipfs42/
drwxr-xr-x    10 jbenet  staff    340 Apr 14 03:14 .ipfs5/
~/git/ipfs/orbit > rm ~/.ipfs
# i use symlinks to select repos.

# lets see if node index.js creates a repo.
~/git/ipfs/orbit > node index.js
2016-04-16T00:28:39.670Z [DEBUG] Orbit.Main: Running in 'release' mode
2016-04-16T00:28:39.673Z [INFO]  Orbit.Main: Starting IPFS...
2016-04-16T00:28:39.674Z [DEBUG] ipfs-daemon: Starting IPFS daemon
2016-04-16T00:28:39.675Z [DEBUG] ipfs-daemon: Using IPFS data directory: '/Users/jbenet/.ipfs', exists: false
2016-04-16T00:28:39.786Z [ERROR] ipfs-daemon: Error starting ipfs daemon:
2016-04-16T00:28:39.788Z [ERROR] Orbit.Main: ENOENT: no such file or directory, open '/Users/jbenet/.ipfs/config'
2016-04-16T00:28:39.789Z [ERROR] Orbit.Main: Stack trace:

2016-04-16T00:28:39.793Z [INFO]  Orbit.Index: Systems started
2016-04-16T00:28:39.794Z [ERROR] ipfs-daemon: Error initializing ipfs daemon:
# nope


# maybe it just doesnt like symlinks, try moving one of my fs-repo@2 repos.
~/git/ipfs/orbit > mv ~/.ipfs5 ~/.ipfs
~/git/ipfs/orbit > node index.js
2016-04-16T00:29:08.790Z [DEBUG] Orbit.Main: Running in 'release' mode
2016-04-16T00:29:08.793Z [INFO]  Orbit.Main: Starting IPFS...
2016-04-16T00:29:08.794Z [DEBUG] ipfs-daemon: Starting IPFS daemon
2016-04-16T00:29:08.794Z [DEBUG] ipfs-daemon: Using IPFS data directory: '/Users/jbenet/.ipfs', exists: true
# nope fails too.

# restore the symlink.
~/git/ipfs/orbit > mv ~/.ipfs ~/.ipfs5
~/git/ipfs/orbit > cd ~; ln -s .ipfs5 .ipfs; popd

# maybe it doesnt like the cache?
~/git/ipfs/orbit > rm orbit-db-cache.json
~/git/ipfs/orbit > node index.js
2016-04-16T00:30:40.559Z [DEBUG] Orbit.Main: Running in 'release' mode
2016-04-16T00:30:40.562Z [INFO]  Orbit.Main: Starting IPFS...
2016-04-16T00:30:40.563Z [DEBUG] ipfs-daemon: Starting IPFS daemon
2016-04-16T00:30:40.564Z [DEBUG] ipfs-daemon: Using IPFS data directory: '/Users/jbenet/.ipfs', exists: true
# nope. not sure what else to remove.

ECONNRESET

Hi! I'm trying to start orbit, but keep getting:

❯ node index.js 
2016-05-25T12:57:43.573Z [DEBUG] Orbit.Main: Running in 'release' mode
2016-05-25T12:57:43.575Z [INFO]  Orbit.Main: Starting IPFS...
2016-05-25T12:57:43.576Z [DEBUG] ipfs-daemon: Starting IPFS daemon
2016-05-25T12:57:43.576Z [DEBUG] ipfs-daemon: Using IPFS data directory: '/home/asbjorn/.ipfs', exists: true
2016-05-25T12:57:45.588Z [ERROR] Orbit.Main: Client request error: read ECONNRESET
2016-05-25T12:57:45.588Z [ERROR] Orbit.Main: Stack trace:
 Error: read ECONNRESET
    at exports._errnoException (util.js:893:11)
    at TCP.onread (net.js:555:26)

I can telnet the ip and port in network.json.

Can't join a channel

After connecting to the network, I can't seem to join a channel

Tried joining #ipfs and after the loading animation the page stays like this:
screen shot 2016-05-10 at 3 16 53 pm

The channelstore isn't receiving any channels after the join:
screen shot 2016-05-10 at 3 26 01 pm

running ipfs 0.4.1
node v5.6.0
npm v3.6.0

Cache emoji icons

The emoji pictures are currently downloaded on request and it makes them to "pop in" when they first appear (either in the channel messages or emoji preview).

The emojis should be cached locally in the repository in client/src/icons/emojis.

Before doing this, we need to check the license for the emojis we currently use (https://github.com/banyan/react-emoji), ie. can we package them with the app?

File URLs are off

Looks like file gateway URLs are off (urls for files posted):

  • now using: http://localhost:5001/api/v0/cat?arg=QmZQhYyhYqwiBsyybyFP9VG1nFh6CMB8o3r5U8EMRagYT9
    • API and read-write (protected) port
  • want: http://localhost:8080/ipfs/QmZQhYyhYqwiBsyybyFP9VG1nFh6CMB8o3r5U8EMRagYT9
    • Gateway and read-only port

Security notice/disclaimer in the app

(talked about it in person)

we should have a disclaimer for orbit that right now it's not private at all yet. We dont want users to accidentally think it is.

It should be somewhere clearly noticeable, maybe:

  • the login/username screen. (a short warning label underneath)
  • the "home" screen before picking a channel (before you select a channel the large pane is empty)
  • the channel interface (it could be somewhere around the message box

maybe rename Anonymous?

Anonymity in crypto and messaging tools tends to mean privacy + untraceability, so things like tor and i2p. ip addresses of requesting things could be enough. i'd recommend renaming altogether. as i've mentioned this app to others their immediate questions lead down the tor/i2p route.

Notification indicators for Electron app

The Electron apps' dock icon should display a notification indicator when new messages or highlights appear and the app is unfocused.

These can be dig out from the UI's internal highlight and mentions system and passed via Electron's IPC to the app's main process. Electron itself has a built-in support and functionality to display the icon in the dock.

Browser version should be able to save Orbit's data files

Currently Orbit can't save 'orbit-db-cache.json' file in the browser version. This is due to 'fs' not being available in the browser.

Find a library that does this. This should not cause modifications to Orbit's or it's dependencies code.

Orbit uPort integration

Orbit uPort integration

This post describes a way to relatively quickly integrate uPort with Orbit. The user will be able to use their uPort name and profile picture in Orbit as well as provision a signing key that will sign Orbit messages. It will not require any changes to the uPort mobile app.

User Flow (connecting uPort):

Orbit shows a QR code, the user scans it with her uPort app, this connects your uPort and provides Orbit with the address/identifier of your uPort (See web.whatsapp.com for the general idea). A random private signing key is generated in Orbit. Orbit displays another QR code, when scanning this the public key is added to the attributes of your uPort, stored in IPFS. (Two QR codes is not ideal UX-wise, but works without changes to the mobile app). This in effect “provisions” the Orbit key since it would be indirectly signed by your main uPort device key when data is added to the Ethereum registry. QR code scanning and related stuff is in the main uport-lib repository.

Orbit can pull the users attributes (name, photo) from the IPFS hash stored in the uPort registry, using the uport-persona library. When sending a message the Orbit user can have their uPort address in the “from” field, and they can sign the payload of their message as a JSON web token using something like this.

When another user fetches the message they can query Ethereum for the IPFS hash of attributes belonging to that identity, as well as their Orbit public signing key. They can then save these attributes locally. The public signing key is used to verify the signed messages.

Bonus

If there is interest we can also provision an encryption key in a similar way. This would allow for encrypted direct messages and group messages for predefined groups. We would need to clean up some of the encryption libraries for this.

Action items

  1. Make sure @haadcode and @jbenet has access to the uPort iOS app through TestFlight (@christianlundkvist will need their iCloud email addresses for this, does @haadcode have an iPhone?)
  2. Make sure @haadcode and @jbenet can access the uport github repos to see how to integrate
  3. @christianlundkvist can help with more detailed descriptions of the steps to integrate.

Error when joining channel - branch: orbitdbrefactor

Error when joining channel

2016-05-19T09:21:42.453Z [ERROR] orbit-db: Error: No marshaller found for encoding type 'base58'

    at /Users/dignifiedquire/opensource/ipfs/orbit/node_modules/ipfs-api/lib/request-api.js:33:21
    at /Users/dignifiedquire/opensource/ipfs/orbit/node_modules/ipfs-api/lib/request-api.js:47:8
    at finish (/Users/dignifiedquire/opensource/ipfs/orbit/node_modules/wreck/lib/index.js:214:20)
    at wrapped (/Users/dignifiedquire/opensource/ipfs/orbit/node_modules/wreck/node_modules/hoek/lib/index.js:872:20)
    at ClientRequest.onResponse (/Users/dignifiedquire/opensource/ipfs/orbit/node_modules/wreck/lib/index.js:161:20)
    at ClientRequest.g (events.js:286:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient (_http_client.js:469:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:105:23)
    at Socket.socketOnData (_http_client.js:359:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:172:18)
    at Socket.Readable.push (_stream_readable.js:130:10)
    at TCP.onread (net.js:542:20)

Message collections

It should be possible to "pin" a message to a collection.

The user should be able to have multiple collections, easily access them and move pinned messages between the lists.

Much like playlists in a music player.

Each message in the chat UI should have a "pin" button and when clicked, the message gets saved to a default "Pinned" collection.

The user should be able to add and delete collections.

The collections could be displayed in the side panel, under "Channels" section.

When a message is pinned, it should also be pinned in IPFS.

CLI for Orbit

We should have a CLI for Orbit. This can be done by wrapping src/Orbit.js.

Threaded conversations

Orbit should have threaded conversations. This means that you should be able to "reply" to a message.

I imagine this to work so that we add a "reply" button to each message in the UI and display an indicator in the "send message" field that you're replying to a message (as opposed to a new message).

If a message in the chat has replies to it, the UI (ie. a single message line) should display a counter of how many replies are in this thread and button to expand and collapse the thread. If expanded, the replies should be displayed indented under the original message. This could be done similar to the Directory view component.

This will also require a new field in the Post.Message data structure. I think it would suffice to add "replyto" field which contains the has of the message this message is a reply to. In the UI, one can then check if the "replyto" field is set and render the message accordingly.

I'd be happy to hear other suggestions as to how this would be displayed in the UI.

Timestamp issues

Sometimes users' timestamps differ from each other causing messages to "pop in" to the message history instead of shown at the bottom (latest).

The timestamp can differ only a few seconds or it can differ a few minutes based on users' settings.

The timestamp is generated in Post (ipfs-post) using new Date().getTime().

Before fixing this, I'd like to understand why the discrepancy of a few second to a few minutes. How is that possible? What solutions are there to make all the timestamps the same?

Can't run :(

Pulled the code down and then tried

  1. grunt -> open dist/Orbit-darwin-x64/Orbit.app/ -> empty app started
  2. cd client && npm i && grunt serve, in another terminal electron .
    • if in / then the error is App threw an error when running [Error:``/Users/dignifiedquire/opensource/ipfs/anonymous-networks/node_modules/fibers/bin/darwin-x64-v8-4.7/fibers.node is missing. Try reinstalling node-fibers?]``
    • If in /client then the error is from electron:
App threw an error when running [Error: `/Users/dignifiedquire/opensource/ipfs/anonymous-  networks/node_modules/fibers/bin/darwin-x64-v8-4.7/fibers.node` is missing. Try reinstalling `node-fibers`?]

Emoji auto complete and preview

When the user types :, an emoji preview should appear. The emoji preview displays all available emojis.

The preview automatically updates the available emojis based on the user input:
: --> display all emojis
:he --> display all emojis starting with he
:smile --> display all emojis starting with smile

User should be able to press tab to cycle through the list of available emojis.
If the user cycles through the available emojis using tab, the emoji is select when user presses space or return. When an emoji is selected (after pressing space or return), the emoji preview should close.

The emoji preview should display the emoji picture only (no text). If the user cycles through the available emojis, the text in the input field should change to the select emojis, eg: :hea --> press tab --> input field should say: :heart:.

If the emoji preview is shown and the user presses esc, the emoji preview should close.

Extra: User should be able to select an emoji from the preview using left arrow and right arrow.

The emoji preview should be an absolutely positioned <div>. It should be located as close to the input text field as possible. However, it should not be in or on the input text field. The visual style should follow Orbit's general style.

Keyboard shortcuts

The user should be able to use to a keypress combination to access the following features/actions in Orbit:

  • open channels panel
  • close channels panel
    • should be the same key with open channels panel
  • next channel
  • previous channel
  • open settings
  • upload file modal
  • join channel input
    • one key to bring up the join channel input field in the channels panel
  • leave channel

The keyboard shortcuts should work in all platform versions. The default shortcuts should not interfere with the context's (browser, electron/native, operating system) existing behaviour and shortcuts.

Ideally the shortcuts are customisable in Settings but this is not required.

Ideas for other shortcuts/actions highly welcome!

Reduce client build (main.js) size

I went to orbit.libp2p.io on a pretty good network in Lisbon and it took a long time to work (at first i didn't know what was up). Turns out main.js is 7.5MB. Can we do something about load time? I don't feel very comfortable sending the link to people in non-great networks having this extra thing to explain.

To reduce the size, maybe:

  • minify (it's not minified AFAICT)
  • version-flatten or shed library deps?

To reduce loading time, maybe:

  • progressive download? (instead of one big bundle, pull in pieces as needed?)
  • have a loading bar? or loading animation, that's clear about total size downloaded?
  • load it

Maybe notify users of download size? it's important to let users know a large download is happening, because some people in mobile networks may pay through the nose per MB.

Rename the project

Anonymous Networks was always a project name. "Anonymous" is misleading and causing confusion.

I'd like to rename the app to something better. Possibly with interplanetary inspiration behind the name :)

Suggestions welcome!

Automatically join channels on start

The client should join pre-defined channels at startup, after Orbit is connected successfully.

Where to define the channels is to be decided (can be a json file, in ipfs, in orbit-db, etc.)

Integrate with a running daemon

At the moment there are errors thrown when I already have a daemon running, but if I'm trying to run multiple ipfs apps in parallel and they all want to bring their own daemon this present an issue for me.

Reduce Electron app's startup time

Currently, the Electron app's initial startup time can take anything from a couple of seconds to ten. This is due to booting up the go-ipfs daemon first and only then displaying the "login" screen.

To fix this, we should display index.html immediately and start go-ipfs daemon after that (or in parallel). We should also display a "Loading..." text while loading in more assets or starting ipfs daemon.

Messages should support simple markdown

It should be possible to add markdown to messages.

There isn't a implementation for proper multi-line messages atm. so this could be a limited markdown, a subset.

I'm thinking the following should be included:

  • Italics
  • Bold
  • Code block
  • Strikethrough

The markdown should be parsed from the message before rendering. This can be done similar to emojify and linkify parts of the message rendering.

Media player component for the client

Orbit supports playing media (video + audio) directly from IPFS files. However, the browser version and Electron version do it differently due to their respective platform constraints.

Browser version uses MediaSource API which in itself is limited and has a major drawback: you need to know the specific codec for video before you can start playing.

Electron version can (could) use the localhost IPFS gateway to stream videos directly to

That still leaves the problem of browser-only version having limited capabilities, so we need to find a solution that ideally supports both.

I'm thinking we should find a video (/media) player component that can play media with ease.

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.