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

Review

Paste manifest.json into Developer Console. Textxt attaches ownership and review metadata.

4

Release

Approved releases enter the catalog. Updates require a higher semantic version.

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.0/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 uploadFileboards polls

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.
HostuploadFile, resize, logEvent, closeMiniAppFile access is only available in the real host.
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/index.html",
  "allowedOrigins": ["https://example.com"],
  "permissions": ["readContext", "sendMessage", "setDraft"],
  "capabilities": ["message.text"],
  "bridgeVersion": "1.0",
  "visibility": "private",
  "tags": ["notes", "productivity"],
  "version": "1.0.0",
  "privacyPolicyUrl": "https://example.com/privacy",
  "supportUrl": "https://example.com/support",
  "releaseNotes": "Initial release."
}

Automated gate

  • Known fields and manifest version only
  • Exact HTTPS start origin in allowedOrigins
  • Known permissions and capabilities only
  • Semantic release version
  • HTTPS privacy and support pages
  • Reserved and already-owned app IDs blocked

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 the app and every runtime dependency over HTTPS
  • Use exact origins, never wildcard domains
  • 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.

PENDING

Automated checks passed

You can update or withdraw the release while it waits for review.

REVIEW

Platform verification

Textxt checks function, iframe compatibility, mobile UX, privacy, and least privilege.

REJECTED

Actionable notes

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

APPROVED

Catalog release

The approved version becomes authoritative for existing and future installs.

Updates

Increase the semantic version, write release notes, and submit again. Removed origins and permissions are revoked at runtime. New permissions still require explicit user consent.

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.