Skip to content
This repository was archived by the owner on Aug 7, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠 TooliMAX

⚠️ Archived. This project ran in production as a SaaS for MAX-messenger channels and is no longer actively maintained. It is published as a portfolio reference — feel free to fork and build on it.

A platform for managing channels in the MAX messenger — comments, polls, scheduled posting, analytics, and moderation.

Python FastAPI React TypeScript MAX


🎯 What is it?

TooliMAX is a SaaS bot for owners of channels in the MAX messenger. It adds comments, polls, analytics, and moderation to channels where this functionality is not available natively.

Key features

Feature Description
💬 Comments A comment button under every channel post. Comments open as a MiniApp inside MAX
📊 Polls Create polls with answer options and visual statistics
📝 Posting Publish and schedule posts through the bot (text + media)
⚙️ Settings Toggle panel: moderation, filters, auto-greeting
📈 Analytics Counters for comments, posts, and subscribers
🛡 Moderation Pre-moderation, spam/caps filter, stop words
💳 Billing Free / Pro / Business plans (YooKassa)

📱 MiniApp

The control panel is implemented as a MiniApp for MAX — it opens natively inside the messenger via MAX Bridge.

  • Authentication via initData (no login/password)
  • Profile and avatar pulled from MAX
  • Deep links: max.ru/bot?startapp=section_params
  • Responsive design for mobile

🏗 Architecture

┌─────────────────────────────────────────────┐
│                  MAX Messenger               │
│  ┌──────────┐  ┌──────────┐  ┌───────────┐ │
│  │ Channels │  │   Bot    │  │  MiniApp  │ │
│  └────┬─────┘  └────┬─────┘  └─────┬─────┘ │
└───────┼─────────────┼───────────────┼───────┘
        │             │               │
        ▼             ▼               ▼
┌─────────────────────────────────────────────┐
│              Backend (FastAPI)                │
│  ┌──────┐ ┌──────┐ ┌───────┐ ┌───────────┐ │
│  │ Bot  │ │ API  │ │ Tasks │ │  Webhook  │ │
│  └──────┘ └──────┘ └───────┘ └───────────┘ │
└──────────────┬──────────────────────────────┘
               │
    ┌──────────┼──────────┐
    ▼          ▼          ▼
┌────────┐ ┌───────┐ ┌────────┐
│PostgreSQL│ │ Redis │ │Celery │
└────────┘ └───────┘ └────────┘

🚀 Tech stack

Backend:

  • Python 3.12 + FastAPI + SQLAlchemy (async)
  • Celery + Redis (background tasks)
  • PostgreSQL (storage)
  • Alembic (migrations)
  • MAX Bot API SDK

Frontend:

  • React 18 + TypeScript
  • Vite (build)
  • Tailwind CSS v3
  • MAX UI (@maxhub/max-ui)
  • MAX Bridge (max-web-app.js)

Infrastructure:

  • Docker Compose
  • Nginx + Let's Encrypt SSL
  • Yandex Cloud (Russia)

📦 Setup

Requirements

  • Docker + Docker Compose
  • Node.js 22+ (to build the frontend)
  • A domain with an SSL certificate
  • A MAX bot (token from @MetaBot)

Environment variables

# Backend
SECRET_KEY=your-secret-key
MAX_BOT_TOKEN=your-bot-token
WEBHOOK_URL=https://yourdomain.ru/bot/webhook
APP_BASE_URL=https://yourdomain.ru
DATABASE_URL=postgresql+asyncpg://user:pass@postgres/maxtools
REDIS_URL=redis://redis:6379

# YooKassa (billing)
YOOKASSA_SHOP_ID=your-shop-id
YOOKASSA_SECRET_KEY=your-secret-key

Docker Compose

# Clone
git clone https://github.com/ProRocK747/maxtools.git
cd maxtools

# Create .env
cp .env.example .env
# Edit .env

# Run
docker compose up -d

# Build the frontend
cd frontend && npm install && npm run build
docker cp dist/. maxtools-frontend-1:/usr/share/nginx/html/

🔗 MAX API specifics

  • Channels (type: channel) do not receive message_created — the bot publishes posts itself via the /post command
  • MiniApp deep links: max.ru/{botName}?startapp=section_params
  • The startapp parameter: only A-Z, a-z, 0-9, _, - (no dots!)
  • Negative chat_id values are encoded as n + abs: -72272934385767n72272934385767
  • initData arrives via window.WebApp.initDataUnsafe
  • MAX Bridge: window.WebApp (not window.MaxWebApp)

📄 License

MIT

About

TooliMAX: SaaS platform for MAX messenger channels. Comments, polls, scheduling, analytics and moderation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages