Garden Weather Bot

Smart Telegram bot for gardeners โ€” automated weather notifications that help make informed decisions about plant care.

Live Project & Real-Time Status

Live Status Monitor

Garden Bot Live Status

Loading real-time status...

Status: ๐ŸŸข Online

Users: 40+ active gardeners

Uptime: 99.8%

The status widget above shows real-time monitoring including uptime, active users, system health checks, and 24-hour activity metrics.

Problem

Gardeners and farmers spend significant time checking weather forecasts to:

  • Determine if plants need watering
  • Find optimal timing for garden work
  • Prepare for adverse weather conditions

Solution

Garden Bot automatically sends personalized notifications based on:

  • User location โ€” precise data for specific areas
  • Custom thresholds โ€” configurable conditions for alerts
  • Real-time data โ€” integration with OpenWeatherMap API

Key Features

Geolocation

  • GPS coordinates support
  • City name search
  • Automatic timezone detection

Notification Settings

  • Temperature and humidity thresholds
  • Customizable notification timing
  • Enable/disable toggle

Weather Data

  • Current weather and 5-day forecast
  • Temperature, humidity, wind speed
  • Precipitation probability

Automation

  • Daily weather checks
  • Smart notifications only when needed
  • Reliable task scheduler

Tech Stack

Backend

  • Node.js + TypeScript โ€” type safety and modern JavaScript
  • Telegraf.js โ€” powerful Telegram Bot API library
  • Express.js โ€” web server for status and API
  • node-cron โ€” task scheduler

External APIs

  • OpenWeatherMap API โ€” reliable weather data
  • Telegram Bot API โ€” user interaction
  • Google reCAPTCHA โ€” bot protection

Infrastructure

  • Fly.io โ€” cloud hosting with auto-scaling
  • Docker โ€” application containerization
  • GitHub Actions โ€” CI/CD pipeline

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Telegram      โ”‚    โ”‚   Garden Bot    โ”‚    โ”‚  OpenWeather    โ”‚
โ”‚     Users       โ”‚โ—„โ”€โ”€โ–บโ”‚     Server      โ”‚โ—„โ”€โ”€โ–บโ”‚      API        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                              โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚   File System   โ”‚
                       โ”‚   User Data     โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Bot Commands

CommandDescription
/startInitialize bot interaction
/locationSet user location
/thresholdConfigure threshold values
/statusView current settings
/toggleEnable/disable notifications
/helpCommand reference

Implementation Highlights

Security

  • Comprehensive user input validation
  • reCAPTCHA spam protection
  • Secure token storage in environment variables

Monitoring

  • Detailed action logging
  • Performance metrics
  • Web interface for status monitoring

UX/UI

  • Intuitive command structure
  • Friendly Russian language messages
  • Quick setup in just a few steps

Performance

  • Asynchronous request processing
  • Weather data caching
  • Optimized API calls

Source Code & Project Structure

Open source project on GitHub: github.com/avlihachev/garden_bot

Project Structure

garden_bot/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ bot/              # Telegram bot logic
โ”‚   โ”œโ”€โ”€ services/         # Business logic services
โ”‚   โ”œโ”€โ”€ config.ts         # Configuration
โ”‚   โ””โ”€โ”€ index.ts          # Application entry point
โ”œโ”€โ”€ public/               # Static files
โ”œโ”€โ”€ Dockerfile           # Containerization
โ”œโ”€โ”€ fly.toml            # Fly.io configuration
โ””โ”€โ”€ package.json        # Node.js dependencies

Results & Metrics

Experience Gained

  • TypeScript โ€” strict typing for reliability
  • Telegram Bot API โ€” messenger platform integration
  • Cloud technologies โ€” Fly.io deployment
  • API integrations โ€” external service integration
  • Monitoring โ€” dashboard creation for tracking

Technical Achievements

Reliability

  • Automatic error recovery
  • Graceful shutdown handling
  • Data validation at all levels

Scalability

  • Modular architecture
  • Horizontal scaling readiness
  • Efficient resource utilization

Code Quality

  • 100% TypeScript coverage
  • Linting and formatting
  • Well-documented codebase

Technical Skills Showcased:

  • Full-stack development with modern JavaScript/TypeScript
  • API integration and real-time data processing
  • Bot development and conversational UI design
  • Cloud deployment and DevOps practices
  • Database design and user data management

Garden Weather Bot demonstrates a modern approach to solving everyday problems through automation and intelligent notifications. The project showcases full-stack development skills from concept to production deployment.

Get Custom Solutions

Interested in building your own Telegram bot or automation system? I create custom solutions for businesses and individuals.


Garden Bot is actively maintained and continuously improved based on user feedback. The complete source code is available on GitHub, and I’m always happy to discuss technical implementation details.