GithubHelp home page GithubHelp logo

backchannel's People

Contributors

daiyi avatar herbcaudill avatar okdistribute 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

altoplano

backchannel's Issues

Use a wordlist

EFF did a good job in creating a separate wordlist that is more user-friendly than the PGP wordlist. See here for an example of an even shorter + more user-friendly word list.

One-to-many sending

Click on multiple contacts to send the same message or file to all of them at once

Mailbox: Location sharing

Share my location with others, either real-time or one-off pin. The real-time use case needs some UX thinking!

Reset handshake

If someone loses the key, they can currently solve this problem instead by making a new contact for that person. That isn't so nice because you lose the history.

There could be a case where your contact has lost their device or accidentally deleted their encryption key. A "reset handshake" function would send the user back to the handshake screen, and then the new key would replace the old contact's key.

This is a stretch goal because it is actually a not straightforward to implement & test well, because it breaks the typical user flow in the UI and will require custom logic.

Database

Create a wrapper for managing the database.

  • spec out a minimal API that covers the use cases in the architecture docs
  • then build that out as a separate directory in this repo that the front-end can use
  • add browser tests

Contact List: styling

Once you properly connect to another contact for the first time and get their symmetric key, you can create a moniker for them. Contacts show up in a list when you first open the app. (see left side)

When you click on a contact, it opens up their mailbox (right side) #14

Browser testing framework

We probably want to use something like airtap.

Minimally, we can target the latest version of chromium. Ideally, we could hit the big three: Chromium, Firefox, and WebKit (for iOS support).

Improve performance with a webworker

  • Persist changes separately, don't call Automerge.save so much, it's inefficient
  • Use Automerge.Backend/Frontend similar to pvh/automerge-demo (optional)
  • Put the backend in a webworker

UI: Render emojis

Make sure we can render emojis that are typed in by mobile keyboards. If this isn't possible within the time we have, that's OK but ideally it seems like people will use them.

race condition in tests

Not sure why, but the tests fail sometimes. There isn't good debug output. If it fails, you can rerun the tests and it will probably pass the next time. My guess it probably is due to the mock WebSocket implementation, it is the most buggy thing we have in the testing stack..

Metrics per day

Count the number of connections per day & total amount of data transferred through the relay without any metadata.

Multidevice: Purge all devices backend

There isn't a way to purge all devices you're synced with right now, which would require putting tombstones on old documents and telling all your contacts about the new keys. This may be difficult to accomplish on this round of work so I've added a stretch label.

Mailbox: Send and receive files API

This should be something like

backchannel.sendMessage(contact, message)

where message optionally contains a filename on the local device.

We probably also want a nice API for downloading or opening the file on your local device.

Handshake: Error styling

If there is an error while waiting for the contact to enter the code, show the error text at the bottom part of the screen.

Contact List: Presence

Problem

I want to know when one of my contacts is currently online

How to get there

There's a client event from backchannel we can use for connected and disconnected, as well as an isConnected api call

backchannel.on('contact.connected', ({ socket, contact }) => {
   // update presence
})

backchannel.on('contact.disconnected')
backchannel.isConnected(contact)

Mailbox: Settings

Every contact has some basic settings to customize. For a basic prototype, let's include three:

  • Edit the contact
  • Delete this contact

Use # hash at the end of URL to redeem a wormhole

Problem

Right now, you have to manually enter a code into the input box and click 'redeem' to finalize the connection.

Feature request

Ideally, you could get sent a URL that will automatically open the application and redeem the connection. For example,

https://backchannel.app/redeem#8-happy-elephants

The code should be in the hash of the route, so that the code is not being sent over the internet at all and only used by the javascript client.

How to get there

On the receiver's side, we would need to have a route /redeem (or whatever) that captures the hash in the URL and then calls the redeem function with that code. We'd want to show the wormhole connection animation for at least a second, and then show the success or error screen.

On the sender's side, when you click 'generate code' it would need to give you a way to copy/paste or share the /redeem URL to a friend.

For bonus points once we have the PWA installed, we also then need to put special metadata in the web manifest file for the PWA. For example, https://developers.google.com/web/fundamentals/integration/webapks

Multidevice: Frontend

The multidevice screens & walkthrough UI should hopefully be pretty straightforward once ben settles on the flow.

Multidevice: Backend API

We could use @localfirst/auth, which gives us revocation for free, but each device has it's own keypair

  • Decide on a protocol to use (automerge)
  • Add a new device
  • Sync all contacts
  • Remove all devices I'm synced with (rotate/reset my keys)

Test cases

  • Create a device (ALICE), create one contact, add a device (BOB), sync devices, see contact on other side.
  • Same as above, then edit contact on BOB, sync devices, see contact change on ALICE.
  • Create a device (ALICE), create three contacts, add a device (BOB), sync devices, see contacts on BOB. Remove a contact from ALICE, sync devices, see 2 contacts on BOB.

Encrypt contacts

Right now the contacts are sent unencrypted over the wire which means an eavesdropper could download your contact list. This should be straightforward to fix once we figure out the best way to serialize and deserialize automerge binary sync messages (uint8arrays) over a websocket connection

Multi-user documents

Problem

A user wants to add multiple other devices to the same document. Many-to-many interaction (i.e., all people can see all changes from other people on the document)

Solution

I think this is a decent solution that solves the cryptography for us:

https://github.com/local-first-web/auth

Intro screen

See figma, it shows up the very first time you load the application, and generates a key.

Mailbox: Files UI

The UI should allow you to enter text and/or files as a single message, as well as download files sent from the past. The files should download and/or open in the default app on your device, we can play with this user experience and see what's best on mobile & desktop.

Message mailbox UI

We want to build the UI for the mailbox.
This screen should show after you've hit 'redeem' on a code, or if you open an existing contact on the contact list screen. Contact list captured in issue #15

Catch & display uncaught errors

Right now the frontend just crashes if you have an unexpected error. We should probably have a global error boundary for this using a React component/provider.

The easiest way to reproduce this now is to try to send a message to a contact who is currently offline.

Mailbox: More clear feedback when app is loading

When using a remote relay, when the chats are loading it takes a second for anything to show up. We probably need some sort of loading spinner here, or better yet make it really snappy so that this doesn't happen at all when you have local chats (in theory it's local first so it should be snappier?)

Screen.Recording.2021-05-21.at.2.40.53.PM.mov

Properly handle all application states

The app right now is just one big App.tsx file. As the app gets more complex, it might be nice to have a proper state machine with each screen in a different component. For example, there is a separate screen before a user generates a code, and then another screen when we are waiting for the other side to redeem it, and then another when the connection is successful, and another when there is a failure.

See the possible application states here (so far)! The original is in the Miro board.

npm run deploy

Set up a production build at npm run deploy that outputs to dist and builds on every PR. It would also be nice if it built the docs to dist/docs/ which we could link to!

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.