<p align="center">
  <img src="https://img.shields.io/github/license/ramtinmehraz/Netfreedom?style=for-the-badge&color=red" alt="License" />
  <img src="https://img.shields.io/github/stars/ramtinmehraz/Netfreedom?style=for-the-badge&color=green" alt="Stars" />
  <img src="https://img.shields.io/github/forks/ramtinmehraz/Netfreedom?style=for-the-badge&color=blue" alt="Forks" />
</p>

<p align="center">
	<a href="./README.md"><b>English</b></a> | <a href="./README-fa.md"><b>فارسی</b></a>
</p>

<h1 align="center">🚀 Netfreedom Timebot</h1>
<p align="center"><i>The Ultimate, Premium Telegram Bot for Selling, Managing, and Automating V2ray (X-UI & Marzban) Subscriptions.</i></p>

Netfreedom Timebot is a state-of-the-art, feature-rich commercial automation system designed to connect your Telegram bot directly to X-UI and Marzban panels. Built with reliability, ease of use, and visual excellence in mind, it provides a seamless experience for both administrators and customers.

---

## 🔥 Key Premium Features

### ⚡ Smart Panel Integration (X-UI & Marzban)
- **Multi-Panel Support**: Native support for **Marzban** and popular **X-UI** versions (Sanaei, Alireza, etc.).
- **Protocol Versatility**: Sell and manage VLESS, VMESS, and Trojan protocols.
- **Transport Types**: Full support for TCP, WebSocket, gRPC, Reality, TLS, and XTLS.
- **Dynamic Config Generation**: Random or automated port assignment, UUID rotation, and custom remark generation.

### 🎨 Visual & UX Masterclass (Telegram Bot API 10.1+)
- **Colored Inline Keyboards**: Leverages modern Telegram button styling (Success/Green, Danger/Red, Primary/Blue) for real-time status indication instead of plain emojis.
- **Two-Column Subscriptions**: Neatly displays active (green) and expired (red) subscriptions in a 2-column layout (max 5 rows per page) with beautiful pagination.
- **Uniform Red Cancel/Back Buttons**: Consistent color-themed navigation with custom emoji styling.

### 💳 Complete Payment & Billing Suite
- **Gateways**: Integrated Zarinpal, Nextpay, NowPayments (Crypto), and **TRON/USDT Wallet Direct Checker**.
- **Digital Wallet**: In-bot wallet system allowing deposit, balance transfer, and automatic payment.
- **Manual Verification**: Card-to-Card payment with receipt photo uploading and automated admin review queue.
- **Agent/Reseller Panel**: Reseller tier supporting mass purchases, custom discounts (per server/plan), and dedicated client management.

### 🎫 Advanced Interactive Ticketing
- **De-duplicated View**: Clean conversation logs for admins, hiding redundant initial subjects.
- **Micro-Animations & Clean-up**: Automatic deletion of reply prompts ("Please send your message...") once sent, and `$removeKeyboard` integration.
- **Persistent Replies**: Quick notification templates for new members with instant message preservation.
- **Deep-Linked Ticket Management**: Seamless redirection to specific tickets inside the Mini App via `#tickets-ID` hashes, bypassing the dashboard home view.
- **Unified Action Controls**: Integrated "Reply in Mini App" and "Reply in Bot" buttons on every new support ticket, featuring copyable user IDs (`<code>`) and direct linkification of user profiles.

### 🛡️ Smart Automation & Cleanup
- **Unlimited Plan Support**: Properly flags zero-duration plans as **Unlimited (نامحدود)** with no artificial day limits.
- **Auto Gift/Test Cleanups**: Automatic background processes prune expired 1-day gift configurations from both the database and panel, blocking double claims in the user profile.
- **Channel Lock**: Force users to join your Telegram channel before utilizing the bot.
- **Config Backup**: Automatic backups for X-UI panels and databases.
- **Intelligent Card-to-Card UI**: Automatic tracking and instant deletion of card payment info messages and cancellation buttons upon successful receipt upload.
- **Trial Sync & Proxy Categories**: Real-time plan synchronization for trial subscriptions with built-in proxy configuration detection.

### 📱 Modern React Telegram Mini App (TMA)
- **Unified Portal**: Fully-featured React-based Mini App interface loaded inside Telegram for frictionless user, reseller, and admin management.
- **Auto-Sync & Pre-fill**: Dynamically pre-fills user profile information (first name, last name, phone number) from Telegram WebApp parameters, confirming details via styled bot prompts.
- **Glassmorphic UI**: Ultra-modern glassmorphic design system using Vanilla CSS, dark mode support, and smooth layout transitions.
- **Role-based Dashboards**: Single bundle containing tailored user metrics, reseller quota utilities, and administrative panels (server config, ticket replies, transaction verification).

---

## 📄 License
This project is licensed under the MIT License.