Parasol Sentinel is a high-performance weather monitoring solution designed to showcase scalable architecture using Node.js, Vercel Serverless, and MongoDB. This ecosystem features a proactive Telegram bot and a stunning glassmorphism dashboard, demonstrating expert-level integration of real-time data streaming and cost-optimized API management.
Most weather services are expensive. Parasol Sentinel implements a Hybrid Data Layer to stay 100% within free tiers while providing premium, low-latency data:
- Weatherbit API (Core): Used for ultra-accurate current conditions and 7-day daily forecasts.
- Open-Meteo API (Utility): Integrated as a high-performance fallback and for granular hourly analytics (visualized in Chart.js).
- Smart Data Normalization: A centralized logic layer converts diverse API responses into a unified, lightweight data format.
- Smart Caching Layer: Implemented a 120-minute time-aware caching system in MongoDB to minimize redundant external API calls and maximize performance.
Unlike passive bots that only respond to user commands, Parasol is proactive:
- Smart Shift Detection: Automated cron-based analysis detects significant temperature shifts (โฅ5ยฐC) or sudden precipitation threats and alerts users immediately.
- Comparison Engine: Compares current conditions with the previous evening's state to provide context for "yesterday vs. today" alerts.
- Daily Executive Forecasts: Users receive a condensed 3-day forecast every evening via automated GitHub Action workflows.
Full customization of how you see the weather, with instant synchronization between the bot and the dashboard:
- Temperature: Toggle between Celsius (ยฐC) and Fahrenheit (ยฐF).
- Wind Speed: Choose between m/s and km/h.
- Atmospheric Pressure: Support for mmHg and hPa.
- Unified Preferences: Settings adjusted in the Telegram Bot are instantly reflected in the WebApp dashboard and vice versa.
- Cryptographic Protection: Implemented HMAC-based URL signatures to ensure that private per-user dashboards are only accessible via authenticated Telegram links.
- Telegram WebApp Integration: Direct settings management within the dashboard using
initDatavalidation for secure, seamless interaction. - Vercel-native Architecture: Tailored for zero-downtime, sub-second execution using isolated serverless functions.
- Lighthouse Optimized: Vanilla JS (ES6+) implementation with zero framework overhead, ensuring Lighthouse scores of 95+.
- Visual Analytics: Interactive data visualization using Chart.js for temperature, wind, and precipitation trends.
- Native Localization: Full bilingual support (Ukrainian & English) across the entire ecosystem, including automatic detection and personalized notifications.
- Backend: Node.js (Vercel Serverless), Mongoose (ODM).
- Frontend: Vanilla HTML5/CSS3 (Modern Glassmorphism), Chart.js, Leaflet.
- Database: MongoDB Atlas (Cloud Database).
- Operations: GitHub Actions (Cron orchestration & Automated deployments).
/api: Serverless endpoints (Webhook, Hybrid Data Service, Settings API, Cron Jobs)./models: Mongoose schemas with unit preference support and indexing./public: Frontend assets optimized for minimal TTFB (Time to First Byte)./utils: Centralized helpers for signature generation, weather transformation, and validation..github/workflows: Scheduled GitHub Actions orchestrating the daily alerts and environment synchronization.
- Environment Config:
- Copy
.env.exampleto.env. - Required:
TG_TOKEN,MONGO_URI,WEATHERBIT_KEY,DOMAIN. - Required:
CRON_SECRET(For security and dashboard URL hashing).
- Copy
- Local Development:
npm install&&npm start(Runs the bot in polling mode).
- Vercel Deployment:
- Connect your repo to Vercel. Pushing to
maintriggers an automatic build. - Set GitHub Secrets for
DOMAINandCRON_SECRETto enable automated GitHub Action workflows.
- Connect your repo to Vercel. Pushing to
Designed and developed by Gearberry โ available for custom ecosystem architecture and high-performance web development.
