orbitdb-archive / orbit Goto Github PK
View Code? Open in Web Editor NEWA distributed, serverless, peer-to-peer chat application on IPFS
License: MIT License
A distributed, serverless, peer-to-peer chat application on IPFS
License: MIT License
Pulled the code down and then tried
grunt
-> open dist/Orbit-darwin-x64/Orbit.app/
-> empty app startedcd client && npm i && grunt serve
, in another terminal electron .
/
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
?]``/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`?]
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?
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:
clean
target in a Makefile
/ Gruntfile
)orbit-data
or something.Looks like file gateway URLs are off (urls for files posted):
http://localhost:5001/api/v0/cat?arg=QmZQhYyhYqwiBsyybyFP9VG1nFh6CMB8o3r5U8EMRagYT9
http://localhost:8080/ipfs/QmZQhYyhYqwiBsyybyFP9VG1nFh6CMB8o3r5U8EMRagYT9
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.
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.
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.
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.
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
.
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?
This issue is to gather all information regarding Orbit's development plan for Q3/2016.
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:
Code block
The markdown should be parsed from the message before rendering. This can be done similar to emojify and linkify parts of the message rendering.
I'm collecting all errors I see while running it in here so we have a place to find them
Also: https://github.com/diasdavid/js-libp2p-swarm/issues/75
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.
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.
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.
(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:
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.
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:
To reduce loading time, maybe:
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.
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.)
We need to be able to set them to https://webrtc.orbit.ipfs.io
and https://pubsub.orbit.ipfs.io
(or anything really).
This needs to happen very soon so we can e.g. run orbit on https://orbit.ipfs.io.
Originally proposed here: #6 (comment)
Some emojis don't get rendered in the channel even though they are supported and render fine in the emoji preview.
This is most likely a bug in TextMessage.js _emojify(...)
where the text is converted to emoji images.
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.
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)
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.
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.
The user should be able to write multi-line messages
We should have a CLI for Orbit. This can be done by wrapping src/Orbit.js.
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.
Reflux 0.5 will bring ES6 Stores and simplify the Stores even further. We need to refactor all stores to use the new syntax.
More info: https://github.com/reflux/refluxjs#react-es6-usage
The user should be able to use to a keypress combination to access the following features/actions in Orbit:
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!
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!
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.
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])
would be nice if orbit:
node index.js --repo <repo-path>
IPFS_PATH
(go-ipfs does) -- env vars have no place in apps. but maybe for development its ok. not sure.sorry, i need to understand the internals better to provide good suggestions. maybe @diasdavid has better thoughts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.