> For the complete documentation index, see [llms.txt](https://support.marscat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.marscat.io/getting-started-guide/quick-start.md).

# Quick Start

{% stepper %}
{% step %}

### Create MarsApp Address

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

```bash
relayx-cli create
```

Upon successful creation, you will receive:

* 📍 **MarsApp Unique Address**: This is your application's unique identifier on the RelayX 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.

{% hint style="warning" %}
⚠️ Important Notice: You must edit the `config.json` file according to your actual requirements for custom configuration, otherwise the application may not function properly.
{% endhint %}

📖 [View detailed create command documentation →](https://support.marscat.io/development-tools/relayx-cli/command-explanation/create.md)
{% endstep %}

{% step %}

### Prepare Frontend Code

Environment requirements:

* Node.js 16.0 or higher
* Git version control tool

Clone the official template project and start development:

```bash
# 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 →](https://github.com/RelayX-Protocol/RelayApp-React-Template)
{% endstep %}

{% step %}

### 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:

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

Operation Steps:

```bash
# 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
```

{% hint style="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
  {% endhint %}

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

[📖 View detailed sign command documentation →](https://support.marscat.io/development-tools/relayx-cli/command-explanation/sign.md)
{% endstep %}

{% step %}

### Apply for Release Certificate

1. Open the RelayX Certificate application in the RelayX 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:

```bash
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 →](https://support.marscat.io/development-tools/certificate-management/application-process.md)
{% endstep %}

{% step %}

### Publish MarsApp

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

```bash
relayx-cli publish
```

Upon completion, the publishing status will be returned.

[📖 View detailed publish command documentation →](https://support.marscat.io/development-tools/relayx-cli/command-explanation/publish.md)
{% endstep %}

{% step %}

### Verify Publication

View the publication information and status of your MarsApp:

```bash
relayx-cli info
```

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

[📖 View detailed info command documentation →](https://support.marscat.io/development-tools/relayx-cli/command-explanation/info.md)
{% endstep %}

{% step %}

### Test Run

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

1. Open the RelayX 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!
{% endstep %}
{% endstepper %}

### Further Learning

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

* [**relayx-cli Tool Usage Guide** →](https://support.marscat.io/development-tools/relayx-cli.md): Gain in-depth understanding of the command-line tool's complete features and advanced usage
* [**RelayX API Detailed Documentation** →](https://support.marscat.io/development-guide/frontend-development/api-interface.md): Learn about the complete API features and usage methods
* [**Self Service Configuration Guide** →](https://support.marscat.io/core-network/self-service.md): Learn how to deploy and configure backend services
* [**Smart Contract Integration** →](https://support.marscat.io/development-guide/smart-contract-integration.md): Master integration methods with blockchain platforms

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