{"id":31287464,"url":"https://github.com/valpere/shopogoda","last_synced_at":"2026-04-07T07:47:25.022Z","repository":{"id":315770522,"uuid":"1060750767","full_name":"valpere/shopogoda","owner":"valpere","description":"ShoPogoda is a production-ready Telegram bot built with Go and gotgbot framework, designed for corporate weather monitoring, environmental compliance, and employee safety alerts. This project demonstrates advanced backend development, enterprise architecture, and DevOps practices suitable for senior-level portfolio showcasing.","archived":false,"fork":false,"pushed_at":"2026-03-30T09:24:29.000Z","size":996,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T07:47:20.431Z","etag":null,"topics":["air-quality","clean-architecture","cloud-deployment","docker","enterprise-bot","environmental-alerts","golang","gotgbot","health-checks","localization","monitoring","openweathermap-api","postgresql","railway","redis","security","supabase","telegram-bot","upstash","weather-monitoring"],"latest_commit_sha":null,"homepage":"https://valpere.github.io/projects/shopogoda/","language":"Go","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/valpere.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/ROADMAP.md","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-09-20T14:15:24.000Z","updated_at":"2026-03-24T08:15:15.000Z","dependencies_parsed_at":"2025-09-20T17:29:08.713Z","dependency_job_id":"07cf18bb-c29b-4ada-9ffb-f324e60211bb","html_url":"https://github.com/valpere/shopogoda","commit_stats":null,"previous_names":["valpere/shopogoda"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/valpere/shopogoda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valpere%2Fshopogoda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valpere%2Fshopogoda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valpere%2Fshopogoda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valpere%2Fshopogoda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valpere","download_url":"https://codeload.github.com/valpere/shopogoda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valpere%2Fshopogoda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["air-quality","clean-architecture","cloud-deployment","docker","enterprise-bot","environmental-alerts","golang","gotgbot","health-checks","localization","monitoring","openweathermap-api","postgresql","railway","redis","security","supabase","telegram-bot","upstash","weather-monitoring"],"created_at":"2025-09-24T11:01:40.022Z","updated_at":"2026-04-07T07:47:24.992Z","avatar_url":"https://github.com/valpere.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShoPogoda (Що Погода) - Enterprise Weather Bot\n\n[![Go Version](https://img.shields.io/badge/Go-1.24%2B-00ADD8?style=flat\u0026logo=go)](https://golang.org/)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/valpere/shopogoda)](https://goreportcard.com/report/github.com/valpere/shopogoda)\n[![codecov](https://codecov.io/gh/valpere/shopogoda/branch/main/graph/badge.svg)](https://codecov.io/gh/valpere/shopogoda)\n[![GitHub release](https://img.shields.io/github/release/valpere/shopogoda.svg)](https://github.com/valpere/shopogoda/releases)\n\nA production-ready Telegram bot for weather monitoring, environmental alerts, and enterprise integrations. Currently deployed on Railway with Supabase PostgreSQL and Upstash Redis.\n\n## Live Demo\n\n- **🇺🇦 Ukrainian (uk)**: [Жива демонстрація](https://t.me/shopogoda_bot)\n- **🇺🇸 English (en)**: [Live demonstration](https://t.me/shopogoda_bot)\n- **🇩🇪 German (de)**: [Live-Demonstration](https://t.me/shopogoda_bot)\n- **🇫🇷 French (fr)**: [Démonstration en direct](https://t.me/shopogoda_bot)\n- **🇪🇸 Spanish (es)**: [Demostración en vivo](https://t.me/shopogoda_bot)\n\n## 🌟 Features\n\n### Core Weather Services\n- **Real-time Weather Data**: Current conditions with comprehensive metrics\n- **5-Day Forecasts**: Detailed weather predictions\n- **Air Quality Monitoring**: AQI and pollutant tracking\n- **Smart Location Management**: Single location per user with GPS and name-based input\n- **Multi-language Support**: Complete localization in Ukrainian, English, German, French, and Spanish with dynamic language switching\n\n### Enterprise Features\n- **Advanced Alert System**: Custom thresholds with interactive management (edit, toggle, delete)\n- **Slack/Teams Integration**: Automated notifications\n- **Role-Based Access Control**: Admin, moderator, and user roles\n- **Monitoring \u0026 Analytics**: Prometheus metrics and Grafana dashboards\n- **High Availability**: Redis caching and PostgreSQL clustering\n\n### Technical Excellence\n- **Scalable Architecture**: Microservices-ready design\n- **Comprehensive Testing**: 33.7% coverage (40.5% on testable packages) with unit, integration, and bot mock tests\n- **Production Ready**: Docker containerization and CI/CD\n- **Enterprise Security**: Rate limiting, input validation, audit logs\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n**For Local Development:**\n- Go 1.24+\n- Docker \u0026 Docker Compose\n- Telegram Bot Token (from @BotFather)\n- OpenWeatherMap API Key\n\n**For Production Deployment:**\n- Railway account (free tier available)\n- Supabase account (PostgreSQL - free tier)\n- Upstash account (Redis - free tier)\n\n### Setup Commands\n\n```bash\n# 1. Clone and initialize\ngit clone https://github.com/valpere/shopogoda.git\ncd shopogoda\nmake init\n\n# 2. Configure environment\ncp .env.example .env\n# Edit .env with your API keys\n\n# 3. Start development environment\nmake dev\n\n# 4. Run the bot\nmake run\n```\n\n**📖 For detailed demo setup instructions:** [DEMO_GUIDE.md](docs/DEMO_GUIDE.md)\n\n### Configuration\n\nShoPogoda supports multiple configuration methods for different deployment scenarios:\n\n#### Quick Setup (Development)\n\n1. Copy the example environment file:\n```bash\ncp .env.example .env\n```\n\n2. Edit `.env` with your credentials:\n```bash\n# Required\nTELEGRAM_BOT_TOKEN=your_telegram_bot_token\nOPENWEATHER_API_KEY=your_openweather_api_key\n\n# Optional\nSLACK_WEBHOOK_URL=your_slack_webhook_url\nBOT_DEBUG=true\nLOG_LEVEL=debug\n```\n\n#### Configuration Methods\n\nShoPogoda uses a hierarchical configuration system with the following precedence:\n\n1. **Environment Variables** (highest priority)\n2. **.env file** in current directory\n3. **YAML configuration files** (first found):\n   - `./shopogoda.yaml` (current directory)\n   - `~/.shopogoda.yaml` (home directory)\n   - `~/.config/shopogoda.yaml` (user config directory)\n   - `/etc/shopogoda.yaml` (system-wide)\n4. **Built-in defaults** (lowest priority)\n\n#### YAML Configuration\n\nFor production deployments, create a `shopogoda.yaml` file:\n\n```yaml\n# Bot configuration\nbot:\n  debug: false\n  webhook_url: \"https://yourdomain.com/webhook\"\n  webhook_port: 8080\n\n# Database configuration\ndatabase:\n  host: localhost\n  port: 5432\n  user: shopogoda\n  name: shopogoda\n  ssl_mode: require  # Enable for production\n\n# Weather service configuration\nweather:\n  user_agent: \"ShoPogoda-Weather-Bot/1.0 (your-contact@example.com)\"\n\n# Logging configuration\nlogging:\n  level: info\n  format: json\n```\n\n**📖 For complete configuration reference, deployment examples, and troubleshooting:** [Configuration Guide](docs/CONFIGURATION.md)\n\n## 📊 Monitoring\n\nAccess the monitoring stack:\n\n- **Grafana**: http://localhost:3000 (admin/admin123)\n- **Prometheus**: http://localhost:9090\n- **Jaeger Tracing**: http://localhost:16686\n- **Bot Health**: http://localhost:8080/health\n- **Metrics**: http://localhost:8080/metrics\n\n## 🏗️ Architecture\n\n```\nshopogoda/\n├── cmd/bot/              # Application entrypoints\n├── internal/             # Private application code\n│   ├── bot/             # Bot initialization and setup\n│   ├── config/          # Configuration management\n│   ├── database/        # Database connections\n│   ├── handlers/        # Telegram command handlers\n│   ├── locales/         # Translation files (en, de, es, fr, uk)\n│   ├── middleware/      # Bot middleware (auth, logging)\n│   ├── models/          # Data models and structs\n│   └── services/        # Business logic services (incl. localization)\n├── pkg/                 # Public libraries\n│   ├── weather/         # Weather API clients\n│   ├── alerts/          # Alert engine\n│   └── metrics/         # Prometheus metrics\n└── deployments/         # Docker, K8s configurations\n```\n\n## 🔧 Development\n\n### Available Commands\n\n```bash\nmake help           # Show all available commands\nmake deps           # Install dependencies\nmake build          # Build the application\nmake test           # Run tests\nmake test-coverage  # Run tests with coverage\nmake lint           # Run linter\nmake docker-build   # Build Docker image\nmake migrate        # Run database migrations\n```\n\n## 🚀 Deployment\n\n### Production Deployment (Railway)\n\n**Currently deployed and running in production:**\n\n```bash\n# Quick deploy to Railway (recommended)\nrailway login\nrailway init\nrailway up\n\n# Configure environment variables in Railway dashboard\n# See docs/DEPLOYMENT_RAILWAY.md for complete guide\n```\n\n**Live Production:**\n- Health: https://shopogoda-svc-production.up.railway.app/health\n- Stack: Railway + Supabase (PostgreSQL) + Upstash (Redis)\n- Cost: $0/month (free tier)\n- Status: ✅ Production-ready\n\n**📖 Complete deployment guide:** [DEPLOYMENT_RAILWAY.md](docs/DEPLOYMENT_RAILWAY.md)\n\n### Alternative Deployment Options\n\nThe bot supports multiple platforms:\n- **Railway** - Primary production platform (free tier, 500 hrs/month)\n- **Vercel** - Serverless functions (free tier, 100GB bandwidth/month)\n- **Fly.io** - Global edge deployment (~$5-10/month)\n- **Replit** - All-in-one IDE (free with sleep, $20/month always-on)\n- **Docker** - Traditional container deployment (any cloud)\n\n**📖 Platform comparison:** [DEPLOYMENT.md](docs/DEPLOYMENT.md)\n\n## 📈 Performance\n\n**Production Metrics (Railway deployment):**\n- **Response Time**: \u003c 500ms average (including cold starts)\n- **Uptime**: 99.5%+ on free tier\n- **Cache Hit Rate**: \u003e 85% (Upstash Redis)\n- **Database Latency**: 100-200ms (Supabase pooler)\n- **Database Indexes**: Optimized composite indexes for 2-3x faster queries\n\n**Free Tier Limits:**\n- Railway: 500 execution hours/month (continuous uptime: ~20.8 days; webhook mode requires always-on)\n- Supabase: 500MB storage, 2GB bandwidth/month\n- Upstash: 10,000 commands/day (~6.9 commands/minute on average; actual usage varies by traffic patterns)\n\n## 🔒 Security\n\n- **Row Level Security (RLS)**: Supabase PostgREST API secured with deny-by-default policies\n- **Input Validation**: Comprehensive validation and sanitization of all user inputs\n- **Rate Limiting**: 10 requests/minute per user to prevent abuse\n- **SQL Injection Prevention**: GORM ORM with parameterized queries\n- **Secure Credential Management**: Environment variables and secret management\n- **Audit Logging**: Complete audit trail for compliance and monitoring\n\n**📖 Security documentation:** [DATABASE_SECURITY.md](docs/DATABASE_SECURITY.md)\n\n## 🌐 Multi-Language Support\n\nShoPogoda offers comprehensive internationalization with complete localization in 5 languages:\n\n- **🇺🇦 Ukrainian (uk)**: Native support with cultural considerations\n- **🇺🇸 English (en)**: Default language with comprehensive coverage\n- **🇩🇪 German (de)**: Full localization for German-speaking regions\n- **🇫🇷 French (fr)**: Complete French translation\n- **🇪🇸 Spanish (es)**: Full Spanish localization\n\n### Language Features\n- **Dynamic Language Switching**: Users can change language anytime via `/settings`\n- **Persistent Preferences**: Language settings are saved and preserved across sessions\n- **Complete UI Localization**: All bot messages, buttons, and help text translated\n- **Timezone Independence**: Language and timezone settings are managed separately\n- **Fallback System**: Automatic fallback to English for missing translations\n\n## 📚 Documentation\n\n### User Guides\n- **[Demo Guide](docs/DEMO_GUIDE.md)** - Get started in 5 minutes with demo mode\n- **[Configuration Guide](docs/CONFIGURATION.md)** - Complete configuration reference\n- **[Deployment Guide](docs/DEPLOYMENT.md)** - Production deployment instructions\n- **[Admin Setup Guide](docs/ADMIN_SETUP.md)** - Grant admin access to bot owners\n\n### Developer Documentation\n- **[Contributing Guide](CONTRIBUTING.md)** - How to contribute to the project\n- **[Architecture](docs/ARCHITECTURE.md)** - System architecture and design\n- **[API Reference](docs/API_REFERENCE.md)** - Complete service layer API documentation\n- **[Testing Guide](docs/TESTING.md)** - Comprehensive testing documentation (33.7% overall, 40.5% testable packages)\n- **[Database Migration Guide](docs/DATABASE_MIGRATION_GUIDE.md)** - When to run SQL patches and migrations\n- **[Database Security](docs/DATABASE_SECURITY.md)** - Row Level Security (RLS) implementation guide\n- **[Code Quality Guidelines](docs/CODE_QUALITY.md)** - Contribution standards\n\n### Project Management\n- **[Roadmap](docs/ROADMAP.md)** - Feature roadmap and future plans\n- **[Release Process](docs/RELEASE_PROCESS.md)** - Release management guide\n- **[Changelog](CHANGELOG.md)** - Version history and changes\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🆘 Support\n\nFor enterprise support and custom development:\n- LinkedIn: [valentynsolomko](https://linkedin.com/in/valentynsolomko)\n- GitHub: [valpere](https://github.com/valpere)\n\n---\n\n**Built with ❤️ by Valentyn Solomko - Senior Backend Engineering Leader**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalpere%2Fshopogoda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalpere%2Fshopogoda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalpere%2Fshopogoda/lists"}