NyamNyam WeDu — Cafeteria Menu Alert Bot
2026-01-01 — present
Bot that crawls weekly cafeteria menus from Kakao Channel via Playwright and auto-delivers to Slack — Clean Architecture + TSyringe DI, Slack Bot API slash command, up to 6 retries, DeliveryHistory duplicate prevention
Project Description
A bot that automatically collects weekly cafeteria menus from Pangyo InnoValley and delivers them to Slack channels. Crawls menu image URLs and metadata from Kakao Channel posts using Playwright headless Chrome, and auto-delivers to designated channels via @slack/bolt Socket Mode. Scheduled every Monday at 9 AM (KST) via node-cron, with up to 6 retries at 1-hour intervals on failure. Manages per-channel delivery history through a DeliveryHistory table to prevent duplicate sends, and provides instant menu lookup via the /식단 slash command. Separates domain, application, and infrastructure layers with Clean Architecture, manages dependencies through TSyringe DI container, and implements explicit error handling with Result<T, E> pattern instead of exceptions.
Highlights
- Playwright headless Chrome Kakao Channel crawl
- Slack Bot Socket Mode + /식단 slash command
- 6 retries (1h interval) + DeliveryHistory dedup
- Clean Architecture + TSyringe DI + Result<T,E>
- Docker container deploy (with Playwright browser)
Features
- Auto delivery — weekly Monday 09:00 (KST) Kakao Channel crawling with Slack channel auto-send
- Playwright headless crawling — extracting menu image URL, title, and publish date from Kakao Channel posts
- Slack Bot slash command — /식단 for instant weekly menu lookup (cache-first, real-time crawling fallback)
- Retry mechanism — up to 6 automatic retries at 1-hour intervals on delivery failure
- Duplicate prevention — DeliveryHistory table managing per-channel delivery records, blocking duplicate sends
- Clean Architecture — domain/application/infrastructure layer separation, TSyringe DI, Result<T, E> error handling pattern
Lessons Learned
- 💡 Learned wait strategies and selector stability for dynamic content crawling by scraping JavaScript-rendered Kakao Channel pages with Playwright headless browser
- 💡 Experienced Slack platform integration patterns including slash command handling and Block Kit message formatting by implementing a Slack Bot with @slack/bolt Socket Mode
- 💡 Learned reliability strategies for external service integration by designing idempotency guarantees via DeliveryHistory table and retry mechanism (up to 6 times at 1-hour intervals)
- 💡 Internalized how functional error handling improves code predictability and testability by returning explicit error types via Result<T, E> pattern instead of exceptions