~ev/news

A secure news format + a simple news app and server
ok we had a missing parameter in composer
see if taking away the settimeout fixes the keys error on replies
rewrite websocket handler as a Map (per deno chat server example)

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~ev/news
read/write
git@git.sr.ht:~ev/news

You can also use your local clone with git send-email.

#news

#When you're a public figure publishing on an open channel, it's news.

  • A simple and secure news format using sha256 hashes + ed25519 signatures
  • A news client for reading and writing messages that sends these messages to x servers via websockets
  • A news server to store messages for later retrieval and to relay messages between clients
  • A static news site to display news links

All of this is written in Deno and browser JavaScript.


News consists of three parts:

#The news protocol

The news protocol consists of three Base64 encoded strings:

<sha2hash><ed25519pubkey><ed25519signature>

The sha2hash is a hash consisting of your ed25519pubkey and the ed25519signature of the message.

The reason that we concatenate these three strings, instead of using an object, is that we can use our browser's URL bar to exchange messages.

example: "Hello World" Embed

This means that even if a server is down or otherwise not replicating messages, we can use another channel to deliver our news.

Because URL bars don't seem to handle messages longer than 2000ish characters, the news platform doesn't provide easy to access embed links for these server-free messages.

#The news platform

The news platform is a news discussion platform on which you can create news posts.

To run it on your own computers, clone this repo and type:

deno run -A --unstable denoserver.ts

and in a seperate window run the Deno static web server:

deno run --allow-net --allow-read https://deno.land/std@0.50.0/http/file_server.ts

and navigate to http://localhost:4500/

Or try it at http://news.evbogue.com/

On the news platform you can write posts that contain text and images. Images are automatically cropped to a 500px square, to keep the size of messages manageable. You can apply css filters to images using a dropdown in the composer.

When you publish a message it will be saved in the news protocol format, next the message will be replicated across the servers you are connected to and the clients that are connected to those servers.

The news platform will send you a post if you request a sha2 hash that it is in possession of. It will also replicate messages posted by other news publishers who have active sessions with the servers to which you are connected.

In addition, when you request a news link, a news platform server will also send the link to all other open client sessions. So if you click this link below:

example: cup of coffee news photo

Your client will connect to the default news servers, it will request the message using the sha2 hash in the url bar, and the server will send the message to all of the currently connected news platform clients who are connected to the servers you requested the message from.

#The news site

The news site is a static website which hosts news links. I use it at my website to show my latest 9 photos and my latest 9 posts. When you click the links they will take you to the associated news platform website and the post should load.

deno run -A --unstable site.js

Navigate to http://localhost:9999/

Note: you may see nothing if you have no posts to display from the author configured.

example: evbogue.com

#Issues

Post them to http://news.evbogue.com/ -- if website doesn't work for you, email me at ev@evbogue.com, please include your console errors.

I'm also in #newsapp on freenode -- /join to share news links and handle issues.

#FAQ

  • How is this different from your bogbook?

Bogbook uses append-only logs, which means you need to replicate an entire feed to see the latest messages. News messages are much more flexible, so you can create messages using the same keypair on different devices and you can delete messages from servers and clients without having to delete all of the messages from an author.

#Merges needed:

  • more filters

-- MIT