Project setup

Environment setup

Make sure to first setup your computer for trinity.

Creating a new app

Open a terminal at the location you want your application to be created. A subfolder will be created for you. Then run the following command

$ trinity-cli new

Provide a few information such as your app name, package name, author information, and a new folder will be created with your DApp.

The created application uses the ionic framework. It simply embeds an additional manifest.json file to be considered as a trinity application.

Converting an existing ionic app to a trinity DApp

In case you already have a ionic application, and would like to run it inside trinity, you have to generate a trinity manifest to make it become compatible.

Enter your ionic app’s folder then run the following command:

$ trinity-cli manifest

Learning Ionic

For more detail about Ionic, please visit here. You can build any kind of ionic-based application in Elastos, as the whole ionic framework is available. In addition, Elastos plugins are available too, such as carrier, hive, or access to payments and digital identities (DID).

Running your DApp on Android


  • Trinity must be installed on your device
  • Connect your device to your computer using a USB cable.
  • Make sure android adb is in your path.

Enter your app’s folder in a terminal then run the following command:

$ trinity-cli run -p android

That will package your application as a EPK file, send it to your device, install it inside Trinity, and run it.

Developping your DApp

After your app is launched inside trinity, you can directly edit your app content from its src/ folder. Changes will automatically reload in trinity.

Trinity DApps manifest

A manifest.json file is created by default in your trinity DApp project. You can manually edit it whenever needed. The Trinity manifest format is fully described in the trinity manifest guide.