DEV Community

TMTP messaging protocol
TMTP messaging protocol

Posted on • Updated on

An online demo of a localhost web app

The mnm project is building a legitimate replacement for email — a client, a server, and a simple protocol (TMTP) between them. The mnm client[1] is a localhost web app. Recently I posted an online demo of the client.

A localhost web app runs locally on your PC or phone, and displays its UI in a browser page. (Jupyter Notebook is the best known example.)

On the websites of desktop and phone apps, you'll find screenshots. Static images in an inherently interactive medium — what?! But if you've written a localhost web app, you can simply peel up its browser UI and affix it cleanly to your website. Well, you can if you've architected it correctly...

Your browser code needs two features:

  1. A separate module with an API that sends messages to the localhost app.
  2. An updates API to handle messages from the localhost app, which is invoked by callbacks in the module. It typically updates the page using reactive variables that affect the DOM via Vue.js or React (etc).

To turn this into an online demo, you only need reimplement the module to emulate the behavior of the real app, and serve the browser code from your website.

Try the mnm online demo.
Follow mnm on Twitter.

[1] https://github.com/networkimprov/mnm-hammer

Discussion (2)

Collapse
patarapolw profile image
Pacharapol Withayasakpunt

not mobile friendly?

Collapse
mnmnotmail profile image
TMTP messaging protocol Author • Edited on

The mnm client app currently supports Windows, MacOS, and Linux, so the UI is designed for PC screens. A mobile version is planned.

The demo should work on phones & tablets in landscape mode, but hasn't been tested there.