Discord webhook notifications for Advent of Code leaderboards and new puzzle announcements.
- Leaderboard Updates — Get your private leaderboard standings sent to Discord at scheduled hours
- New Puzzle Notifications — Be notified when a new puzzle drops (configurable dates)
- Role Mentions — Optionally ping a Discord role with updates
- No Session Token Required — Uses AoC's public read-only leaderboard links
- Smart Caching — Respects AoC's API guidelines with intelligent caching
- Get your leaderboard's read-only link from AoC Leaderboards
- Create a Discord webhook in your server (Server Settings → Integrations → Webhooks)
- Visit adventcord.liam.so and fill out the form
- Done! You'll receive updates at your scheduled times
# Clone the repository
git clone https://github.com/Lermatroid/adventcord.git
cd adventcord
# Install dependencies
bun install
# Create env file
touch .env
# Edit .env with your Turso credentials
# Push database schema
bun run db:push
# Start development server
bun run dev# Database (required)
TURSO_DATABASE_URL=libsql://your-database.turso.io
TURSO_AUTH_TOKEN=your-auth-token
# AoC Season Configuration (optional - defaults shown)
NEXT_PUBLIC_AOC_START_DAY=1 # First day of puzzles
NEXT_PUBLIC_AOC_END_DAY=12 # Last day of puzzles
NEXT_PUBLIC_AOC_MONTH=12 # Month (12 = December)Note: Leaderboard updates continue for 24 hours after the last puzzle day to capture final standings.
| Component | Platform | Description |
|---|---|---|
| Web App | Vercel | Next.js 16 frontend for managing subscriptions |
| Cron Job | Railway | Hourly job that sends webhook notifications |
| Database | Turso | SQLite database for storing subscriptions |
- Framework: Next.js 16
- Runtime: Bun
- Database: Turso (libSQL) + Drizzle ORM
- Styling: Tailwind CSS v4
- HTTP Client: @better-fetch/fetch
# Run development server
bun run dev
# Run database studio
bun run db:studio
# Generate database migrations
bun run db:generate
# Run cron job manually
bun run cron --help# Test with a specific webhook (from DB)
bun run cron --webhook-url "https://discord.com/api/webhooks/..."
# Dry run (no webhooks sent)
bun run cron --dry-run --force-aoc --day 1
# Test directly without DB
bun run cron --test-url "https://discord.com/api/webhooks/..." --test-leaderboard "https://adventofcode.com/..."- Connect your GitHub repository to Vercel
- Add environment variables (
TURSO_DATABASE_URL,TURSO_AUTH_TOKEN) - Deploy
- Create a new project and connect your repository
- Add environment variables
- Set up a cron job:
0 * * * *(every hour on the hour) - Command:
bun run cron
MIT
- Advent of Code by Eric Wastl
- Inspired by the AoC terminal aesthetic
Not affiliated with Advent of Code. Please support AoC by purchasing AoC++!