An AI guide for developers building on BOT Chain. Answers come from the official docs, with sources.
Ask a question about BOT Chain (networks, faucet, deploying, tools, common errors) and get a short answer with the doc sections it used. Rate answers 👍/👎 and share tips on BOT Chain. Tips the owner approves become part of what the AI can use. Your chats never leave your browser except to be answered, and they are never on-chain. BOTGuide is a community project and is not official BOT Chain documentation.
Contract (mainnet) | How it works | Screens | Run it locally | Deploy | Limits
- A knowledge base is built from the official developer docs (
dev-docs.botchain.ai), a few site pages and community notes: 65 pages, about 280 chunks. It is saved aspublic/kb.json. - Your question is searched in your browser with MiniSearch. The best chunks (up to 5) are picked there. Common Indonesian words are mapped to the docs' English terms first, so questions in Indonesian find the same sections.
- The question and those chunks go to our API route
/guide, which asks Groq (openai/gpt-oss-120b) and streams the answer back. The model must cite the sources it used. If the docs do not cover a BOT Chain question, it says so instead of guessing, and offers "Add a tip". Any URL in an answer that is not in the sources or the fixed config is replaced. - Chat history is saved only in your browser (localStorage). There is no database and no account.
- 👍/👎 votes and tips are transactions on the BOTGuide contract. Only a hash of the answer goes on-chain, never the chat.
- A tip stays Pending review until the owner approves it. Only approved tips are added to the search index, labeled "Community tip". Pending tips never reach the AI.
Only the answer hash (for ratings) and the text of a tip are on-chain. Chats never are.
| Route | What it is |
|---|---|
/ |
Landing page: hero, how it works, product, developers, ecosystem, community tips, FAQ |
/ask |
The chat: sources, follow-up questions, network facts panel, local history |
/ask?q=... |
Share link that asks a question |
/ask?tip=ID |
Opens the Community tips panel on that tip (unknown id shows "Tip not found") |
/ask?tip=all |
Opens the Community tips panel without pointing at one tip |
/guide |
API route that talks to Groq (not a page) |
contracts/contracts/BOTGuide.sol (Solidity 0.8.20, EVM paris, no tokens, no payments).
rate(answerId, helpful): one vote per wallet per answer.answerIdiskeccak256of the normalised question and answer text.submitTip(title, body, section): limits are 80 / 500 / 32 bytes. New tips are pending.upvoteTip(id): once per wallet, not on your own tip.approveTip(id): owner only.- Views for the app:
getVote,getTips,getApprovedTips,tipCount,stats.
| Network | Chain ID | Address |
|---|---|---|
| BOT Chain Testnet | 968 | 0x015eDcdd020D0834F69048a467A5b40bf8D16aB9 (scan.bohr.life) |
| BOT Chain Mainnet | 677 | 0xe6c8AF7ad92093b1a329F622789647227c66dd63 (scan.botchain.ai) |
The app points at the mainnet contract. It was deployed with the owner's own wallet, and its 18 functions and all events match BOTGuide.sol (checked against the deployed bytecode). The testnet contract stays up for testing. If no address is set in lib/config.ts, rating and tips show a clear "not deployed yet" message and nothing is faked. 13 contract tests pass (cd contracts && npx hardhat test).
BOTGuide/
app/ Next.js routes: / (landing), /ask (chat), /guide (Groq proxy)
components/ landing/ and chat/ UI, the Bo mascot, the shared wallet menu
lib/ search, answer streaming, prompt and parser, contract and wallet helpers, config
docs/ official/ (synced docs), site/, lessons/ (community notes), shots/ (README images), design-spec.md
public/ kb.json (the knowledge base) and brand assets
contracts/ Hardhat project: BOTGuide.sol, tests, deploy and approve-tip scripts
scripts/ check-kb.mjs (search checks), ask.mjs (end-to-end test), tip-check.mjs
sync-docs.js downloads the official docs
build-kb.js builds public/kb.json and lib/kb-meta.json
git clone https://github.com/Devs-GMT/BOTGuide.git
cd BOTGuide
npm install
cp .env.example .env # put your GROQ_API_KEY in it
npm run dev # http://localhost:3000Refresh the knowledge base before a release:
npm run sync-docs # download the official docs
npm run build-kb # rebuild public/kb.json
npm run check-kb # sanity-check search
node scripts/tip-check.mjs # check that an approved tip is foundTest the contract flow without spending BOT:
cd contracts && npm install
npx hardhat node # terminal 1
npx hardhat run scripts/deploy.js --network localhost # terminal 2, prints the address
# in the app's .env.local:
# NEXT_PUBLIC_BOTGUIDE_NETWORK=local
# NEXT_PUBLIC_BOTGUIDE_ADDRESS=0x...Approve a tip as the owner: CONTRACT=0x... TIP_ID=0 npx hardhat run scripts/approve-tip.js --network localhost (add LIST=1 to list tips first).
Secrets live only in .env, .env.local and contracts/.env. All are git-ignored.
- App (Vercel): import the repo and add
GROQ_API_KEY(secret).GROQ_MODELandGROQ_REASONINGare optional. For a rate limit shared across instances, also setUPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKEN(free Upstash Redis); without them the limit is in memory. - Contract (testnet first): put
PRIVATE_KEY=0x...of a test wallet incontracts/.env, claim tBOT from the faucet (10 tBOT per address per 24 hours), then runnpx hardhat run scripts/deploy.js --network botTestnet. - Put the printed address in
lib/config.ts(TESTNET_CONTRACT_ADDRESSorMAINNET_CONTRACT_ADDRESS) and setBOTGUIDE_NETWORKto the network you use.
The contract is live on BOT Chain mainnet (chain ID 677) at 0xe6c8AF7ad92093b1a329F622789647227c66dd63. The owner (the wallet that deployed it) is the only one who can approve tips. To redeploy or deploy your own copy:
- Put the owner's
PRIVATE_KEYincontracts/.envand make sure the wallet has BOT for gas. Or opencontracts/contracts/BOTGuide.solin Remix: compiler0.8.20, optimizer on (200 runs), no constructor arguments, mainnet wallet on chain ID 677. - With Hardhat:
npx hardhat run scripts/deploy.js --network botMainnet. - Put the address in
MAINNET_CONTRACT_ADDRESSinlib/config.ts, setBOTGUIDE_NETWORK = "mainnet", and redeploy the app. - Optional:
CONTRACT=0x... npx hardhat run scripts/seed-tips.js --network botMainnetadds and approves a few starter tips (owner only; edit the list first).
- Answers can be wrong or out of date. Check important values (chain IDs, RPC URLs, addresses) in the official docs. The app shows a network facts panel for this.
- The official docs have no guide for Remix, Hardhat, Foundry or contract verification. Answers about them come from short community notes, are labeled "Community note", and may be outdated. If nothing covers a BOT Chain question, BOTGuide says it could not find it.
- Votes are not identity-checked: one wallet is one vote, but anyone can use many wallets.
- The rate limit is 30 questions per IP per hour. It is shared across instances when the Upstash variables are set, and an in-memory counter (per instance) otherwise. The Upstash path is not tested yet.
- Community tips are written by users. The owner reviews them, but they may still be outdated, and the official docs always win.
- New BOT Chain developers (main users): ask how to add the network, claim the faucet, deploy a contract or fix a common error, and get an answer with doc sources. Benefit: no need to read the whole documentation to answer one question.
- Hackathon participants and the community (contributors): share tips from real experience, and the owner approves the ones worth keeping so they join the knowledge base. Benefit: community knowledge helps answer the next question.
- Project owners and the BOT Chain team (reviewers): see which answers people found useful through on-chain ratings, and review tips before they are approved. Benefit: learn which parts of the documentation are still confusing.
- Blockchain teachers and mentors: point students to the official sources with citations they can check.
- EVM developers coming from other chains: check what is different on BOT Chain (chain ID, RPC, faucet) before moving a project.
| Version | Features |
|---|---|
| MVP (V1) | Q&A from the official docs with citations, on-chain ratings and tips, owner approval of tips, live on mainnet |
| V1.1 | Deploy the contract to mainnet 677 with the owner's wallet, then switch the app to mainnet |
| V1.2 | Replace the draft community notes with real ones, then re-sync the docs |
| V2 | Not decided yet. Ideas: semantic search, more languages |
Only the MVP (V1) is built today. The other versions are plans.
- Only the answer hash (for ratings) and the text of a tip go on-chain. The content of a chat is never stored on a server or on the blockchain.
- A tip that has not been approved is never sent to the AI.
- BOTGuide is a community project, not official BOT Chain documentation. If an answer disagrees with the official docs, the official docs are right.






