pearl-telegram

byмарк

Створи Telegram-бота на Python, використовуючи Aiogram 3. Усі функції повинні бути реалізовані з часом, можна по трохи з заглушками. Архітектура має бути модульною, щоб у майбутньому можна було легко додавати нові механіки. База даних повинна бути JSON-файлами. Один файл для профілю користувача, окремі файли для карт, паків, конфігурації, статистики та інших даних. Усі дані повинні автоматично зберігатися після кожної зміни. Бот призначений тільки для одного користувача, тому авторизація не потрібна. Достатньо перевірки Telegram ID, який задається в config. Основна ідея бота — мотивація до навчання через колекціонування карт Pokémon. Основний цикл: користувач навчається без бота+вводить кількість хвилин/запускає таймер ботом на навчення і по його кінцю підтверджує; отримує кристали; витрачає кристали на паки; відкриває паки; отримує карти; збирає колекцію; закриває сети; отримує нагороди; продовжує навчатися. 1 хвилина навчання дорівнює 1 кристалу. У бота повинно бути красиве меню з Inline-кнопками. Головне меню повинно містити: Профіль Навчання Магазин Відкриття паків Колекція Статистика Досягнення У профілі показувати: аватарку користувача рівень; загальну кількість хвилин; кількість кристалів; зоряний пил; кількість відкритих паків; кількість карт;(вього унікальних) відсоток зібраної колекції(їх багато різних); Система рівнів. Рівень залежить лише від загальної кількості хвилин навчання. При кожному новому рівні користувач отримує нагороду. Навчання. Після натискання кнопки "Навчання" користувач вибирає додати хв/почати таймер і відповідно вибирає кількість хвилин Після цього потрібно вибрати категорію: Англійська Французька Іспанська Географія Право Інше Після підтвердження: додаються хвилини; додаються кристали; оновлюється статистика; перевіряються досягнення; перевіряється підвищення рівня. Магазин. Повинні існувати різні типи паків. Але для початку буде доступно тільки 2 Basic Pack Summer 2026 Pack можна легко додавати нові через JSON. Система випадіння карт повинна бути універсальною. Рідкість: Common Uncommon Rare Epic Legendary Mythic Шанс випадіння задається окремим JSON-файлом, щоб його можна було легко змінювати для кожного пака окремо свій можна. Карти. У кожної карти повинні бути поля: id номер покедекса назва тип рідкість серія покоління опис зображення версія назва пака де він Підтримувати різні варіанти карт: Normal Holo Gold Rainbow Shadow Ghost Shiny ( Для початку буде мало типів, з чим не заморач) Паки. Під час відкриття пака повинна запускатися анімація відкриття повідомленнями Telegram. Анімація має бути цікава не просто 1 повідомлення. Карти показ по 1 і треба нажимати дальше щоб продовжити. Якщо карта нова — це відображається Якщо карта вже існує — це вважається дублікатом. Дублікати. Кожен дублікат автоматично додає зоряний пил. Кількість пилу залежить від рідкості. Наприклад: Common 1 Uncommon 3 Rare 10 Epic 25 Legendary 100 Mythic 250 Колекція. Показувати всі отримані карти. Можна фільтрувати: по даті отрим по рідкості; по паку; по улюбленим;. Для кожної карти показувати: зображення; назву; номер; рідкість; версію; кількість копій отриманих Статистика. Показувати: сьогоднішні хвилини; цього тижня; цього місяця; загалом; кількість відкритих паків; кількість нових карт/всього наявних кількість дублікатів; найчастіше відкриваний пак. Досягнення. Автоматично перевіряти. Наприклад: 50 хвилин 100 хвилин 500 хвилин 1000 хвилин 10000 хвилин 10 паків 100 паків 250 паків 10 легендарок 50 легендарок 100 легендарок 50% колекції пака 75% колекції пака 100% колекції пака За кожне досягнення видавати нагороду. 50 ХВ право ... ( і т.д з іншими) Серія входу. Зображення. Кожна карта повинна показувати красиве PNG-зображення. Бот повинен автоматично відправляти фотографію карти з підписом. Підпис містить: назву; номер; тип; рідкість; версію; опис. нове/повторка Структура проєкту повинна бути професійною. Весь код має бути чистим, сучасним, добре документованим та розбитим на логічні модулі. Усі налаштування повинні зберігатися в JSON, без хардкоду. Усі шанси випадіння, ціни паків, нагороди, досвід, рівні, сети, рідкість карт, варіанти карт та інші параметри повинні легко редагуватися. Продумай економіку так, щоб прогрес був поступовим і цікавим навіть після кількох місяців використання. Картинки я згенерую сам і зміст паків ти зроби там заглушку. Почнемо з основ і структури

MenuShopCollectionAchievements
Menu

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 5

Pearl-Telegram System Requirements Document

1. Introduction

The Pearl-Telegram project is a Telegram bot designed to motivate users to learn through the collection of Pokémon cards. The bot is developed using Python and Aiogram 3, with a focus on modular architecture and JSON-based data storage. It is intended for a single user and does not require authentication beyond verifying the Telegram ID specified in the configuration.

2. System Overview

Pearl-Telegram aims to provide an engaging learning experience by rewarding users with collectible Pokémon cards for their study efforts. The bot features a modular design to facilitate the addition of new mechanics and functionalities over time. Data is stored in JSON files, ensuring easy management and modification of user profiles, card packs, configurations, statistics, and other data.

Key Features:

  • Modular architecture for easy expansion.
  • JSON-based data storage for profiles, cards, packs, configurations, and statistics.
  • Single-user system with Telegram ID verification.
  • Educational motivation through Pokémon card collection.
  • Customizable card packs, rarities, and rewards.
Page 2 of 5

3. Functional Requirements as Story Points

  • As a User, I should be able to start a learning session by entering minutes or starting a timer.
  • As a User, I should receive crystals based on my learning time (1 minute = 1 crystal).
  • As a User, I should be able to spend crystals on card packs.
  • As a User, I should be able to open card packs and view cards one by one.
  • As a User, I should see an animation when opening a pack.
  • As a User, I should be able to view my profile with avatar, level, total minutes, crystals, stardust, opened packs, unique cards, and collection percentage.
  • As a User, I should be able to filter my card collection by date, rarity, pack, and favorites.
  • As a User, I should be able to view statistics for today, this week, this month, and overall.
  • As a User, I should be able to view achievements and receive rewards for milestones.
  • As a User, I should be able to view and manage different card types and rarities.
  • As a User, I should be able to view duplicate cards and receive stardust based on rarity.
  • As a User, I should be able to view and purchase different types of packs from the shop.

4. User Personas

  • Single User: The primary user of the bot, motivated by educational goals and interested in collecting Pokémon cards.

5. Core User Flows

  • User starts learning session -> enters minutes or starts timer -> confirms session end -> receives crystals.
  • User spends crystals in the shop -> purchases pack -> opens pack -> views cards -> collects new cards or duplicates.
  • User views profile -> checks statistics and achievements -> receives rewards for milestones.
Page 3 of 5

6. Visuals Colors and Theme

[Default — not specified by user]

  • primary: #FFCC00 (Pokémon Yellow)
  • primary_light: #FFE680
  • secondary: #3B4CCA (Pokémon Blue)
  • accent: #FF0000 (Pokémon Red)
  • highlight: #00FF00 (Success Green)
  • bg: #FFFFFF (White)
  • surface: #F2F2F2 (Light Grey)
  • text: #000000 (Black)
  • text_muted: #666666 (Dark Grey)
  • border: #CCCCCC (Grey)

7. Signature Design Concept

Interactive Card Opening Experience

The Pearl-Telegram bot will feature an engaging card opening experience that mimics the excitement of opening a physical pack of Pokémon cards. When a user opens a pack, an animated sequence will unfold in the Telegram chat, displaying each card one by one. Users will interact with the animation by clicking "Next" to reveal subsequent cards. If a card is new, a special animation will highlight its uniqueness; if it's a duplicate, the animation will indicate the addition of stardust. This interactive experience will be built using motion/react for smooth transitions and animations.

Page 4 of 5

Landing Hero Motion Brief

The landing hero animation will depict a user inputting study minutes, which transform into crystals. These crystals then cascade into a virtual pack, which opens to reveal a series of cards. The animation will loop every 10 seconds, showing the transformation from learning to reward. The animation will be responsive and maintain clarity even in reduced-motion settings.

8. Interaction Model & Motion Direction

  • Intended Interaction Model: Animated
    • The landing page will feature moderate scroll-triggered reveals and hover transitions.
    • Interactive elements will have spring physics for a polished user experience.
    • Each section will have a distinctive core mechanic, such as kinetic typography or morphing SVGs.

9. Non-Functional Requirements

  • The bot must be responsive and handle user interactions smoothly.
  • Data integrity must be maintained across all JSON files.
  • The system should be scalable to accommodate additional features and mechanics.
Page 5 of 5

10. Tech Stack

  • Frontend: Aiogram 3 for Telegram bot interface
  • Backend: Python
  • Data Storage: JSON files for user profiles, cards, packs, and configurations

11. Assumptions and Constraints

  • The bot is designed for a single user, with no need for multi-user authentication.
  • All configurations and data are stored in JSON files, which must be easily editable.
  • The bot's architecture must support future expansion and new feature integration.

12. Glossary

  • Crystals: In-game currency earned through learning.
  • Stardust: A resource gained from duplicate cards, used for various in-game enhancements.
  • Pack: A collection of cards that can be purchased and opened by the user.
  • Card Rarity: The likelihood of obtaining a specific card, categorized as Common, Uncommon, Rare, Epic, Legendary, or Mythic.
Menu design preview
Menu: Open Main Menu
Profile: View Profile
Learning: Start Session
Learning: Select Category
Learning: Confirm Session
Shop: Browse Packs
Shop: Purchase Pack
PackOpening: Open Pack
PackOpening: View Cards
Collection: View Collection
Collection: Filter Cards
Statistics: View Stats
Achievements: View Achievements
Menu design preview
Menu: Open Main Menu
Profile: View Profile
Learning: Start Session
Learning: Select Category
Learning: Confirm Session
Shop: Browse Packs
Shop: Purchase Pack
PackOpening: Open Pack
PackOpening: View Cards
Collection: View Collection
Collection: Filter Cards
Statistics: View Stats
Achievements: View Achievements