GithubHelp home page GithubHelp logo

daviddahl / wut Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 1.0 1.7 MB

Libp2p / IPFS terminal-based chat

License: MIT License

JavaScript 100.00%
ipfs tweetnacl-js serverless chat social-proof privacy decentralized distributed peer-to-peer libp2p

wut's Introduction

¿wut?

Serverless, IPFS, Tweetnacl-js-based chat application for terminal in an ncurses style

Goals

Things to do, ranked

  • DM UI is broken and needs UX love
  • Tab-completion of peer names, commands
  • Tab / arrows to focus UI elements
  • Social Proofs, see: https://github.com/IBM/ipfs-social-proof
  • Tests
  • DMs List UI
  • Paste screenshots into chat
  • Keys / keychain persistence
  • Key stretching / BIP-39 password for keychain, configuration data.
  • Keybase-style UI layout
  • Encrypted file sharing via tweetnacl-js & IPFS file storage
  • SES-based plugins, (See: Secure ECMAScript https://github.com/Agoric/SES-shim )
  • Group encrypted chat
  • Child_process for IPFS, workers for crypto? Discuss.
  • Emojis
  • Encrypted message persistence in IPFS via OrbitDB, js-threads?

Fixed

  • Major issue: Make pubsub work outside local networks: Works now via webrtc-star server as bootstrap node
  • Serverless 'lobby' chat multiple participants
  • Serverless E2E encrypted chat for 2 participants (at first)
  • As nerdy as possbile, hence the ncurses style

Install

Requirements: node 12, yarn

See signaling server and client configuration README.md first:

npm install -g yarn

git clone [email protected]:daviddahl/wut.git

cd wut

yarn install

node main.js

Testing

yarn test

wut's People

Contributors

atofstryker avatar daviddahl avatar

Stargazers

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

Watchers

 avatar

Forkers

jumpersdevice

wut's Issues

Encoding / CID Problem?

on node signal-server/server.js I get

Signaling server running at /ip4/0.0.0.0/tcp/15555/ws/p2p-webrtc-star
(node:49766) UnhandledPromiseRejectionWarning: Error: Code 249728983 not found
    at Object.exports.getCodec (/home/jacob/projects/wut/node_modules/multicodec/src/index.js:64:11)
    at new CID (/home/jacob/projects/wut/node_modules/cids/src/index.js:82:33)
    at new CID (/home/jacob/projects/wut/node_modules/class-is/index.js:15:17)
    at mh2buf (/home/jacob/projects/wut/node_modules/multiaddr/src/convert.js:130:14)
    at Function.convertToBuffer [as toBuffer] (/home/jacob/projects/wut/node_modules/multiaddr/src/convert.js:76:14)
    at /home/jacob/projects/wut/node_modules/multiaddr/src/codec.js:96:35
    at Array.map (<anonymous>)
    at stringTuplesToTuples (/home/jacob/projects/wut/node_modules/multiaddr/src/codec.js:90:17)
    at stringToBuffer (/home/jacob/projects/wut/node_modules/multiaddr/src/codec.js:182:13)
    at Object.fromString (/home/jacob/projects/wut/node_modules/multiaddr/src/codec.js:189:10)
(node:49766) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:49766) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Trying to debug this is a mess (I was also configuring webrtc-star just as you had when I saw your issues on it). Thinking your config would work as I envisioned ours architected (we're working on p2p-prolog), I still end up with more gotchas.

I'd love to hear back from you to see if this actually works based on some breaking changes that keep happening with webrtc-star. Unfortunately if we don't make any headway with libp2p we may have to simply go with Humblenet or just plain wrtc.

Establish persisted data

We will need to establish a data model for the persisted data each client will want to keep trak of including account information, keys etc...

Thi smay blle dinto how we night use a local database for archiving conversations locally and in IPFS

Persist keys

[ ] persist nacl keys
[ ] persist PeerInfo Keys for libp2p node

Fix DM UI

The UI is broken right now - probably a promise is swallowing an exception somewhere.

node main.js meet error

internal/modules/cjs/loader.js:807
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: dlopen( /wut/node_modules/wrtc/build/Release/wrtc.node, 1): no suitable image found. Did find:
/wut/node_modules/wrtc/build/Release/wrtc.node: truncated mach-o error: segment __TEXT extends to 12103680 which is past end of file 1287608
/wut/node_modules/wrtc/build/Release/wrtc.node: truncated mach-o error: segment __TEXT extends to 12103680 which is past end of file 1287608
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/wut/node_modules/wrtc/lib/binding.js:6:20)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)

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.