GithubHelp home page GithubHelp logo

doytsujin / messaging Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mheinzel/messaging

0.0 1.0 0.0 482 KB

An experimental chat application with terminal, GTK and web clients, all written in Haskell.

License: Other

Haskell 98.12% Nix 1.88%

messaging's Introduction

messaging

screenshot terminal client

A real-time chat application. Users can connect under a username, join and leave conversations, and send messages that all other conversation members will receive.

There are plans to add features and explore the privacy and security aspects, but currently there are many limitations, e.g.:

  • No persistence, so users only receive a message if they are online when it is sent, and restarting the client loses all conversation history.
  • No encryption except for TLS, the server can read your messages.
  • Error handling/recovery in the clients is not great.

Package structures

package structure

  • messaging-shared defines the client-server interface in the form of Request and Response data types and how they are serialized.

  • messaging-server (executable) provides a websocket endpoint clients can connect to. It manages users, conversations and most importantly, delivery of messages between the clients.

  • messaging-client-core contains code to manage UI-independent client state and the websocket connection to the server. To keep the UI thread responsive, it starts threads for sending and receiving messages, and channels to communicate with them.

  • messaging-client-web (executable) uses GHCJS and Miso to generate a JavaScript client with corresponding HTML/CSS.

  • messaging-client-gtk (executable) offers a basic cross-platform GTK client.

  • messaging-client-terminal (executable) offers an ANSI terminal UI client. On Windows it’s only usable with the Windows Subsystem for Linux (WSL) due to problems with the GHC runtime system (expected to be fixed with the new Windows I/O manager coming in GHC 9.2).

  • ansi-terminal-declarative-simple is a simple declarative terminal UI framework, with an update/view API similar to gi-gtk-declarative-app-simple and miso.

Demo

Depending on when you are reading this, there might be a server and web client at https://mheinzel.com/messaging. If so, you can also connect to the server with the native clients using the --uri wss://mheinzel.com/api/messaging option.

Please note that is just a simple demo of a very experimental project, so don't make any assumptions about its availability, security or privacy. Use at your own risk and don't do something that forces me to take it offline.

Build instructions

Most components are straight-forward to build using Stack. However, the GTK client requires GTK to be installed on your system and the web client is best built using Nix.

Please check the individual executables' own READMEs for details.

More screenshots

screenshot gtk client

screenshot web client

messaging's People

Contributors

mheinzel avatar kumodatsu avatar nathanoerlemans avatar

Watchers

 avatar

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.