> For the complete documentation index, see [llms.txt](https://docs.xaman.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xaman.dev/environments/xapps-dapps.md).

# xApps ("dApps")

Build your own web app to live in-app, inside Xaman for all Xaman users. Build an xApp. Use your favourite tools & frameworks for the client side code (HTML, CSS, JS, etc.

xApps are web apps. They are offered to users as integrated apps, opened in Xaman for a great user experience. They add value (tools, apps, wizards, ...) for end users. They receive context information when opened, and can interact with some of the native Xaman features & users through Sign Requests.

{% hint style="info" %}
Please read carefully: [Requirements](/environments/xapps-dapps/requirements.md)
{% endhint %}

## Permissions

xApps have extra special permissions, allowing the xApp (web app) to interact with some of the native Xaman features:

* They receive context (user account selected in Xaman when opened, Xaman theme, input params, account type (eg. Tangem / ...)
* They can trigger overlay Sign Requests and receive callback info
* They can trigger the QR scanner and receive scanned QR data

## Opening xApps

xApps can be opened (triggered) in lots of ways:

* In the Xaman shortlist (we feature some apps, they get replaced by frequently used apps by the user)
* From the xApp directory
* By opening a deeplink (browser / from within another app)
* By scanning a QR code

{% hint style="info" %}
To prevent showing a double loader (first the Xaman xApp loader, then your xApp's loader while hydrating / booting) you can enable the "**Xaman Loader Screen**" option in the Xaman Developer Console (xApp tab).\
See [ready()](/js-ts-sdk/sdk-syntax/xumm.xapp/ready.md)
{% endhint %}

### Advanced ways to open xApps

* By attaching an xApp memo to an XRPL TX (so the Event list will show there's an xApp attached to the TX)
* Using push notifications
* From the Event list, as an xApp session pushed to a Xaman user

## xApp example use cases

* Trading interface (offloads signing to Xaman)
* Admission ticket checking
* NFT marketplaces / viewers
* Issuing tokens, checking tokens
* Tools: setting up accounts, crafting advanced transactions, escrows, etc.
* Exchange deposit / withdraw integrations

## Sample code

```html
<html lang="en">
  <body>
    <h1 id="accountaddress">...</h1>
        
    <script src="https://xumm.app/assets/cdn/xumm.min.js"></script>
    <script>
      var xaman = new Xaman('your-api-key')
      
      xaman.on("ready", () => console.log("Ready (e.g. hide loading state of xApp)"))
  
      // Account can't change (like Web3 logout/login) so we can rely on the promise
      xaman.user.account.then(account => {
        document.getElementById('accountaddress').innerText = account
      })
    </script>
  </body>
</html>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xaman.dev/environments/xapps-dapps.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
