GithubHelp home page GithubHelp logo

clydedacruz / cordachat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ragmondo/cordachat

0.0 1.0 0.0 47 KB

CordaChat - a simple demo app in ~200 lines of code that implements a basic chat program on top of Corda

License: Other

Kotlin 87.79% CSS 12.21%

cordachat's Introduction

CordaChat

This app demonstrates how to build a simple chat program on top of the Corda framework.

To run it locally, follow these instructions:

  1. Download the DemoBench tool or build it yourself from the main source repository. We will use this to run the nodes.
  2. Run gradle build to compile the CordaChat JAR.
  3. Start DemoBench, add the app JAR you can find in build/libs/cordachat.jar and then start a notary and a couple of nodes. I tend to call them Alice and Bob.
  4. Now you have two nodes running the app, open this project in IntelliJ and use the two run configs to start the GUI for Alice and Bob. They can chat to each other in separate windows.

How does it work?

CordaChat is about 200 lines of Kotlin code. It starts by defining a simple state which holds a message, along with who it is from and who it's to. The contract logic just ensures messages are signed by the party it claims to be from.

Then there's a flow to send a chat, which just creates and signs a transaction holding a message.

Then finally, there's the JavaFX GUI, which just downloads the vault and network map contents, binds them to the UI and handles events.

Future extensions

  • Chat rooms, perhaps once data distribution groups are added to the platform.
  • Try setting up nodes on the testnet.
  • Use business networks to establish sub-sets of a wider zone, to narrow down the parties in the sidebar.

cordachat's People

Contributors

richardblocksure avatar

Watchers

James Cloos 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.