this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: update readme

+60 -17
.github/images/preview.webp

This is a binary file and will not be displayed.

+60 -17
README.md
··· 1 1 # Hacker News Alerts 2 2 3 + ![screenshot of the web dashboard](.github/images/preview.webp) 4 + 3 5 <img src="https://cachet.dunkirk.sh/emojis/ycombinator/r" height="175" align="right" alt="ycombinator logo"> 4 6 5 - > ### More deets coming soon ๐Ÿ‘€ 6 - > 7 - > A slack bot that tracks whether you made it to the front page of hn; made with ๐Ÿ’– @ [Hack Club](https://github.com/hackclub) 8 - > 9 - > โš ๏ธ **Highly opinionated slack bot warning** - Project rapidly iterating 7 + A Slack bot that tracks when you make it to the front page of Hacker News, made with ๐Ÿ’– @ [Hack Club](https://github.com/hackclub) 10 8 11 - # ๐Ÿšง Dev 9 + ## ๐Ÿš€ Features 10 + 11 + - **Front Page Tracking**: Get notified when your posts reach the Hacker News front page 12 + - **#1 Post Alerts**: Special notifications when your post reaches the coveted #1 position 13 + - **Leaderboard History**: Track how your posts perform over time with rank and point history 14 + - **Web Dashboard**: View all currently tracked stories and their stats 15 + - **User Verification**: Securely link your HN account with Slack using verification phrases 16 + 17 + ## ๐Ÿšง Development Setup 18 + 19 + ### Prerequisites 12 20 13 - You can launch the bot locally with bun 21 + - [Bun](https://bun.sh/) (JavaScript runtime and package manager) 22 + - PostgreSQL database 23 + - Ngrok for local development with Slack 14 24 15 - ```bash 16 - bun install 17 - bun dev 18 - ``` 25 + ### Local Development 19 26 20 - you will also need to launch an ngrok tunnel and update your dev slack manifest to point to the ngrok tunnel 27 + 1. Clone the repository: 21 28 22 29 ```bash 23 - bun ngrok 30 + git clone https://github.com/taciturnaxolotl/hn-alerts.git 31 + cd hn-alerts 24 32 ``` 25 33 26 - also if you haven't worked with your postgres table yet then push the schema with 34 + 2. Install dependencies: 27 35 28 36 ```bash 29 - bun db:push 37 + bun install 30 38 ``` 31 39 32 - you also need to create a `.env` file with the following keys 40 + 3. Create a `.env` file with the following variables: 33 41 34 42 ```bash 35 43 SLACK_BOT_TOKEN="xoxb-xxxxx-xxxxx-xxxxx-xxxxx" ··· 40 48 DATABASE_URL="postgres://user:password@host:5432/table_name" 41 49 ``` 42 50 51 + 4. Initialize the database schema: 52 + 53 + ```bash 54 + bun db:push 55 + ``` 56 + 57 + 5. Start the development server: 58 + 59 + ```bash 60 + bun dev 61 + ``` 62 + 63 + 6. In a separate terminal, launch ngrok to expose your local server: 64 + 65 + ```bash 66 + bun ngrok 67 + ``` 68 + 69 + 7. Update your Slack app's manifest in `manifest.dev.yaml` to point to your ngrok URL 70 + 71 + ## ๐Ÿ“ฑ Slack Commands 72 + 73 + - `/hn-alerts-link your_username` - Link your Hacker News account 74 + - `/hn-alerts-link verify` - Verify your Hacker News account 75 + - `/hn-alerts-link unlink` - Remove your linked account 76 + - `/hn-alerts-link help` - Show command help 77 + 78 + ## ๐Ÿงฐ Tech Stack 79 + 80 + - [Bun](https://bun.sh/) - JavaScript runtime and package manager 81 + - [Slack Edge](https://github.com/slack-edge/slack-edge) - Slack API client 82 + - [Drizzle ORM](https://orm.drizzle.team/) - Database ORM 83 + - [Sentry](https://sentry.io/) - Error tracking 84 + - [Cron](https://github.com/kelektiv/node-cron) - Scheduled tasks 85 + 43 86 ## ๐Ÿ“œ License 44 87 45 - The code is licensed under `AGPL 3.0`! That means AGPL 3.0 requires publishing source code changes when the software is used over a network, guaranteeing that users can access the code. All artwork and images are copyright reserved but may be used with proper attribution to the authors. 88 + The code is licensed under `MIT`! See the [LICENSE.md](LICENSE.md) file for more details. 46 89 47 90 <p align="center"> 48 91 <img src="https://raw.githubusercontent.com/taciturnaxolotl/carriage/master/.github/images/line-break.svg" />