Quick Start

1

Create MarsApp Address

Use the command line tool to create a new MarsApp project and obtain a unique address:

relayx-cli create

Upon successful creation, you will receive:

  • 📍 MarsApp Unique Address: This is your application's unique identifier on the MarsX Network

  • 🔑 Owner Account: Used for signing operations on the MarsApp

  • 🚀 Master Account: Used for publishing the MarsApp to the network

Generated directory structure:

{RelayAppAddress}.config/
├── config.json          # RelayApp configuration file
├── owner.json           # Owner account information
├── master.json          # Master account information
└── agents/              # Agent account folder

After creation, a config.json configuration file will be generated in the current directory.

circle-exclamation

📖 View detailed create command documentation →arrow-up-right

2

Prepare Frontend Code

Environment requirements:

  • Node.js 16.0 or higher

  • Git version control tool

Clone the official template project and start development:

# Clone the template project
git clone https://github.com/RelayX-Protocol/RelayApp-React-Template.git
cd RelayApp-React-Template

# Install dependencies
npm install

# Configure RelayApp address to environment variable

# Replace your_relayapp_address with the RelayApp address created in Step 1
echo "VITE_RELAYAPP_ADDRESS=your_relayapp_address" > .env.production

# Build the frontend application
npm run build

📖 View detailed React template documentation →arrow-up-right

3

Sign and Package

Rename the built frontend files to the MarsApp address, and ensure the .config configuration directory is at the same level as the project folder.

🔔 Important Note: The relayx-cli tool is installed globally, so you only need to execute commands in the working directory that contains both the project folder and configuration folder.

Required Directory Structure:

workspace/
├── 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m/          # RelayApp project folder (frontend build output)
   ├── index.html
   ├── assets/
   └── ...
└── 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m.config/   # Configuration folder
    ├── config.json
    ├── owner.json
    ├── master.json
    └── agents/

Operation Steps:

# 1. Create working directory
mkdir -p workspace

# 2. Copy the built frontend project to the working directory
cp -r 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m workspace/1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m

# 3. Move the configuration directory to the working directory
mv 1J7JEhjW1wHhaw1ZtDxAdjuehapRa7og1m.config workspace/

# 4. Enter the working directory
cd workspace

# 5. Execute signing
relayx-cli sign
circle-info

Key Points:

  • The naming of the project folder and configuration folder must strictly follow the format {MarsAppAddress} and {MarsAppAddress}.config

  • All subsequent relayx-cli commands must be executed in the working directory (workspace) that contains both folders

After successful signing, you can proceed with the publishing operation.

📖 View detailed sign command documentation →arrow-up-right

4

Apply for Release Certificate

  1. Open the MarsX Certificate application in the MarsX client (such as MarsCat)

  2. Apply for release certificate according to the interface instructions

  3. After obtaining the certificate, import it using the command line:

relayx-cli import --cert "YOUR_CERTIFICATE"

📝 Note: The publishing certificate is used to verify your identity, ensuring that only authorized users can publish MarsApp.

📖 View detailed certificate application and management guide →arrow-up-right

5

Publish MarsApp

After completing certificate import, publish your application to MarsX Network:

relayx-cli publish

Upon completion, the publishing status will be returned.

📖 View detailed publish command documentation →arrow-up-right

6

Verify Publication

View the publication information and status of your MarsApp:

relayx-cli info

This command will display detailed information such as your MarsApp address, version number, and publication status.

📖 View detailed info command documentation →arrow-up-right

7

Test Run

After publishing is complete, you can test the application in the following ways:

  1. Open the MarsX client (such as MarsCat)

  2. Search for your MarsApp address (the address created in Creation step) in the MarsApp list

  3. Download and run the MarsApp for testing

✅ Complete: Congratulations on successfully publishing your first MarsApp!

Further Learning

After completing the development of your first MarsApp, it is recommended to dive deeper into the following content:

If you encounter any issues during development, please refer to the official documentation or seek help through official channels.

Last updated