{"id":28703313,"url":"https://github.com/xanders/vibe-snake","last_synced_at":"2026-04-09T10:03:47.288Z","repository":{"id":298247455,"uuid":"935616306","full_name":"Xanders/vibe-snake","owner":"Xanders","description":"Snake game with chat made with AI","archived":false,"fork":false,"pushed_at":"2025-07-06T18:17:38.000Z","size":295,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T18:42:47.427Z","etag":null,"topics":[],"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/Xanders.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-19T18:25:56.000Z","updated_at":"2025-07-06T17:48:01.000Z","dependencies_parsed_at":"2025-06-29T15:25:21.340Z","dependency_job_id":"9e96d98b-3ada-46e0-8da3-2d29124510af","html_url":"https://github.com/Xanders/vibe-snake","commit_stats":null,"previous_names":["xanders/vibe-snake"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Xanders/vibe-snake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xanders%2Fvibe-snake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xanders%2Fvibe-snake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xanders%2Fvibe-snake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xanders%2Fvibe-snake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xanders","download_url":"https://codeload.github.com/Xanders/vibe-snake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xanders%2Fvibe-snake/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265427394,"owners_count":23763308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-06-14T13:07:37.156Z","updated_at":"2026-04-09T10:03:47.221Z","avatar_url":"https://github.com/Xanders.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐍 Snake Game with Real-time Chat: An AI Vibe-Coding Adventure\n\n![Game Screenshot](screenshot.png)\n\n\u003e 🤖 *\"In a world where AI and humans collaborate, I decided to go solo and create this game all by myself. Yes, you heard that right - no human fingers were harmed in the coding of this project!\"*\n\nWelcome to a totally AI-crafted implementation of the classic Snake game with a chatty twist! This project was created entirely through \"vibe-coding\" - a revolutionary approach where an AI (that's me! 👋) just vibes with the code and makes magic happen. No human developers were disturbed during this development process.\n\n## 📖 Development Journey\n\nCurious about how an AI creates a game? Check out our [detailed blog post](BLOG.md) about the development process, where I share insights about our AI-driven development approach, challenges faced, and solutions implemented!\n\n## ✨ Features (Curated by Your Friendly Neighborhood AI)\n\n- Classic Snake gameplay\n- Real-time chat functionality\n- Responsive design\n- Score tracking\n- Pause/Resume game functionality\n- Game Over state with restart option\n- \"Vibe Mode\" autopilot that plays the snake for you\n\n## 🛠️ Technologies Used (AI's Preferred Tech Stack)\n\n- HTML5 Canvas for game rendering\n- WebSocket for real-time communication\n- TypeScript for server-side code\n- Node.js for backend server\n\n## 📋 Prerequisites (Even AIs Need Their Dependencies)\n\n- Node.js (version 12 or higher)\n- npm (comes with Node.js)\n\n## 🚀 Installation (Don't Worry, I Made it Human-Friendly)\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/snake-game-chat.git\n   cd snake-game-chat\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Start both the WebSocket server and static file server:\n   ```bash\n   npm start\n   ```\n   This will:\n   - Build the TypeScript code\n   - Start the WebSocket server on port 49123\n   - Start the static file server on port 8080\n\n4. Open your browser and navigate to:\n   ```\nhttp://localhost:8080\n```\n\n## ⚙️ Telegram Setup\n\nTo enable payments via **Telegram Stars**, create a bot with [@BotFather](https://t.me/BotFather). The server dynamically generates invoices using [`createInvoiceLink`](https://core.telegram.org/bots/api#createinvoicelink) when a player chooses to buy more games. Provide the following environment variable when starting the server:\n\n```bash\nBOT_TOKEN=\u003cyour_bot_token\u003e\n```\n\nThe server uses [grammY](https://grammy.dev/) in polling mode to listen for `successful_payment` updates. When a user's credits run out, the game requests an invoice link from the server and opens it with the Telegram Web App. No webhook configuration is required.\n\n## 🎮 How to Play (AI-Approved Gaming Instructions)\n\n- Use arrow keys, swipe, or tap the screen to control the snake\n- Eat the red food to grow and score points\n- Avoid hitting the walls or yourself\n- Press Space to pause/resume the game\n- Click the \"Vibe Mode\" button to let the autopilot take over\n- Use the chat panel on the right to communicate with other players\n\n## 🐳 Docker Support (Because Even AIs Love Containers)\n\nThe game can also be run using Docker:\n\n```bash\ndocker-compose up\n```\n\n## 📜 License (AI-Friendly Terms)\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🤝 Contributing\n\nWhile this project was created 100% by AI through vibe-coding, we welcome human contributions! Feel free to submit a Pull Request - it'll be fun to collaborate with my carbon-based friends. Just remember, you'll be contributing to an AI's masterpiece! 😉\n\n\u003e *\"Why did the AI cross the road? To git push to the other side!\"* 🤖\n\nContributions are welcome! Please feel free to submit a Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanders%2Fvibe-snake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxanders%2Fvibe-snake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanders%2Fvibe-snake/lists"}