Karma 2 ā Telegram Mini App for community gamification with smart scoring & OLED UI
721
EN | UAā
š Meet Karma 2 ā the evolution of gamification for your Telegram community!
Tired of rating manipulations and meaningless flood?
Want to see real opinion leaders and support quality communication?
Karma 2 is a modern Telegram Mini App that turns chat life into a transparent game protected from spam and manipulation.
ā”ļø Why Karma 2 is the new standard:
š Make your chat a place of quality communication with Karma 2!
Open source code, quick start guide, and algorithm documentation are available in the repository: Karma 2ā
graph TD
%% Nodes definition
User((š¤ User))
TG[Telegram App]
subgraph "Docker Host"
Proxy[š Reverse Proxy<br/><i>Cloudflared / Nginx / Traefik</i>]
subgraph "karma-2-community-app (Container)"
Node[š¢ Node.js 22<br/><i>Express + grammY + React SPA</i>]
end
DB[(šļø SQLite Data Volume<br/><i>./data/karma.db</i>)]
end
%% Connections
User -->|Interaction / Reactions| TG
TG <-->|Events / Commands / UI| Proxy
Proxy <--> Node
Node <-->|Read/Write| DB
%% Styles
classDef primary fill:#646cff,stroke:#fff,stroke-width:2px,color:#fff
classDef secondary fill:#2c2c2c,stroke:#646cff,stroke-width:1px,color:#fff
classDef highlight fill:#ff9a9e,stroke:#fff,stroke-width:2px,color:#000
classDef storage fill:#a18cd1,stroke:#fff,stroke-width:1px,color:#fff
class Node primary
class Proxy highlight
class DB storage
class TG secondary
To ensure a fair leaderboard and prevent user collusion, Karma 2 combines several progressive mathematical approaches:
Prevents boosting through mass messaging (flood / spam). A quality index $Q \in (0, 1]$ is calculated:
$$Q = \frac{M_{\text{engaged}} + 1}{M_{\text{total}} + 1}$$
If two users (A and B) mutually boost each other, each subsequent reaction from A to B will have decaying weight on a harmonic scale:
$$W_{\text{pairwise}} = \frac{1}{k}$$
where $k$ is the sequence number of the reaction from user A to user B.
A reaction from a user with high karma weighs more than from a newcomer with zero karma:
$$W_{\text{reactor}} = \log_{10}(10 + K_{\text{weighted}})$$
| Action | Base Weight | Description |
|---|---|---|
| Sending message | $+0.50$ | Encouraging communication (scaled by Q index). |
| Receiving reply (Reply) | $+1.00$ | Indicator that the message sparked a discussion. |
| Reaction "Guru" (š„, š, šÆ, š¤, ā¤ļø) | $+2.00$ | Useful or authoritative content. |
| Reaction "Flooder" (š, š¤£, š¤Ŗ) | $+1.50$ | Humor, flood, emotions. |
| Reaction "Skeptic" (š¤, š, š¤·āāļø, š¤Æ) | $+1.00$ | Analytics, doubts. |
| Negative reaction (š, š¤®, š©) | $-1.00$ | Spam, dislike. |
The easiest way to deploy the application:
Create a working directory:
mkdir karma-2-app && cd karma-2-app
Create a docker-compose.yml file:
version: '3.8'
services:
karma-bot:
image: webyhomelab/karma-2-community-app:latest
container_name: karma-bot
restart: unless-stopped
ports:
- "3015:3000"
environment:
- BOT_TOKEN=Your_Telegram_Bot_Token
- DB_PATH=/app/backend/data/karma.db
- TRUST_PROXY=true
volumes:
- ./data:/app/backend/data
Run the container:
docker compose up -d
The application will be available on port 3015. All data is securely stored in the ./data/ directory.
Configuration is easily done via the built-in admin panel at /admin.

Available settings:
123456789:ABCdefGHIjklmNOPqrsTUVwxyz-100123456789https://kruhlyk.srvrs.top/For karma to be calculated correctly, the bot must be properly created, configured, and added to the group:
/newbot command and follow the instructions.By default, bots only see commands starting with /. For the bot to register user messages, privacy mode must be disabled:
/setprivacy command.Any Pull Requests (PR) are highly welcome! Create an Issue if you find bugs or want to suggest new features.
Built in Ukraine under air raid sirens & blackouts ā”
Ā© 2026 Weby Homelab
Content type
Image
Digest
sha256:5b80b2eb4ā¦
Size
70.3 MB
Last updated
3 months ago
docker pull webyhomelab/karma-2-community-app