Hacker News Alerts#
A Slack bot that tracks when you make it to the front page of Hacker News, made with 💖 @ Hack Club
🚀 Features#
- Front Page Tracking: Get notified when your posts reach the Hacker News front page
- #1 Post Alerts: Special notifications when your post reaches the coveted #1 position
- Leaderboard History: Track how your posts perform over time with rank and point history
- Web Dashboard: View all currently tracked stories and their stats
- Individual Story Pages: View detailed information about any story using HN-compatible URLs
- User Verification: Securely link your HN account with Slack using verification phrases
🚧 Development Setup#
Prerequisites#
- Bun (JavaScript runtime and package manager)
- PostgreSQL database
- Ngrok for local development with Slack
Local Development#
- Clone the repository:
git clone https://github.com/taciturnaxolotl/hn-alerts.git
cd hn-alerts
- Install dependencies:
bun install
- Create a
.envfile with the following variables:
SLACK_BOT_TOKEN="xoxb-xxxxx-xxxxx-xxxxx-xxxxx"
SLACK_SIGNING_SECRET="xxxxx"
SLACK_CHANNEL="C08KX2YNN87"
NODE_ENV="dev"
SENTRY_DSN="https://xxxxxx@xxxxxx.ingest.us.sentry.io/xxxx"
DATABASE_URL="postgres://user:password@host:5432/table_name"
- Initialize the database schema:
bun db:push
- Start the development server:
bun dev
- In a separate terminal, launch ngrok to expose your local server:
bun ngrok
- Update your Slack app's manifest in
manifest.dev.yamlto point to your ngrok URL
📱 Slack Commands#
/hn-alerts-link your_username- Link your Hacker News account/hn-alerts-link verify- Verify your Hacker News account/hn-alerts-link unlink- Remove your linked account/hn-alerts-link help- Show command help
🧰 Tech Stack#
- Bun - JavaScript runtime and package manager
- Slack Edge - Slack API client
- Drizzle ORM - Database ORM
- Sentry - Error tracking
- Cron - Scheduled tasks
📜 License#
The code is licensed under MIT! See the LICENSE.md file for more details.
© 2025-present Kieran Klukas