📘 Technical assignment for the development of a Telegram bot
Project name: Bot for selling archives (with internal currency "Rubies")
1. Project goal
Create a Telegram bot that allows users to view profiles and purchase access to archives (photos/files) for the internal currency "Rubies".
The purchase of an archive is made through an internal balance that the user can top up.
The bot also supports a referral bonus system, notifications, a personal profile, and an admin panel.
2. Main functionality
2.1. Main profile feed
The user sees the main profile feed, scrolling through them with buttons:
[⏪ Back] [View — XXX💎] [Forward ⏩]
- When pressed:
- “Forward” — the next profile is displayed.
- “Back” — the previous profile.
- “View” — the specified amount of 💎 is deducted from the balance, and the user is sent a .zip archive.
Important:
- Profiles that have already been purchased by the user are no longer displayed in the feed.
- After purchase, the bot sends a message like:
✅ Archive successfully received!
📦 Contents: archive name
Profile structure:
[Photo]
Name: [name from database]
Description: [additional information]
[⏪ Back] [View — 000💎] [Forward ⏩]
3. Bot menu (bottom buttons)
Main menu:
- 📰 Feed — open the profile feed.
- 👤 My profile — user information.
- 💎 Top up balance — go to top up (test mode).
- 🛠 Tech. support — link or chat with the specified admin.
- 👥 Invite a friend — receive a referral link.
4. User profile
Displays:
- User's username (user)
- Balance (💎)
- Number of purchased archives
Also contains a button:
- [Top up balance] — opens the top-up menu (currently in test mode).
5. Referral system
- Invite a friend → the bot generates a unique referral link.
- For each new user registered via the link, +0.5💎 is credited.
- The balance is automatically updated and displayed correctly in the profile.
6. Notifications and logging
6.1. Notifications to the administrator:
- When a new user registers:
🔔 New user: us - When topping up the balance:
💰 User us topped up the balance by XX💎
6.2. Notifications to users:
- When a new profile is created by the administrator:
🔔 A new profile has been created!
[Go to view] — the button opens the feed with the new profile.
7. Admin panel
The administrator must be able to:
- Create new profiles:
- Upload photos
- Specify a name
- Add a description
- Set a price in 💎
- Attach a .zip archive
- Edit existing profiles (change name, description, price, photo)
- Delete profiles
- View the list of users (optional)
- Manage user balances (optional, manually)
8. Technical details
- Platform: Telegram Bot API
- Language: Python (Aiogram / Telebot — at the developer's choice)
- Database: SQLite or PostgreSQL
- Storage of archives: locally or via Telegram File ID
- Architecture: convenient for subsequent addition of payment systems (Qiwi, crypto, etc.)
9. Additional (by agreement)
- Support for multilingualism (RU/EN)
- Web admin panel (for convenient management of profiles)
- Settings for referral bonus limits
- Ability for manual balance top-up through admin
10. Example user scenario
- The user starts the bot → a profile is created (0💎).
- The admin receives a notification about the new user.
- The user opens the feed, scrolls through profiles.
- When pressing "View" → if there are enough 💎, the amount is deducted and the archive is sent.
- The user invites a friend → receives +0.5💎.
- The admin adds a new profile → the bot sends a notification to all users.