Milad Mobaseri
$ cat azadcenter-bot.json

AzadCenter — A Student Platform Inside Telegram

Telegram Bot Development

The student bot of Islamic Azad University, Kazerun: notes and past exams, professor reviews, smart recommendations and online payments. 1,500+ users, entirely inside Telegram.

AzadCenter — A Student Platform Inside Telegram — 1/7
Telegram Bot DevelopmentPersonal project

Project Overview

At university, the important information was always scattered: notes spread across dozens of groups, professors' and offices' numbers passed hand to hand, and the same questions asked again every term. AzadCenter was built to fix that: a Telegram bot where a student at Islamic Azad University, Kazerun gets what they need with one message.

A library students build themselves. Notes and past exams are organized by major, and any student can upload their own through a step-by-step wizard. Nothing goes live without admin review, uploaders keep 85% of every sale, and paid files are delivered copy-protected.

Search that speaks the student's language. Students don't type keywords; they type "physics 2 notes from Dr. So-and-so for the final". The Persian search drops filler words, tolerates typos and never confuses "Physics 2" with "Physics 1". When nothing matches, the query is logged so the gap gets filled and the student is notified later.

Recommendations and reviews built on real data. "For you" suggests notes based on what classmates actually downloaded. Professor reviews are designed to be trustworthy: only verified accounts can rate, people who took the course carry more weight, and sudden bursts of reviews are held for moderation automatically.

With students, even in the group chat. The bot also works inside the student group: ask for "the dorm office number" and it answers instantly, while repeated spam is detected and removed automatically. A points economy called "diamonds", alongside quizzes, draws and contests, turns students from consumers into contributors.

All of it is run from a full admin panel inside Telegram: an upload review queue, user and content management, broadcasts, no-code contest creation and automatic daily reports. The bot has been live since 2023, and version 4 is a complete rewrite.

Key Highlights

  • 1,500+ users and 2,800+ downloads
  • Persian fuzzy search that understands full sentences
  • Professor reviews with trust weighting and anti-abuse
  • Smart recommendations from real user behavior
  • Atomic ZarinPal payments, 85% revenue to uploaders
  • Full admin panel inside Telegram

Technical Implementation

The bot is written in Python with aiogram 3, fully async. Database work runs in a separate thread pool and the MySQL connection pool is bounded and queued, so the event loop never blocks under load. Group games are built for thousands of simultaneous taps: answers land in memory first and are written in batches.

Anything involving money or points is atomic. ZarinPal payments run on a state machine that never delivers an order twice, and if the bot restarts mid-payment, a database-backed watcher completes the delivery. Every diamond balance change is recorded in a ledger and fully traceable.

Search is built on Persian text normalization and rapidfuzz, and recommendations use item-based collaborative filtering (cosine similarity), computed in under 50 ms. Sensitive modules carry self-tests, and an end-to-end simulator runs real scenarios with several users through the bot's actual dispatch path. It runs on a Linux VPS under systemd, with automatic daily backups and slowness monitoring.