This repository contains two full-stack applications: a Rule Engine and a Weather Monitoring system. Both applications are containerized using Docker for easy deployment and testing.
- Rule Engine with AST: https://rule-engine-sand.vercel.app/
- Weather Monitor : https://weather-monitor-tau.vercel.app/
- Frontend: Next.js
- Backend: Golang (Gin Framework)
- Database: MongoDB
- Frontend: Next.js
- Backend: Golang (Gin Framework)
- Database: PostgreSQL (TimescaleDB)
- Rule Creation and Management
- Create individual rules with multiple conditions
- Combine 2+ rules with complex logical operations
- Real-time rule evaluation based on input data
- Optimized queries for:
- Rule creation
- Rule combination
- Rule evaluation
- Rule optimization
- Intelligent rule merging strategy:
- Identifies and isolates common conditions for single evaluation
- Preserves rule semantics during combination
- Rules without common conditions: Combined using AND operations
- Rules with common conditions: Merged using OR operations after extracting common conditions
- Multi-City Weather Tracking
- Real-time monitoring of three cities
- Data collection every 5 minutes
- Tracks:
- Current temperature
- "Feels like" temperature
- Dominant weather condition
- Daily Data Aggregation and Rollups:
- Maximum temperature
- Minimum temperature
- Average temperature
- Per-city analysis
- Customizable Alert System
- User-defined temperature thresholds for each city
- Automated notification system
- City-specific alert configurations
- Query optimization using:
- Database Views
- TimescaleDB time_bucket function
- Efficient data rollup strategies
There are two ways to run these applications:
- Clone the repository:
git clone https://github.com/TejasThombare20/RuleEngine-WeatherMonitor.git
cd zeotap- Start all services using Docker Compose:
docker-compose up -d- Access the applications:
- Rule Engine: http://localhost:3001
- Weather Monitor: http://localhost:3002
- Pull the image:
docker pull tejasthombare/zeotap- Run the container:
docker run -d \
-p 3001:3000 \
-p 3002:3000 \
-p 8000:8000 \
-p 9000:9000 \
tejasthombare/zeotap- Access the applications:
- Rule Engine Frontend: http://localhost:3001
- Rule Engine Backend: http://localhost:8000
- Weather Monitor Frontend: http://localhost:3002
- Weather Monitor Backend: http://localhost:9000
- Frontend: 3001
- Backend API: 8000
- Frontend: 3002
- Backend API: 9000
.
├── rule_engine/
│ ├── client/ # Next.js frontend
│ └── server/ # Golang backend
├── weather_monitoring/
│ ├── client/ # Next.js frontend
│ └── server/ # Golang backend
├── Dockerfile
├── docker-compose.yml
└── README.md