Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 3.17 KB

README.md

File metadata and controls

62 lines (39 loc) · 3.17 KB

DABL Chat

Download License CircleCI

Welcome to DABL Chat! A DAML app that can be deployed to project:DABL.

Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. SPDX-License-Identifier: Apache-2.0

Getting Started

1. Create a ledger to run DABL Chat on

Log in to project:DABL and create a new ledger under an existing or a new project.

ℹ️ Steps 2 to 4 are only necessary if you want to build the source code. If all you care about is deploying the app then download dabl-chat.zip and proceed to step 5.

2. Prerequisites

  • Git (to clone the repository)
  • The DAML SDK (to build the model)
  • Pipenv (to select Python version)
  • Python 3.6 or later (to build operator bot)
  • yarn (to build UI)
  • A project:DABL account

ℹ️ If you are only interested in deploying DABL Chat, then all you need is a project:DABL account!

3. Clone this repo

git clone https://github.com/digital-asset/dablchat.git

4. Build your DAML model and automation

make clean && make package

This will create a versioned dablchat-x.x.x.dar file containing the compiled DAML model, a dablchat-bot-x.x.x.tar.gz tarball containing the python automation, and a dablchat-ui-x.x.x.zip archive containing the UI static assets. These files will be zipped into a dabl-chat.zip under the target/ directory.

5. Upload and deploy to DABL

Unzip and upload the three files to your project:DABL collections. Then drag and drop the each one of them to your newly created ledger.

6. Set up your automation and UI

Click on your ledger and navigate to the Automation tab. Click on change next to Running as: and redeploy the bot as your user. Then go to UI Assets and click on Publish next to dablchat-ui-x.x.x.zip to host your static assets.

7. Invite your users

In the Live Data tab of your ledger confirm that a Chat:Operator contract has been created under your username. Click on Add Party and start adding the users you want. Each user you added should now have a DABL.Ledger.V3:LedgerParty contract as well as a Chat:UserInvitation contract.

8. Log in and start chatting!

You can find the subdomain url of your DABL Chat app in the UI Assets tab. Each user you added can now navigate to that URL and use their name and JWT token (found in the Ledger Settings tab) to log in and start chatting!

Credits

The UI portion of this app was inspired by React Direct Messaging Example by Pusher.