Project Overview
Introduction
OLJAlerts SaaS transforms the concept of job alerts into a multi-tenant web application where each user brings their own Telegram bot. Users register via web or Google OAuth, connect their bot token, manage keyword subscriptions through a modern dashboard, and receive real-time alerts powered by PostgreSQL's LISTEN/NOTIFY mechanism. Built with Django, Celery, and Redis, the platform offers a freemium model with robust security and modern UI.
Challenges
⏺ Multi-Tenant Architecture: Building a system where each user has their own Telegram bot while maintaining data isolation and security.
⏺ Real-Time Processing: Implementing instant job matching and alerts without polling overhead or delays.
⏺ Bot Security: Encrypting bot tokens at rest and validating connectivity without exposing credentials.
⏺ Subscription Management: Implementing tiered keyword limits and user quota enforcement.
⏺ User-Friendly Bot Setup: Simplifying bot connection without requiring webhooks or public URLs.
Solution
The solution uses PostgreSQL LISTEN/NOTIFY triggers for real-time event-driven architecture. When a new job is scraped from OnlineJobs.ph, a trigger fires a NOTIFY event that a dedicated Celery worker listens for. The worker processes jobs, matches them against user keywords using word-boundary regex, and delivers alerts via Telegram API. Bot setup is simplified using @getidsbot for Chat ID (no webhooks needed), and all bot tokens are encrypted with cryptography.fernet. The entire system runs in Docker Compose with data persistence.
Key Features
✔ Multi-Tenant Bot System: 1 user : 1 Telegram bot.
✔ Real-Time Alerts: PostgreSQL triggers for instant job processing.
✔ Web-Based Keyword Management: Full CRUD with validation and tier limits.
✔ Subscription Tiers: Free tier and Contributor tier with charity donations.
✔ Simplified Bot Setup: Uses @getidsbot for Chat ID.
✔ Modern UI: Tailwind CSS sidebar layout with responsive design.
✔ Automated Scraping: Built-in scraper with rate limiting and anti-dupe.
✔ Alert History: Track sent alerts, anti-dupe, automatic cleanup after 2 weeks.
Tools Used
Cloudflare
Github
Git