Developer Docs
  • Getting Started
    • Xircus Web3 Protocol
    • Wallet & Authentication
    • Own Your Web3 Apps
    • Deploying Web3 Apps
    • Deploying NFT Collection
    • Minting and Importing NFTs
    • Listing and Selling NFTs
    • Supported Chains
  • Terminologies
    • DUST - Template System
      • The Presets
      • Dust
      • Dust React
      • Dust Chakra
      • Dust Radix
    • Carousel - Template Routers
    • Graphee
      • for TON Chain
  • Launching Your App
    • Quest Apps
    • NFT Marketplace Apps
    • eCommerce Apps
    • Launchpad Apps
  • TON Contracts
    • ⚡Quick Start
    • ⛏️Minter
      • Quick Start
      • Jetton
      • Jetton Non-Shard
      • NFT
      • SBT
      • Wallet
    • 🏪Marketplace
      • ⚡Quick Start
      • NFT Market
      • NFT Music Market
      • NFT Ticket Market
      • NFT Subscription Market
    • 🌱Launchpad
      • Getting Started
      • Auction Instant
      • Auction Pool
      • Auction Fair Launch
      • NFT Pre-Mint Auction Randomizer
      • NFT Allowlist Auction
    • 🛍️eCommerce
      • Checkout
      • Property Rentals
      • Fleet Courier
      • Delivery Pooling
      • Real World Assets
    • ⛰️Governance
      • Staking
      • Locker
      • Vesting Locker
      • Vesting Locker Simple
      • Proposals
    • ⛳Prediction
      • Getting Started
      • Optimistic Oracles
      • Prediction Market Factory
  • Platform Tools
    • 📃Smart Contracts
    • 🏅Open Quest & Leaderboard
    • ⚒️Web3 Minters
    • 🎨Generative NFT Creator
    • ✨NFT Auctioneer
  • App Templates
    • NFT Marketplace
    • Crowdfunding Launchpad
    • DeFi Exchange
    • Prediction Market
    • NFT Social
    • Token XP Campaigns
  • TON Blockchain
    • TON React
    • Telegram Mini dApps
  • React Reference
    • ⚡Quick Start
    • Hooks
      • useTonConnect
      • useUtils
      • useRegistry
      • useApp
      • useStorage
      • useTon
      • useTelegram
    • Recipes
      • Connect via Wallet Provider
      • Using Wallet Authentication
  • GraphQL Reference
    • ⚡Quick Start
    • Schemas
      • App
      • Currency
      • Account
      • Chain
      • Market
    • Methods
      • Get Apps
      • Get App
  • Core SDK Reference
    • ⚡Quick Start
    • Methods
  • Xircus CLI
    • ⚡Quick Start
    • Commands
      • Create
      • App
      • Contract
      • Skin
      • Module
  • DUST App Template Building
    • Getting Started
    • Dust Chakra Common
      • AppBrand / AppHeader
      • EditableFields
Powered by GitBook
On this page
  • Generating boilerplate and install dependencies
  • The DUST Architecture
  • The DustProvider
  • The DustComponent component
  • The Structure
  1. DUST App Template Building

Getting Started

In order to use the

Generating boilerplate and install dependencies

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

npx xircus dust-template

Installed Dependencies

  • TanStack Query

  • Xircus SDK & Xircus React

  • Xircus TON React

  • Dust

  • Dust Chakra

  • Dust Chakra Component

The DUST Architecture

Name
Description

Dust

The block editor provider, fully integrated with Xircus React & SDK. Contains pre-built functions for reusability DustProvider - loads all necessary data to compose the page and blocks

Dust Chakra

The chakra UI provider for Dust. DustEditor - in-app editing controls (optional) DustChakraProvider - manages the chakra UI and layouts that is built on Chakra components

Dust Radix

TBD

Dust Material

TBD

Dust Chakra Components

Contains UI components that can be integrated with any blocks. Contains the following blocks: Common Blocks

The DustProvider

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>     
    )
}

The DustComponent component

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>
)

The Structure

Folders

components-*

Contains all bare components

blocks-*

Contains the UI blocks

layouts-*

presets-*

hooks

services

Contains non-hook api calls

PreviousModuleNextDust Chakra Common

Last updated 1 year ago