Campaign Kit docs
v1.0.0
Get help
● Start · What you need

Requirements
tools, accounts, hosting.

What must be installed on your computer and your server, which accounts you need, and what is optional.

01On your computer

ToolVersionWhy
Node.js22 or newer (engines: node >=22)Runs the API, builds the web apps.
pnpm10 (the repo pins pnpm@10.33.2; corepack enable installs it)Workspace package manager. npm and yarn are not supported.
PostgreSQL16Database for local development and tests.
OpenSSLanyGenerates the secrets in .env.
A modern browserChrome, Edge, Firefox or SafariAdmin panel, TON Connect.

02On your server

ItemNotes
Linux VPSSmall is fine to start (1–2 vCPU, 2 GB RAM is a reasonable starting point, not a measured minimum). Runs PostgreSQL + API.
Docker Engine with the Compose plugindocker compose up -d --build builds the API image (Node 22 Alpine) and starts PostgreSQL 16.
A reverse proxy with TLSCaddy, nginx + certbot or Traefik. Telegram only loads Mini Apps and delivers webhooks over https.
A domainThree hostnames under one registrable domain, for example api.example.com, play.example.com, admin.example.com. The admin must be on the same site as the API (see same-site cookie).
Static hostingFor the Mini App and the admin: any static host (Cloudflare Pages, Netlify, nginx, Caddy on the same VPS).

03Accounts

AccountRequired?What for
Telegram accountRequiredCreate bots with @BotFather; test the Mini App.
One Telegram bot per campaignRequiredFree from @BotFather. The same bot cannot serve two campaigns.
TON wallet with TON ConnectRequired for the airdropOperator wallet that deploys, funds and withdraws the distributor (for example Tonkeeper). Players link their own wallets; supported wallet versions: v3r1, v3r2, v4r2, v5beta, v5r1.
TEP-74 jettonRequired for the airdropThe token you distribute. A testnet jetton for testing.
toncenter API keyOptionalTurns on the two wallet anti-bot signals. Without it those checks are skipped and reported as skipped.
Adsgram publisher accountOptionalRewarded ads. Only Adsgram is implemented; Monetag shows as "not supported yet".

04Only if you change the contract

The compiled contract and its TypeScript wrapper are committed in packages/ton-claim/src/generated/, so you never need the Tact compiler to build or run the kit. Only if you edit contracts/merkle_distributor.tact, run pnpm --filter @kit/ton-claim build (Tact compiler, installed as a dev dependency) and then have the change audited.

05Costs not included in the price: who pays

The item price covers the source code and this documentation. Everything below runs under your accounts and is billed to you by its provider. Check each provider's current pricing; usage above a free tier is yours to pay.

ServiceNeeded?Who pays, and what for
VPS, domain, TLS, static hostingRequiredYou, to your hosting and domain providers: the API and PostgreSQL (Docker), https for the API, the Mini App and the admin.
Telegram Bot APIRequiredNo charge at the time of release. One bot per campaign from @BotFather; Telegram's terms apply.
Telegram StarsOptionalPlayers pay in Stars; Telegram pays your developer share (about $0.013 per Star at release) through Fragment, on Telegram's schedule.
TON network feesFor an airdropYou (operator wallet): about 0.1 TON attached to each deploy, fund and owner message, partly refunded. Players pay their own claim, net about 0.03 TON. See TON costs.
The jetton you distributeFor an airdropYou or your client: the tokens in the distributor.
toncenter API keyOptionalFree tier at the time of release; higher limits are a paid toncenter plan. Turns on the two wallet anti-bot checks.
AdsgramOptionalYour own publisher account; Adsgram pays you for rewarded ads under its terms.
Contract audit, legal opinionRecommendedYou, before mainnet value and before the first client.

Nothing is paid to MIKODES per campaign, player or transaction. The code has no revenue share and sends no data to the author.

06Operating system

Developed and tested on macOS and Linux. On Windows, run the commands in WSL 2 (Ubuntu); the production server is Linux with Docker.