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
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.
- 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!
git clone https://github.com/digital-asset/dablchat.git
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.
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.
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.
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.
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!
The UI portion of this app was inspired by React Direct Messaging Example by Pusher.