Skip to main content

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

  1. 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
  1. 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>
  1. Start backend/API
# run the web app
python run_polling.py
  1. In a separate terminal session, install frontend dependencies (npm v18+ required) and start the dev server
npm install
npm run dev
  1. Visit http://localhost:8081 in 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:

  • poetry format (pyproject.toml + poetry.lock)
  • regular pip's requirements.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:

  • Tailwind CSS
  • flowbite component library, see docs
  • svelvet (nodes/connections engine), see docs
  • flowbite-icons-svelte for icons, see catalog
  • svelte-i18n for internationalization
  • svelte-kit to prerender a separate static page for landing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telebot_constructor-0.2.19.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

telebot_constructor-0.2.19-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

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

Hashes for telebot_constructor-0.2.19.tar.gz
Algorithm Hash digest
SHA256 5f3b7a7bdeb8a16e2cfce1bbe74e6c0a04a0191cfed04699c8c238ac11da6739
MD5 c2c11790148a6e1712ff1ed5d0055cbf
BLAKE2b-256 77aef2c5099bc06b81588834d31b01e1cd8dbd6b924a7a7de43850f043348e0a

See more details on using hashes here.

File details

Details for the file telebot_constructor-0.2.19-py3-none-any.whl.

File metadata

File hashes

Hashes for telebot_constructor-0.2.19-py3-none-any.whl
Algorithm Hash digest
SHA256 b0e0ac23c477760a84c6cb810a2e73cbbf9f92c87e70db34593ffca61a4f5543
MD5 a04a56bc7c2045e5d36e7525fada22cb
BLAKE2b-256 07bde7eee5e51bb61fb805b0a6856c122dd87ea63f39cd153166c0084a0aabb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page