TEXTXT/DEV
Mini App Platform · Bridge 1.x

Build inside the conversation.

Textxt Mini Apps are HTTPS web applications that run in a sandboxed chat panel. Use the SDK, test against a local host, submit a signed-in release, and ship through one review pipeline.

00 / WORKFLOW

One lifecycle, from prototype to update.

1

Scaffold

Download the starter, versioned SDK, TypeScript declarations, and manifest schema.

2

Test

Use host.html to simulate context, messages, drafts, boards, polls, events, and errors.

3

Verify

Developer Console fetches, scans, hashes, and privately archives every executable release file before review.

4

Operate

Approved releases support staged rollout, beta users, health checks, rollback, disable, analytics, and support.

01 / QUICK START

Run a working Mini App in minutes.

The starter has no build step. It includes an app, manifest, local Bridge host, and standalone validator.

Download and serve

mkdir conversation-notes && cd conversation-notes
BASE=https://textxt.com/mini-apps/starter
curl -fsSLO "$BASE/index.html"
curl -fsSLO "$BASE/manifest.json"
curl -fsSLO "$BASE/host.html"
curl -fsSLO "$BASE/textxt-mini-app.js"
curl -fsSLO "$BASE/validate-manifest.mjs"

npx serve .
# Open the printed URL + /host.html

Validate locally

Use --local while your start URL is localhost. Production submission always requires HTTPS.

node validate-manifest.mjs \
  --local manifest.json
node validate-manifest.mjs \
  --remote manifest.json
02 / SDK

Call capabilities, not transport.

The SDK pins the parent origin, creates request IDs, handles timeouts, maps Bridge errors, and dispatches events. Do not implement raw postMessage transport.

Browser SDK

<script src="https://textxt.com/mini-apps/sdk/1.0.2/textxt-mini-app.js"></script>
<script>
  const bridge = window.TextxtMiniApp.createBridge();

  bridge.on("context", (context) => {
    console.log(context.bridge.availableCommands);
  });

  await bridge.sendMessage({ text: "Result from my app" });
</script>

Permission groups

readContextsendMessage setDraftopenTopic uploadFilegenerateImagesboards pollswallet invokeServices

Users consent per app and chat. New release permissions are never granted automatically.

Feature detection

const context = await bridge.getContext();
const canPoll = context.bridge
  .availableCommands
  .includes("createPoll");

Bridge 1.x command surface

GroupCommandsNotes
ContextgetContextChat, topic, locale, theme, discovery metadata, and a non-authenticated correlation session.
ConversationsendMessage, setDraft, updateMessage, shareMiniAppMessage, openTopicAll writes are permission-checked by the host.
Shared datalistBoards, createBoard, getBoard, saveBoard, subscriptions, Caro mutationsChat-scoped persisted collaboration with revision checks.
PollscreatePoll, getPoll, listPolls, castVote, closePollRealtime poll state managed by Textxt.
TXT walletgetTxtWallet, requestTxtPaymentReads the available TXT balance and opens a host-controlled confirmation sheet. Mini Apps never debit wallets directly.
ServicesinvokeTextxtService / invokeServiceCalls only backend operations registered for this app. Textxt supplies authenticated runtime context and validates consent server-side.
HostuploadFile, generateImage, resize, logEvent, reportError, closeMiniAppFile and AI access are only available in the real host. Error reports feed release health analytics.

Request a TXT payment

const context = await bridge.getContext();
if (context.bridge.availableCommands.includes("requestTxtPayment")) {
  const result = await bridge.requestTxtPayment({
    amount: 25,
    reference: "invoice-1042",
    description: "Shared dinner"
  });
  console.log(result.operationId, result.balance);
}

Declare wallet in the manifest. Textxt verifies the app owner and chat consent, then asks the user to confirm the amount and recipient.

03 / MANIFEST V1

A release contract, not a database record.

Never include ownerId, review status, or timestamps. Textxt derives those from the authenticated submission.

{
  "manifestVersion": 1,
  "appId": "conversation-notes",
  "name": "Conversation Notes",
  "description": "Capture a note and send it back to the conversation.",
  "iconUrl": "https://example.com/icon.png",
  "startUrl": "https://example.com/app/v1.0.0/index.html",
  "allowedOrigins": ["https://example.com"],
  "permissions": ["readContext", "sendMessage", "setDraft"],
  "capabilities": ["message.text"],
  "bridgeVersion": "1.0",
  "minimumHostVersion": "1.1.0",
  "requiredHostCapabilities": ["bridge.service-invoke"],
  "visibility": "private",
  "tags": ["notes", "productivity"],
  "version": "1.0.0",
  "privacyPolicyUrl": "https://example.com/privacy",
  "supportUrl": "https://example.com/support",
  "releaseNotes": "Initial release."
}

Automated gate

  • Exact semantic version in the HTTPS start URL
  • Public DNS, safe redirects, and exact allowed origin
  • CSP response header permits both Textxt production origins
  • Same-origin HTML, JavaScript, CSS, and module imports
  • Unsafe code patterns, file count, and byte limits
  • Deterministic digest and private artifact archive

Visibility

privateOnly the developer can discover and install it.
sharedAvailable to signed-in Textxt users through sharing.
publicListed in public discovery after review.
04 / SECURITY

Assume the panel is untrusted.

Mini Apps are isolated from Textxt authentication and direct Firestore access. The Bridge is the only supported host boundary.

Required

  • Serve a versioned app and every runtime dependency over HTTPS
  • Send CSP as an HTTP response header for https://textxt.com and https://textxt-14209.web.app
  • Request the smallest permission set
  • Handle permission denial and session expiry
  • Keep user-visible actions behind explicit interaction
  • Make mobile layouts work at 320px width

Never do this

  • Treat session.id or legacy sessionToken as authentication
  • Ask users to paste Firebase or Textxt credentials
  • Write directly to Textxt Firestore collections
  • Load executable code from undeclared origins
  • Auto-send messages or upload files on launch
  • Depend on arbitrary inline HTML inside a chat bubble
Backend authentication: Bridge 1.x does not issue an authenticated backend token to third-party Mini Apps. Use your own sign-in flow for your backend. The Textxt session fields are correlation metadata only.
05 / REVIEW + RELEASE

Publish through the platform gate.

Sign in to Textxt, open Settings → Mini app developer, paste the validated manifest, and submit. Developers never write catalog records directly.

VERIFIED

Artifact locked

Executable files pass network and source checks, then receive an archived SHA-256 digest.

REVIEW

Five-day target

Textxt rechecks the live digest before approval and records an SLA event if review is delayed.

REJECTED

Actionable notes

Load the manifest back into the editor, address review notes, and resubmit.

APPROVED

Staged candidate

New apps go live; updates can roll out by beta list and deterministic percentage before promotion.

Updates

Increase the semantic version and publish it at a new immutable URL. Monitor runs and errors, adjust rollout, promote, or roll back to the prior approved release. Removed origins and permissions are revoked at runtime.

Chat presentation

Third-party apps can share standard Mini App cards. Interactive inline bubble renderers are trusted host extensions and require a separate platform review; arbitrary app code never runs in the message list.