Welcome to Daml Chat! A Daml app that can be deployed to Daml Hub.
Copyright (c) 2020, Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. SPDX-License-Identifier: Apache-2.0
Log in to Daml Hub and create a new ledger under an existing or a new project.
ℹ️ The rest of the steps are only necessary if you want to build the source code. If all you care about is deploying the app then you can do so by logging in to your Daml Hub workspace, locating the Daml Chat tile in the Sample Apps section and clicking Deploy.
- 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 Daml Hub account
ℹ️ If you are only interested in deploying Daml Chat, then all you need is a Daml Hub account!
git clone https://github.com/digital-asset/dablchat.git
make clean && make package
This will create a versioned daml-chat-model-x.x.x.dar
file containing the compiled Daml model, a daml-chat-operator-bot-x.x.x.tar.gz
and daml-chat-user-bot-x.x.x.tar.gz
tarballs containing the python automation, and a daml-chat-ui-x.x.x.zip
archive containing the UI static assets. These files will live under the target/
directory along with a zip archive in the form of a dabl integtation (daml-chat-x.x.x.dit
), containing all of them.
Upload the the model, bots and ui files to your Daml Hub collections. Then drag and drop the each one of them to your newly created ledger.
Click on your ledger and configure the daml-chat-operator-bot
to run as the UserAdmin
party and the daml-chat-user-bot
as your user. The daml-chat-ui-x.x.x.zip
will automatically be published to the subdomain containing your ledger id. <your-ledger-id>.projectdabl.com
.
In the Live Data tab of your ledger confirm that a Chat:Operator
contract has been created under UserAdmin.
You can find the subdomain url of your Daml Chat app in the Deployments tab. Share it with your users and you are ready to go!
The UI portion of this app was inspired by React Direct Messaging Example by Pusher.