An interactive, SEO-optimized platform for ESL discussion topics — built with PHP 8.3 and a mobile-first Tailwind CSS frontend. Telegram Bot upload workflow. No database required.
Live: en.class.sayid.ir
Free Discussion Class gives ESL learners and teachers a library of rich discussion topics — with vocabulary tools, speaking games, and live events — all in one place.
Weekly topics are uploaded via Telegram (DOCX or PDF). The bot parses, publishes, and replies with the live URL automatically.
- Bottom Navigation — Home · Search · Topics · Tools
- Home — minimal header (logo only), hero card, latest topics horizontal scroll, events list
- Search — full-text across topics, vocabulary, events, and teachers
- Topics — filterable grid (level, newest, popular)
- Tools — Question Wheel, Speaking Timer (more coming)
- Topic Detail — slide-in view with tabbed content: Questions / Vocabulary / Phrases & Idioms / Games
- Tailwind CSS + Inter + Barlow Condensed
- PWA — Service Worker, offline support, installable
- Vocabulary with pronunciation, definition, and example sentences
- Question Wheel — random question picker for class
- Speaking Timer with presets and pause/resume
- Phrases, idioms, and collocation panels
- Classroom game suggestions per topic
- Roleplay scenario cards
- Full-text search across topics, words, events, and teachers
- Filter by CEFR level (A1→C2), date, and popularity
- Topic of the Day (deterministic daily rotation)
- Favorite topics (localStorage)
- Offline support via Service Worker (PWA)
- Dark mode only (matches brand)
- Clean URLs (
/topic/jealousy) - OpenGraph + Twitter Card tags
- JSON-LD: FAQ Schema + Breadcrumb Schema
- Auto-generated XML sitemap
- Send DOCX or PDF → parsed, published, URL replied instantly
- Admin whitelist by Telegram user ID
- Commands:
/help/list/stats/rebuild/delete
| Layer | Technology |
|---|---|
| Language | PHP 8.3+ |
| Frontend | Tailwind CSS, Alpine.js, Inter + Barlow Condensed |
| Storage | JSON flat files (no database) |
| Server | Nginx + PHP-FPM (CloudPanel) |
| PDF parsing | pdftotext (poppler-utils) |
| DOCX parsing | Native ZIP/XML |
| Bot | Telegram Bot API (webhooks) |
| PWA | Service Worker + Web App Manifest |
free-discussion-class/
├── bootstrap.php — autoloader + .env loader
├── composer.json
├── .env.example
├── config/
│ ├── config.php
│ └── nginx.conf
├── data/
│ ├── index.json — auto-generated
│ └── topics/*.json
├── public/ — Nginx document root
│ ├── index.php
│ ├── css/app.css
│ ├── js/app.js
│ ├── sw.js
│ ├── manifest.json
│ ├── icons/
│ └── images/
├── scripts/
│ ├── rebuild-index.php
│ └── setup-webhook.php
├── src/
│ ├── helpers.php
│ ├── Bot/TelegramBot.php
│ ├── Core/{Router,HomeController,TopicController}.php
│ ├── Parser/{DocxParser,PdfParser,ParsedContent}.php
│ ├── SEO/MetaBuilder.php
│ └── Topic/TopicRepository.php
├── templates/
│ ├── layouts/base.php
│ ├── pages/
│ └── partials/
├── INSTALL-CLOUDPANEL.md
└── DEPLOY.md
{
"slug": "jealousy",
"title": "Jealousy",
"summary": "...",
"level": "B2",
"tags": ["emotions", "relationships"],
"cover": "",
"questions": [{ "text": "...", "level": "B1", "type": "personal" }],
"vocabulary": [{ "word": "...", "definition": "...", "pronunciation": "...", "examples": [], "collocations": [] }],
"phrases": [],
"idioms": [],
"collocations": [],
"quotes": [{ "text": "...", "author": "..." }],
"teacher_notes": "",
"games": [{ "name": "...", "description": "...", "players": "4+", "time": "10 min" }],
"roleplay": [{ "scenario": "...", "roles": [] }],
"created_at": "2026-06-11"
}git clone https://github.com/youruser/free-discussion-class.git
cd free-discussion-class
cp .env.example .env # fill in your values
php scripts/rebuild-index.php
php -S localhost:8080 -t public/See INSTALL-CLOUDPANEL.md — 10-step guide:
- Add PHP 8.3 site in CloudPanel
- Upload files
- Set Document Root →
/public - Configure
.env - Set permissions
- SSL (auto via CloudPanel)
php scripts/rebuild-index.php- Test in browser
php scripts/setup-webhook.php- Test Telegram bot
| Variable | Required | Description |
|---|---|---|
APP_ENV |
yes | production / development |
APP_URL |
yes | https://en.class.sayid.ir |
TELEGRAM_BOT_TOKEN |
yes | From @BotFather |
TELEGRAM_ADMIN_IDS |
yes | Comma-separated user IDs |
TELEGRAM_WEBHOOK_SECRET |
yes | Random 32-char string |
GA_ID |
no | Google Analytics ID |
- Mobile-first redesign with Tailwind CSS
- Bottom Navigation (Home, Search, Topics, Tools)
- Unified Search across all content types
- Topic filter by level, date, popularity
- Topic detail as slide-in panel with tabbed content
- Tools tab with Question Wheel and Speaking Timer
- Events section on Home
- Initial PHP flat-file platform
- Telegram Bot upload workflow
- DOCX/PDF parser
- PWA + Service Worker
- SEO: OG, Twitter Cards, JSON-LD, Sitemap
MIT