Telegram bot for sending and hatching eggs with beautiful mini app for statistics.
hatch/
├── bot/ # Telegram bot code
│ ├── bot.py # Main bot file
│ ├── requirements.txt
│ └── ...
├── index.html # Mini app
├── styles.css
├── app.js
└── vercel.json
Beautiful mini app for viewing egg hatching statistics, deployed on Vercel.
Live: https://hatch-ruddy.vercel.app
Deployed automatically on Vercel when pushing to main branch.
Set environment variable API_URL to your bot's API endpoint.
Telegram bot @tohatchbot for sending eggs via inline mode.
- Go to https://railway.app
- New Project → Deploy from GitHub repo
- Select this repository
- Set root directory to
bot/ - Add environment variable:
BOT_TOKEN=8439367607:AAGcK4tBrXKkqm5DDG7Sp3YSKEQTX09XqXE
- Railway will automatically detect Python and run
bot.py
After deployment, your bot will have a public API endpoint:
https://your-app.railway.app/api/stats?user_id={user_id}
Update API_URL in Vercel to point to this endpoint.
- ✅ Inline mode for sending eggs
- ✅ Only recipients can hatch eggs
- ✅ Statistics tracking
- ✅ Beautiful mini app with modern design
- ✅ Real-time stats updates
- Deploy bot on Railway (see above)
- Get public API URL
- Update
API_URLin Vercel
- Already deployed on Vercel
- Set
API_URLenvironment variable - Done!
- Bot: Python, python-telegram-bot, aiohttp
- Mini App: HTML, CSS, JavaScript, Telegram WebApp API
- Hosting: Railway (bot), Vercel (mini app)