HackRadar is a Telegram Bot that tracks upcoming hackathons from 7 major platforms: MLH, Devpost, Devfolio, DoraHacks, Unstop, Kaggle, and Hack2Skill. It fetches data periodically and provides two bot types: an interactive bot for user commands and subscriptions, and a channel bot for automated broadcasting.
- π€ Fully Automated: Fetches and notifies every 12 hours without manual intervention
- π 7 Platform Coverage: Aggregates hackathons from MLH, Devpost, Devfolio, DoraHacks, Unstop, Kaggle, and Hack2Skill
- π¬ Two Bot Types: Interactive bot for users + Channel bot for broadcasting
- π― Dual-Level Filtering: Group-wide preferences + individual user subscriptions with DM alerts
- β‘ Interactive Setup: Rich UI with inline keyboards and buttons for easy configuration
- π Powerful Search: Search, filter by platform, and browse upcoming events on-demand
- User Commands: Search, filter, and browse hackathons with
/search,/platform,/upcoming - Personalized Subscriptions: Subscribe to specific themes and receive DM alerts for matching hackathons
- Group Setup: Configure group preferences with interactive inline keyboards
- Smart Filtering: Filter by platforms and themes to receive only relevant updates
- Pause/Resume Controls: Administrators can pause and resume group notifications
- Automated Broadcasting: Posts ALL new hackathons to a Telegram channel automatically
- No Setup Required: Just add bot to channel and it starts posting
- Rich Formatting: Beautiful messages with event banners, prizes, and registration links
- Scheduled Updates: Runs every 6 hours (configurable)
- Multi-Platform Scraping: Supports 7 major platforms - MLH, Devpost, Devfolio, DoraHacks, Unstop, Kaggle, and Hack2Skill
- Database: Uses PostgreSQL to store hackathon data, group configurations, and user subscriptions
- Dockerized: Easy deployment with Docker Compose
| Command | Description |
|---|---|
/setup |
Configure group preferences (platforms, themes). Uses interactive inline keyboards. |
/pause |
Pause automatic hackathon notifications for the group. |
/resume |
Resume automatic hackathon notifications for the group. |
| Command | Description |
|---|---|
/search [keyword] |
Search for hackathons by keyword (searches titles, tags, and descriptions). |
/platform [name] [count] |
Get the latest hackathons from a specific platform. |
/upcoming [days] |
List hackathons starting in the next X days. |
| Command | Description |
|---|---|
/subscribe [theme] |
Subscribe to DM notifications for a specific theme. Get alerted when matching hackathons are posted. |
/unsubscribe [theme] |
Unsubscribe from a theme's DM notifications. |
/subscriptions |
View all your active subscriptions. |
| Command | Description |
|---|---|
/start |
Welcome message with quick action buttons. |
/help |
View the full command guide with all available commands and usage examples. |
/about |
Learn about HackRadar, view platform statistics, and access support links. |
The channel bot automatically posts ALL new hackathons to a Telegram channel without any user interaction.
- β Posts all hackathons automatically every 12 hours
- β No commands or setup needed (just add to channel)
- β Rich formatting with images and links
- β Perfect for public announcement channels
HackRadar sends visually rich notifications including:
- Title: Event name with a random fun emoji (π, π, π‘, π₯, π», π, etc.).
- Core Details:
- Duration (Start Date - End Date)
- Location
- Mode (Online/In-person/Hybrid)
- Status
- Additional Information (where available from platform APIs):
- π° Prize Pool & Rewards
- π₯ Team Size
- β Eligibility Criteria
- Visuals: Event banner image (when available)
- Interactive Buttons:
π Check Details: Direct link to the official hackathon registration pageπ Set Reminder: Personal reminder feature (Coming Soon)
-
Configure Environment: Copy the example environment file and fill in your details:
cp .env.example .env
Edit
.envwith your Telegram bot tokens and database credentials. -
Run with Docker Compose:
# Start both interactive and channel bots docker compose up -d # Or start only interactive bot docker compose up -d db telegram-bot # Or start only channel bot docker compose up -d db telegram-channel-bot
The bot(s) will start automatically and begin fetching hackathons.
-
Clone the repository:
git clone https://github.com/Spartan-71/Telegram-Hackathon-Bot.git cd Telegram-Hackathon-Bot -
Install dependencies: This project uses
uvfor dependency management.uv pip install -e . -
Set up PostgreSQL: Ensure PostgreSQL is running locally and create a database (e.g.,
hackradar). -
Configure Environment: Create a
.envfile with your database credentials and Telegram bot tokens.cp .env.example .env # Edit .env with your tokens -
Initialize Database:
python -m backend.init_db
-
Run the Bot(s):
# Interactive bot uv run python telegram-bot.py # Or channel bot uv run python telegram-channel-bot.py # Or both (in separate terminals)
HackRadar is built with a modular architecture consisting of several key components:
-
Interactive Bot (
telegram-bot.py):- Handles all user interactions using python-telegram-bot
- Implements commands and inline keyboards for interactive setup
- Manages background tasks using APScheduler (every 12 hours)
- Sends notifications to configured groups and subscriber DMs
- Supports filtering by platform and theme
-
Channel Bot (
telegram-channel-bot.py):- Automated broadcaster for Telegram channels
- Posts ALL new hackathons without filtering
- No user interaction - fully automated
- Runs on same 6-hour schedule
- Perfect for public announcement channels
-
Platform Adapters (
adapters/):- Each adapter is responsible for fetching data from a specific platform
- Supported platforms:
- Devfolio (
devfolio.py): Uses GraphQL API - Devpost (
devpost.py): Web scraping with BeautifulSoup - Unstop (
unstop.py): REST API integration - DoraHacks (
dorahacks.py): REST API integration - MLH (
mlh.py): Uses MLH's public API - Kaggle (
kaggle.py): Kaggle API for competitions - Hack2Skill (
hack2skill.py): REST API integration
- Devfolio (
- Normalizes data from different sources into a unified
Hackathonschema
-
Database Layer (
backend/):- Models (
models.py): SQLAlchemy ORM models for:HackathonDB: Stores all hackathon dataGuildConfig: Stores group-specific preferences (chat ID, platforms, themes, pause state)UserSubscription: Tracks user theme subscriptions for DM alerts
- CRUD Operations (
crud.py): Database query functions for searching, filtering, and managing data - Schemas (
schemas.py): Pydantic models for data validation
- Models (
-
Fetch & Store Engine (
fetch_and_store.py):- Orchestrates the data fetching process across all adapters
- Detects new hackathons by comparing against existing database records
- Returns only newly added events to trigger notifications
- Admin runs
/setupcommand in a Telegram group - Bot presents interactive inline keyboard to select:
- Platforms to track (default: all 7 platforms)
- Themes to filter (AI, Blockchain, Web, Mobile, Data Science, IoT, Cloud, Security)
- Preferences are stored in PostgreSQL
guild_configstable (using chat_id)
- Create a Telegram channel
- Add channel bot as administrator
- Configure
TELEGRAM_CHANNEL_IDin environment - Bot automatically posts all new hackathons to the channel
- Background task triggers
fetch_and_store_hackathons() - All adapters fetch latest data from their respective platforms
- New hackathons are identified and stored in the database
- Interactive Bot: For each configured group:
- Check if notifications are paused (skip if paused)
- Apply platform and theme filters based on group preferences
- Send formatted messages to the configured group
- Channel Bot: Posts all new hackathons to the configured channel
- User Subscriptions:
- Match new hackathons against subscribed themes
- Send personalized DMs to subscribed users
/search,/platform,/upcoming: Query the database and return filtered results/subscribe,/unsubscribe,/subscriptions: Manage user preferences/pause,/resume: Update thenotifications_pausedflag
Group-Level Filtering (Interactive Bot - configured via /setup):
- Platform Filter: Only show hackathons from selected platforms
- Theme Filter: Only show hackathons matching selected themes (tags)
- Default: "all" (no filtering)
Channel Bot:
- No filtering - posts ALL new hackathons
- Perfect for comprehensive news feeds
User-Level Subscriptions (Interactive Bot - via /subscribe):
- Users receive DMs when new hackathons match their subscribed themes
- Matching is done by checking if the subscribed theme is a substring of any hackathon tag
- Example: Subscribing to "AI" matches hackathons tagged with "AI", "Generative AI", "AI/ML", etc.
Contributions are welcome! Please check the CONTRIBUTING.md guide before submitting pull requests.