{"id":31698788,"url":"https://github.com/makarenos/bridge-status-bot","last_synced_at":"2026-05-15T08:40:36.035Z","repository":{"id":318615302,"uuid":"1072029847","full_name":"makarenos/bridge-status-bot","owner":"makarenos","description":"Telegram bot monitoring 5 cross-chain bridges with real-time alerts. FastAPI + async PostgreSQL + Redis.","archived":false,"fork":false,"pushed_at":"2025-10-08T08:33:44.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T08:35:50.841Z","etag":null,"topics":["bridge-monitoring","cryptocurrency","fastapi","python","real-time","telegram-bot","web3","websocket"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makarenos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-08T06:54:43.000Z","updated_at":"2025-10-08T08:33:47.000Z","dependencies_parsed_at":"2025-10-08T08:35:54.022Z","dependency_job_id":null,"html_url":"https://github.com/makarenos/bridge-status-bot","commit_stats":null,"previous_names":["makarenos/bridge-status-bot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/makarenos/bridge-status-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makarenos%2Fbridge-status-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makarenos%2Fbridge-status-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makarenos%2Fbridge-status-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makarenos%2Fbridge-status-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makarenos","download_url":"https://codeload.github.com/makarenos/bridge-status-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makarenos%2Fbridge-status-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000701,"owners_count":26082805,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bridge-monitoring","cryptocurrency","fastapi","python","real-time","telegram-bot","web3","websocket"],"created_at":"2025-10-08T19:10:51.299Z","updated_at":"2025-10-08T19:11:01.806Z","avatar_url":"https://github.com/makarenos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"I'll help you rewrite the README in English with a casual, clear style. Here's the updated version:\n\n# Bridge Status Bot 🌉\n\nA Telegram bot that monitors cross-chain bridges in real-time. Watches bridge status, sends alerts when stuff breaks, and generally makes life easier.\n\n## What It Does\n\n- 🔍 Monitors 5 popular bridges (Stargate, Hop, Arbitrum, Polygon, Optimism)\n- 🚨 Sends Telegram alerts when bridges go down or slow down\n- 📊 Shows incident history\n- 🔔 Flexible notification subscriptions\n- 🌐 REST API + WebSocket for integrations\n- 💾 Stores everything in PostgreSQL\n\n## Quick Start\n\n### What You Need\n\n- Python 3.11+\n- Docker and Docker Compose (for local dev)\n- Telegram bot token (get it from @BotFather)\n\n### Running with Docker (recommended)\n\n```bash\n# Clone the repo\ngit clone \u003cyour-repo-url\u003e\ncd bridge-status-bot\n\n# Copy env file and add your bot token\ncp .env.example .env\n# Edit .env and paste your TELEGRAM_BOT_TOKEN\n\n# Start everything\ndocker-compose up -d\n\n# Check that services are alive\ndocker-compose ps\n\n# View logs\ndocker-compose logs -f bot\n```\n\nDone! Bot is live at `@your_bot_name`, API at `http://localhost:8000`\n\n### Running without Docker (for development)\n\n```bash\n# Virtual environment\npython -m venv venv\nsource venv/bin/activate  # Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Start PostgreSQL and Redis (needs Docker)\ndocker-compose up -d db redis\n\n# Run migrations\nalembic upgrade head\n\n# Seed bridges into database\npython scripts/seed_bridges.py\n\n# Start API\nuvicorn app.main:app --reload\n\n# In another terminal, start bot\npython -m app.bot\n```\n\n## Bot Commands\n\n- `/start` - get started\n- `/status` - current status of all bridges\n- `/subscribe \u003cbridge\u003e` - subscribe to alerts\n- `/unsubscribe \u003cbridge\u003e` - unsubscribe\n- `/list` - list all monitored bridges\n- `/history \u003cbridge\u003e` - 24h history\n- `/incidents` - active problems\n- `/settings` - notification settings\n- `/help` - help info\n\n## API\n\nDocs available at `http://localhost:8000/docs` (Swagger UI)\n\n### Main Endpoints\n\n```\nGET  /api/v1/bridges              - list bridges with current status\nGET  /api/v1/bridges/{id}/status  - bridge status history\nGET  /api/v1/bridges/{id}/incidents - bridge incidents\nGET  /health                       - health check\nWS   /ws                           - WebSocket for real-time updates\n```\n\n## Architecture\n\nProject is split into independent parts:\n\n- **FastAPI server** - REST API + WebSocket\n- **Telegram bot** - separate process with command handlers\n- **Bridge Monitor** - core system, checks bridges and logs status\n- **Notification Service** - sends alerts to subscribers\n- **PostgreSQL** - data storage\n- **Redis** - caching + rate limiting\n\n## Testing\n\n```bash\n# Run all tests\npytest\n\n# With coverage\npytest --cov=app --cov-report=html\n\n# Unit tests only\npytest tests/unit/\n\n# Integration tests only\npytest tests/integration/\n```\n\n## Project Structure\n\n```\nbridge-status-bot/\n├── app/\n│   ├── main.py              # FastAPI app\n│   ├── bot.py               # Telegram bot\n│   ├── config.py            # configs\n│   ├── core/                # basic stuff (DB, Redis)\n│   ├── models/              # SQLAlchemy models\n│   ├── services/            # business logic\n│   ├── api/                 # REST endpoints\n│   ├── telegram/            # bot handlers\n│   └── utils/               # helper functions\n├── tests/                   # tests\n├── alembic/                 # DB migrations\n├── scripts/                 # utilities\n└── docs/                    # documentation\n```\n\n## Bridge Monitoring\n\nBot checks each bridge every 5 minutes (configurable in `.env`).\n\n**Status logic:**\n- 🟢 **UP** - all good, response \u003c 10 seconds\n- 🟡 **SLOW** - sluggish, response 10-30 seconds\n- ⚠️ **WARNING** - problems, response 30-60 seconds or specific metric issues\n- 🔴 **DOWN** - not responding or error\n\nEach bridge has specific checks:\n- **Hop Protocol** - check liquidity (should be \u003e $100K)\n- **Optimism** - withdrawal queue length (should be \u003c 1000)\n- **Arbitrum** - average withdrawal time (should be \u003c 30 minutes)\n- etc.\n\n## DB Migrations\n\n```bash\n# Create new migration\nalembic revision --autogenerate -m \"description of changes\"\n\n# Apply migrations\nalembic upgrade head\n\n# Rollback one migration\nalembic downgrade -1\n\n# Check current version\nalembic current\n```\n\n## Deployment\n\nFor production:\n1. Use external PostgreSQL and Redis (not in Docker)\n2. Set up HTTPS for API\n3. Enable Telegram webhook instead of polling\n4. Add monitoring (Prometheus + Grafana)\n5. Configure logging to external service\n\nMore details in `docs/DEPLOYMENT.md`\n\n## Possible Improvements\n\n- [ ] Add social media monitoring (Twitter/Discord)\n- [ ] ML for incident prediction\n- [ ] More bridges (currently 5, could add 10+)\n- [ ] Web dashboard in React\n- [ ] Bridge fee comparison\n- [ ] Mobile push notifications\n- [ ] CI/CD pipeline\n\n## License\n\nMIT - do whatever you want 🤷‍♂️\n\n## Contact\n\nIf something breaks or you have ideas - open an issue!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakarenos%2Fbridge-status-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakarenos%2Fbridge-status-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakarenos%2Fbridge-status-bot/lists"}