Telegram Bot Source Code Handover From Chinese Studios: What Belongs in the Package

A source code handover from a Chinese studio consists of more than a compressed archive of source files. The complete package for a delivered telegram bot includes the repository with its history, configuration and secret handling, a deployment runbook a stranger can follow, the data schema and an export path, account and credential transfers, acceptance test records, and a list of third-party components with their licenses. Each item should have a named owner and a handover date; anything absent turns the buyer into a dependent of the original author. This article walks the package in handover order, states what each part should contain, and explains how the final handover session verifies that the package actually works.

The repository and code contents

The code package should be a repository the buyer can clone, inspect, and grant or revoke access to, not a single exported zip. Commit history should spread across the project period, showing real development rather than one import commit at delivery. Branches should be clear, with tags or releases marking each production-ready version. The code should follow the project’s own structure, with comments where business rules are non-obvious, and no dead debug code or hard-coded test data left in the main branch.

All project code belongs in the package: bot flow logic, integration connectors, reply and content modules, scheduling or reminder jobs, admin command handlers, and any scripts for deployment, backup, or maintenance. Shared internal templates the studio reused should be identified as such, with the rights to reuse the combination stated. Code the vendor keeps in a closed panel is not part of the owned package; the contract should say so explicitly, because mixing a rental module into a purchased deliverable hides a dependency.

Buyers should check the repository for signs of assembled work: missing history, generated code with no structure, or references to internal private repositories the buyer cannot reach. A third-party developer receiving the handover should be able to build the project locally from the repository alone, without asking the original author where a file lives.

Configuration, secrets, and environment

Configuration separates environment-specific settings from code. The package should carry configuration files or templates: environment variables, feature flags, integration endpoints, rate and throttle settings, and message or content references. Sensitive secrets — bot tokens, API keys, database credentials, provider secrets — must not be committed in plaintext in repository history. The package should explain where secrets are stored, how they are referenced, and how the buyer rotates them after handover.

The rate limiting and throttle configuration belongs in this layer: per-chat and per-bot spacing, campaign pacing, retry backoff, and failure tracking settings. These values should be documented with their rationale, so a later operator can adjust them without guessing the original tuning. Environment definitions should cover development, staging, and production, with the differences between them listed.

Configuration should make clear which settings are editable after launch: reply copy, menu labels, thresholds, whitelist entries, and content overrides. If some settings live only in the vendor’s panel and cannot export, that limitation must be recorded in the handover rather than discovered during exit.

Documentation and the deployment runbook

The runbook is the document that lets someone who has never seen the project deploy, start, restart, and roll back the bot. It should cover prerequisites and dependencies, provisioning steps, configuration setup, database initialization, how the bot starts and stops, how to check health, how to restart after a crash, and how to roll back to a previous release. Common incidents and their responses should be listed: webhook or polling failure, update delivery errors, integration timeouts, and certificate issues.

Supporting documentation should describe the system architecture: how the bot connects to Telegram, where state lives, how integrations sync, and where messages and records are stored. A flow map should show the main conversation paths and their states. Internal business rules — eligibility checks, status mappings, escalation conditions — should be written where they are encoded in code, so they are not locked in the author’s head.

Documentation quality is tested during handover: if the runbook cannot guide a fresh deployment, it is incomplete, regardless of how thorough the prose looks. Outdated docs that do not match the current code are worse than none, because they send the next operator down a wrong path.

Data schema and export path

The package should include the data model: tables or collections, fields, relationships, and the meaning of each status or flag. Records covered include user and conversation data, orders or subscriptions, payment references, membership or access state, campaign and consent flags, and any logs the system retains. The schema should be versioned so future changes track against a defined structure.

An export path must exist for every record type the buyer may need at exit: readable formats such as CSV and JSON, with identifiers, timestamps, statuses, tags, and consent state joinable together. A sample export of anonymized records should be provided during the proposal or handover stage, so the buyer can verify the fields are present and usable. Retention and deletion rules should be documented: how long records are kept, who can read them, and how a deletion request is processed.

Cross-border data considerations should be recorded alongside the schema: which region records are stored in, what data passes through any third-party processor, and how the data path complies with the buyer’s obligations. The source system’s data residency decisions are part of the handover record, not a separate afterthought.

Accounts, credentials, and access transfers

Account transfers are listed individually in the handover schedule: BotFather bot and token, hosting or cloud account, database, payment provider accounts, domain or webhook endpoints, and any third-party services the bot depends on. Each entry states the registered owner, the access method transferred, and the handover date. The vendor receives operator or admin access that the buyer can revoke; the buyer holds ownership credentials.

Development tokens should be rotated at handover, and any secrets shared in chat logs, notes, or old notes should be invalidated. Provider accounts should be the seller’s own business accounts; if an aggregator or vendor account was used, the arrangement and transfer path must be documented. Access lists should show who currently has rights to each account, so remaining vendor access can be checked and revoked.

If the bot runs on the buyer’s cloud account with remote vendor operation, the package should document the access level granted, the permissions scoped, and how access is removed when the retainer ends. Account ownership questions behind this transfer are consolidated in the six ownership questions guide.

Test artifacts and acceptance records

The handover package carries the evidence the bot passed its requirements: the agreed acceptance test cases, expected outcomes, and the recorded results from staging and production’s early run. Test scripts or fixtures, where they exist, should be included so the next operator can re-run checks after changes. Defect lists from the project, with their resolution status, show what was fixed and what remained open at handover.

Acceptance records should match the contract’s acceptance clause: core flows, failure cases, language switches, escalation paths, and transaction or refund cases where applicable. A holdback released after two weeks of production running should reference the logs or reports that show the stable run. The testing sequence used before full payment is detailed in the pre-payment testing guide, and those same artifacts should accompany the code package.

Third-party components and licenses

A dependency list should name every library, framework, SDK, template, and service the project did not write itself, with its license or service terms. Permissive open-source licenses usually allow commercial use; copyleft licenses carry obligations that affect how the combined code may be released. The list should note any components sourced from the vendor’s previous projects or internal frameworks, and whether those may be retained after exit.

External services the bot depends on — payment processors, messaging relays, analytics, storage — should be listed with their accounts, fees, and contact points. If a component is provided through the vendor’s reseller agreement, the buyer should understand what changes if that agreement ends. Unknown dependencies force the next operator to reverse-engineer the stack during an incident, which is exactly what a handover package should prevent.

The handover session and post-handover gaps

The final verification is a deployment exercise: someone other than the original author uses the package to deploy to a fresh environment, following only the runbook, while the vendor observes and answers questions. The session covers provisioning, configuration, database setup, update loop setup, startup, restart, and rollback. Every gap encountered — missing file, undocumented step, missing credential, unlisted dependency — becomes a handover defect to close before the final payment clears.

After handover, gaps typically appear in three areas: undocumented business rules that only the author remembers, panel settings that were never exported, and third-party accounts that remain on the vendor’s side. A short follow-up support window after the independent deployment gives the buyer time to surface these gaps before the retainer relationship ends; unresolved items from that window should be listed as known limitations in the delivered documentation. The common failure points behind these gaps are catalogued in the common sourced-project failure points, most of which a complete package prevents. A clean handover means the buyer can operate, repair, and eventually exit the bot without the original studio; anything less leaves the project in a permanent dependency the contract should have addressed before signing.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *