Telegram bot for editing Better Life SG website
| .forgejo/workflows | ||
| compose | ||
| frontend | ||
| provisioners | ||
| scripts | ||
| static | ||
| tools | ||
| .env | ||
| .gitignore | ||
| background_tasks.py | ||
| config.py | ||
| copilot_runtime.py | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| instance.py | ||
| learning.py | ||
| llm_costs.py | ||
| local_media_store.py | ||
| main.py | ||
| model_selection.py | ||
| prompt_utils.py | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| ruff.toml | ||
| telegram_bot.py | ||
| tool_pipeline.py | ||
| tool_registry.py | ||
| user_store.py | ||
| ux.py | ||
| web_fallback_store.py | ||
BetterBot
A Telegram bot for editing the Better Life SG website and Memoraiz app frontend.
Fork of CodeAnywhere — shares
the core Copilot SDK framework and only customises instance.py and
tools/site_editing/.
How it works
- User sends a message to the Telegram bot (e.g. "Change the phone number to 91234567")
- BetterBot uses the CodeAnywhere Copilot SDK framework with site-editing tools
- Tools list / read / write files and automatically commit + push to git
Projects
| Key | What it manages | Mount path |
|---|---|---|
betterlifesg |
Static HTML site (Tailwind CSS via CDN) | /repo/betterlifesg/site |
memoraiz |
React 19 + Vite 6 frontend | /repo/memoraiz/frontend |
Stack
- Python 3.12 + CodeAnywhere framework (Copilot SDK, python-telegram-bot)
- Runs on RackNerd
- Forgejo repo:
andre/betterbot
Fork relationship
BetterBot shares all framework files with CodeAnywhere. The only betterbot-specific files are:
| File | Purpose |
|---|---|
instance.py |
Bot identity, system prompt, feature flags, tool registration |
tools/site_editing/ |
list_files / read_file / write_file with auto git push |
.env |
Non-secret config (model defaults, site paths) |
compose/ |
Docker compose for RackNerd with site-dir mounts |
scripts/deploy-betterbot.sh |
Deploy script targeting RackNerd + Infisical |
To sync upstream changes, copy updated framework files from code_anywhere/.
Deployment
ssh racknerd bash /opt/src/betterbot/scripts/deploy-betterbot.sh
Commands
/start— Introduction and examples/reset— Clear conversation history/model <name>— Switch LLM model/current— Show current model