{"id":34948729,"url":"https://github.com/ibuildrun/tic-tac-toe-pastel","last_synced_at":"2026-03-17T19:26:35.493Z","repository":{"id":330608707,"uuid":"1123356051","full_name":"ibuildrun/tic-tac-toe-pastel","owner":"ibuildrun","description":"Cozy pastel Tic-Tac-Toe game - Telegram Mini App with gamification, achievements and rewards","archived":false,"fork":false,"pushed_at":"2025-12-26T19:30:51.000Z","size":261,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-28T06:57:46.740Z","etag":null,"topics":["game","gamification","react","tailwindcss","telegram","telegram-mini-app","tic-tac-toe","typescript","vite"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibuildrun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":[],"patreon":null,"ko_fi":null,"open_collective":null,"custom":null}},"created_at":"2025-12-26T17:43:42.000Z","updated_at":"2025-12-26T19:30:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ibuildrun/tic-tac-toe-pastel","commit_stats":null,"previous_names":["randomu3/tic-tac-toe-pastel"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ibuildrun/tic-tac-toe-pastel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibuildrun%2Ftic-tac-toe-pastel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibuildrun%2Ftic-tac-toe-pastel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibuildrun%2Ftic-tac-toe-pastel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibuildrun%2Ftic-tac-toe-pastel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibuildrun","download_url":"https://codeload.github.com/ibuildrun/tic-tac-toe-pastel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibuildrun%2Ftic-tac-toe-pastel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30629267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game","gamification","react","tailwindcss","telegram","telegram-mini-app","tic-tac-toe","typescript","vite"],"created_at":"2025-12-26T20:57:25.460Z","updated_at":"2026-03-17T19:26:35.484Z","avatar_url":"https://github.com/ibuildrun.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/React-19-61DAFB?style=for-the-badge\u0026logo=react\" alt=\"React 19\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TypeScript-5.8-3178C6?style=for-the-badge\u0026logo=typescript\" alt=\"TypeScript\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Vite-6-646CFF?style=for-the-badge\u0026logo=vite\" alt=\"Vite\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Telegram-Mini%20App-26A5E4?style=for-the-badge\u0026logo=telegram\" alt=\"Telegram\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"../../actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/ibuildrun/tic-tac-toe-pastel/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"/\u003e\u003c/a\u003e\n  \u003ca href=\"../../actions/workflows/deploy.yml\"\u003e\u003cimg src=\"https://github.com/ibuildrun/tic-tac-toe-pastel/actions/workflows/deploy.yml/badge.svg\" alt=\"Deploy\"/\u003e\u003c/a\u003e\n  \u003ca href=\"../../releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/ibuildrun/tic-tac-toe-pastel?style=flat-square\" alt=\"Release\"/\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/ibuildrun/tic-tac-toe-pastel?style=flat-square\" alt=\"License\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eTic-Tac-Toe Pastel\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eA cozy tic-tac-toe game with pastel aesthetics\u003c/strong\u003e\u003cbr\u003e\n  Telegram Mini App featuring gamification, achievements, and rewards\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://t.me/TicTacToe_3242_robot\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Play%20Now-Telegram-26A5E4?style=for-the-badge\" alt=\"Play\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://ibuildrun.github.io/tic-tac-toe-pastel/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Live%20Demo-GitHub%20Pages-222?style=for-the-badge\u0026logo=github\" alt=\"Demo\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n### Game Modes\n- **Classic** - Standard tic-tac-toe against AI (easy/hard difficulty) or local two-player mode\n- **Zen Mode** - Infinite gameplay where oldest moves fade after 3 moves per player\n\n### Economy and Engagement\n- **Hearts** - In-game currency for purchases\n- **Fortune Wheel** - Daily rewards with randomized prizes\n- **Daily Quests** - Tasks with progress tracking and rewards\n- **Achievements** - Unlockable badges for gameplay milestones\n- **Promo Codes** - Generated on wins, redeemable for bonuses\n\n### Customization\n- **Themes** - Classic, Love, Nature visual styles\n- **Wallpapers** - Dreamy, Midnight, Sakura, Fresh backgrounds\n- **Stickers** - Emoji reactions for in-game communication\n- **Avatars** - Cute animal characters (cat, dog, rabbit, etc.)\n- **Affirmations** - Collectible cards with positive messages\n\n### AI Opponent\n- Minimax algorithm for hard difficulty\n- Reactive phrases and emotions\n- Adaptive difficulty levels\n\n---\n\n## Tech Stack\n\n| Category | Technologies |\n|----------|--------------|\n| **Frontend** | React 19, TypeScript 5.8, Vite 6 |\n| **Styling** | Tailwind CSS (utility-first) |\n| **Icons** | Lucide React |\n| **Audio** | Web Audio API (synthesized sounds) |\n| **Storage** | LocalStorage |\n| **Platform** | Telegram WebApp API |\n| **Backend** | Express.js, Node.js |\n| **Deployment** | Docker, Docker Compose |\n\n---\n\n## Quick Start\n\n### Prerequisites\n- Node.js 18+\n- npm or yarn\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/randomu3/tic-tac-toe-pastel.git\ncd tic-tac-toe-pastel\n\n# Install dependencies\nnpm install\n\n# Start development server\nnpm run dev\n```\n\nThe application will be available at http://localhost:3000\n\n### Docker Deployment\n\n```bash\n# Copy environment template\ncp .env.example .env\n\n# Configure required variables in .env\n# BOT_TOKEN, TUNA_TOKEN, etc.\n\n# Start the full stack\ndocker-compose up -d\n```\n\n---\n\n## Project Structure\n\n```\n├── App.tsx              # Main component - state management, game loop\n├── index.tsx            # React entry point\n├── types.ts             # TypeScript types and interfaces\n├── components/          # UI components\n│   ├── Cell.tsx         # Game board cell\n│   ├── CardReveal.tsx   # Affirmation card animation\n│   ├── Decorations.tsx  # Background decorations and particles\n│   ├── FortuneWheel.tsx # Daily reward wheel\n│   ├── JournalModal.tsx # Affirmation journal\n│   ├── LivingAvatar.tsx # Animated avatar\n│   ├── Overlay.tsx      # Win/lose overlays\n│   └── StatsModal.tsx   # Statistics modal\n├── services/            # Business logic\n│   ├── gameLogic.ts     # Game rules, AI (minimax), configs\n│   ├── audioService.ts  # Web Audio API sounds\n│   ├── storage.ts       # LocalStorage persistence\n│   └── telegramService.ts # Telegram WebApp API wrapper\n├── server/              # Backend API\n│   └── src/\n│       └── index.ts     # Express server\n└── docker-compose.yml   # Docker configuration\n```\n\n---\n\n## Scripts\n\n```bash\nnpm run dev      # Start dev server (port 3000)\nnpm run build    # Production build\nnpm run preview  # Preview production build\n```\n\n### Backend\n\n```bash\ncd server\nnpm install\nnpm run dev      # Start with hot-reload\nnpm run test     # Run tests\n```\n\n---\n\n## Environment Variables\n\nCreate a `.env` file in the project root:\n\n```env\n# Required\nBOT_TOKEN=your_telegram_bot_token\n\n# Optional (for tunnel deployment)\nTUNA_TOKEN=your_tuna_token\nTUNA_FRONTEND_SUBDOMAIN=your-frontend-subdomain\nTUNA_BACKEND_SUBDOMAIN=your-backend-subdomain\nWEBAPP_URL=https://your-frontend-url\nBACKEND_URL=https://your-backend-url\n```\n\n---\n\n## Telegram Mini App Setup\n\n### 1. Create a Bot\n\n1. Open [@BotFather](https://t.me/BotFather) in Telegram\n2. Send `/newbot` and follow the prompts\n3. Save the bot token (format: `123456789:ABCdefGHIjklMNOpqrsTUVwxyz`)\n\n### 2. Configure the Mini App\n\nSend these commands to @BotFather:\n\n```\n/setmenubutton\n```\nSelect your bot, then choose \"Configure menu button\" and set:\n- Button text: `Play Game`\n- Web App URL: Your deployed frontend URL\n\nAlternatively, use the Telegram Bot API:\n\n```bash\ncurl -X POST \"https://api.telegram.org/bot\u003cBOT_TOKEN\u003e/setChatMenuButton\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"menu_button\": {\n      \"type\": \"web_app\",\n      \"text\": \"Play Game\",\n      \"web_app\": {\"url\": \"https://your-frontend-url\"}\n    }\n  }'\n```\n\n### 3. Set Up Webhook\n\n```bash\ncurl -X POST \"https://api.telegram.org/bot\u003cBOT_TOKEN\u003e/setWebhook\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"url\": \"https://your-backend-url/webhook\"}'\n```\n\n### 4. Configure Bot Commands\n\n```bash\ncurl -X POST \"https://api.telegram.org/bot\u003cBOT_TOKEN\u003e/setMyCommands\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"commands\": [\n      {\"command\": \"start\", \"description\": \"Start the game\"},\n      {\"command\": \"play\", \"description\": \"Quick play\"},\n      {\"command\": \"stats\", \"description\": \"View statistics\"},\n      {\"command\": \"daily\", \"description\": \"Daily rewards\"},\n      {\"command\": \"shop\", \"description\": \"Open shop\"},\n      {\"command\": \"promo\", \"description\": \"Promo codes info\"},\n      {\"command\": \"hearts\", \"description\": \"Hearts balance\"},\n      {\"command\": \"about\", \"description\": \"About the game\"},\n      {\"command\": \"support\", \"description\": \"Get help\"}\n    ]\n  }'\n```\n\n---\n\n## Tunnel Deployment with Tuna\n\n[Tuna](https://tuna.am) is a tunneling service that exposes local servers to the internet with custom subdomains.\n\n### Setup\n\n1. Get a Tuna token from [tuna.am](https://tuna.am)\n\n2. Configure environment variables:\n```env\nTUNA_TOKEN=your_tuna_token\nTUNA_FRONTEND_SUBDOMAIN=myapp\nTUNA_BACKEND_SUBDOMAIN=myapp-api\n```\n\n3. Start with Docker Compose:\n```bash\ndocker-compose up -d\n```\n\nYour app will be available at:\n- Frontend: `https://myapp.ru.tuna.am`\n- Backend: `https://myapp-api.ru.tuna.am`\n\n### Manual Tunnel (Development)\n\n```bash\n# Install tuna CLI\n# See: https://tuna.am/docs\n\n# Save token\ntuna config save-token YOUR_TOKEN\n\n# Start tunnel\ntuna http 3000 --subdomain=myapp\n```\n\n---\n\n## Achievements\n\n| Achievement | Description |\n|-------------|-------------|\n| First Steps | Win your first game |\n| On Fire | Win 3 games in a row |\n| Veteran | Play 20 games |\n| Champion | Reach 10 total wins |\n| Peacekeeper | Get 5 draws |\n\n---\n\n## Bot Commands\n\n| Command | Description |\n|---------|-------------|\n| `/start` | Launch the game |\n| `/stats` | View player statistics |\n| `/daily` | Check daily rewards |\n| `/shop` | Open the shop |\n| `/promo` | Promo codes information |\n| `/hearts` | Hearts balance |\n| `/about` | About the application |\n| `/support` | Get help |\n\n---\n\n## License\n\nMIT License - feel free to use and modify!\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built with React and TypeScript\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibuildrun%2Ftic-tac-toe-pastel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibuildrun%2Ftic-tac-toe-pastel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibuildrun%2Ftic-tac-toe-pastel/lists"}