● Customize · Quality
Build, tests & checks
before every release.
Typecheck, the automated test suites and the production builds. This release was checked with these exact commands: 321 tests passed and every package typechecked.
01Test databases (once)
The API, airdrop and E2E tests run against real PostgreSQL databases. Create and migrate them once:
createdb campaign_kit_test
DATABASE_URL=postgres://localhost:5432/campaign_kit_test pnpm db:migrate
createdb campaign_kit_e2e
DATABASE_URL=postgres://localhost:5432/campaign_kit_e2e pnpm db:migrate
Never point tests at production
The test suites truncate their tables between tests. The airdrop tests refuse a database whose name does not end in _test, the E2E test anything other than campaign_kit_e2e.
02Run the checks
pnpm -r typecheck
pnpm test
pnpm -r build
pnpm test runs the packages one at a time because the API and airdrop suites share the test database.
| Suite | Tests | What it covers |
|---|---|---|
API (apps/api) | 126 | Auth, game, quests, referrals, shop, ads callback, wallets, admin, v2 seasons/squads/puzzles/fairness, analytics, links, reports, broadcasts, sponsors, revenue, clone; Telegram calls mocked |
Admin (apps/admin) | 68 | Pages and forms |
Mini App (apps/miniapp) | 60 | Screens, launch parameters, claim transaction |
Airdrop (packages/airdrop) | 24 | Signals, allocation, fair multipliers, publish, distributor address check |
Contract (packages/ton-claim) | 27 | Real TVM emulation in @ton/sandbox |
Shared (packages/shared) | 7 | Economy maths |
E2E (e2e) | 9 | Full airdrop chain: API, database, contract, claims, withdraw |
| Total | 321 | All passing on 2026-09-25: full run at 3c594f1; admin and API re-run at cd4ba6d, the only packages it changed |
The E2E test writes its result to e2e/results/airdrop-e2e.json.
03Production builds
| Command | Output |
|---|---|
pnpm --filter @kit/api build | apps/api/dist/index.js + dist/migrate.js (the Docker image does this for you) |
pnpm --filter @kit/miniapp build | apps/miniapp/dist + generated TON Connect manifest |
pnpm --filter @kit/admin build | apps/admin/dist + TON Connect manifest |
pnpm --filter @kit/ton-claim build | Only when you change the contract (Tact compile + wrappers) |
04Go-live checklist
/healthanswers over https; Workspace settings show https and the right network.- Webhook registered and menu button set in the Launch checklist.
- Main Mini App set in BotFather with
?c=<slug>; one tracked link and one squad invite tested. - Both TON Connect manifests load over https.
- A test Stars purchase and a refund done with your own account; a
/paysupportanswer added to the bot (not built in; see Revenue). - Adsgram Reward URL tested, if you use ads.
- A full airdrop run on testnet, including a claim and the withdraw.
- Backups scheduled and one restore tested.