> For the complete documentation index, see [llms.txt](https://xircus-developer.gitbook.io/developer-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xircus-developer.gitbook.io/developer-hub/dust-app-template-building/getting-started.md).

# Getting Started

In order to use the&#x20;

## Generating boilerplate and install dependencies

To setup your first app template layout, you need to have NodeJS installed including access to npx command line

{% tabs %}
{% tab title="CLI via NPM" %}
npx xircus dust-template
{% endtab %}
{% endtabs %}

Installed Dependencies

* TanStack Query
* Xircus SDK & Xircus React
* Xircus TON React
* Dust
* Dust Chakra
* Dust Chakra Component

## The DUST Architecture

<table><thead><tr><th width="248">Name</th><th>Description</th></tr></thead><tbody><tr><td>Dust</td><td>The block editor provider, fully integrated with Xircus React &#x26; SDK. Contains pre-built functions for reusability<br><br><strong>DustProvider</strong> - loads all necessary data to compose the page and blocks</td></tr><tr><td>Dust Chakra</td><td>The chakra UI provider for Dust. <br><br><strong>DustEditor</strong> - in-app editing controls (optional)<br><strong>DustChakraProvider</strong> - manages the chakra UI and layouts that is built on Chakra components</td></tr><tr><td>Dust Radix</td><td>TBD</td></tr><tr><td>Dust Material</td><td>TBD</td></tr><tr><td>Dust Chakra Components</td><td>Contains UI components that can be integrated with any blocks. <br><br>Contains the following blocks:<br>Common Blocks</td></tr></tbody></table>

## The DustProvider

{% tabs %}
{% tab title="React / Next" %}

```jsx
import { setupSDK, tonClient } from "@xircus-web3/ton-react"
import { DustProvider } from "@xircus-web3/dust"
import { DustChakraProvider, DustEditor } from "@xircus-web3/dust-chakra"
import { COMMON_DEFS, NAV_DEFS, DustEditorPublisher } from "@xircus-web3/dust-chakra-ton"

// Prepares the app to load the Xircus TON SDK
const sdk = setupSDK("ton", { ton: tonClient })

// Contains the UI defaults when adding blocks to page
const UI_DEFS = {
   ...COMMON_DEFS,
   ...NAV_DEFS,
}

// contains your 
const LAYOUTS = {
   MemeLayout: <GramLayout headers={{}} footers={{}} sections={{}} />
}

// your app metadata, extracted from contract or Xircus GraphQL Providers
const app = {} 

export default function DustApp({ router }) {
  return (
     <DustProvider
       sdk={sdk}
       app={app}
       router={router} 
       uiDefs={UI_DEFS}
       head={Head}> // optional for dynamic title
       <DustChakraProvider layouts={LAYOUTS}>
         <DustEditor>
           <DustEditorPublisher />
         </DustEditor>
       </DustChakraProvider>
     </DustProvider>     
    )
}
```

{% endtab %}
{% endtabs %}

## The DustComponent component

{% tabs %}
{% tab title="React / Next" %}

```jsx
import { DustComponent } from "@xircus-web3/dust-chakra-component"

export const WalletManagerDefs = {
    name: 'WalletManager', // Name of the component
    label: 'Wallet Manager', // Display name of the component in editor 
    image: 'IPFS_HASH' // hash of the ipfs or leave as blank
    theme: {
        wrap: {}        
    }
    data: {
        title: {}
    }
}

// Fields displays the right editing controls, check EditableFields
const fields = {
    title: 'String'
}

// The label of the controls (optional)
const labels = {
    title: 'Title'
}

export const WalletManager = props => (
    <DustComponent props={props} fields={fields} labels={labels}>
        // Your component goes here
    </DustComponent>
)
```

{% endtab %}
{% endtabs %}

## The Structure

<table><thead><tr><th width="160">Folders</th><th width="293"></th><th></th></tr></thead><tbody><tr><td>components-*</td><td>Contains all bare components</td><td></td></tr><tr><td>blocks-*</td><td>Contains the UI blocks</td><td></td></tr><tr><td>layouts-*</td><td></td><td></td></tr><tr><td>presets-*</td><td></td><td></td></tr><tr><td>hooks</td><td></td><td></td></tr><tr><td>services</td><td>Contains non-hook api calls</td><td></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xircus-developer.gitbook.io/developer-hub/dust-app-template-building/getting-started.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
