No-code Telegram bot constructor
Project description
moduli
Free & open-source no-code Telegram-bot constructor for activism. Focused on privacy both for bot users and admins. Developed by bots against war team.
Self-hosting
:warning: Under construction
Development
Basic dev setup
- Install Poetry (tested with versions 1.5 - 1.8.5, not working on 2+). Then, install backend dependencies with
poetry install
# start new shell with poetry-created virtual env activated
poetry shell
If you have problems with poetry, you can manually create everything and install dependencies using pip
from requirements.txt generated from poetry dependencies:
# example of virtual env creation and activation for unix systems
python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Setup minimal environment
# set environment variables (example for unix-like systems)
export TELEBOT_CONSTRUCTOR_USE_REDIS_EMULATION=1
# generate key with
# > python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode("utf-8"))'
export SECRETS_ENCRYPTION_KEY=<encryption key>
# get your user ID from @bots_against_war_service_bot bot (`from.id` field)
export OWNER_CHAT_ID=<your telegram user id>
- Start backend/API
# run the web app
python run_polling.py
- In a separate terminal session, install frontend dependencies (
npmv18+ required) and start the dev server
npm install
npm run dev
- Visit
http://localhost:8081in the browser.
Generate TS interfaces from backend data model
On any update to Pydantic data types on backend, run
npm run pydantic:to:ts
Check that JSON schema and Typescript types are updated accordingly.
Backend
Running tests with coverage check
coverage run -m pytest tests -vv
coverage html
Then you can review htmlcov/index.html in browser.
Running linters and code checks
ruff check --fix
ruff format
mypy
Adding/updating backend dependencies
We keep two versions of the same dependency list:
poetryformat (pyproject.toml+poetry.lock)- regular
pip'srequirements.txt
To modify dependency list, use
poetry add depdendency@contraint.
Then, re-generate requirements.txt with (there is a github action to check it)
poetry export -f requirements.txt --output requirements.txt
Frontend
We use:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telebot_constructor-0.2.19.tar.gz.
File metadata
- Download URL: telebot_constructor-0.2.19.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f3b7a7bdeb8a16e2cfce1bbe74e6c0a04a0191cfed04699c8c238ac11da6739
|
|
| MD5 |
c2c11790148a6e1712ff1ed5d0055cbf
|
|
| BLAKE2b-256 |
77aef2c5099bc06b81588834d31b01e1cd8dbd6b924a7a7de43850f043348e0a
|
File details
Details for the file telebot_constructor-0.2.19-py3-none-any.whl.
File metadata
- Download URL: telebot_constructor-0.2.19-py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0e0ac23c477760a84c6cb810a2e73cbbf9f92c87e70db34593ffca61a4f5543
|
|
| MD5 |
a04a56bc7c2045e5d36e7525fada22cb
|
|
| BLAKE2b-256 |
07bde7eee5e51bb61fb805b0a6856c122dd87ea63f39cd153166c0084a0aabb0
|