Сервіс для управління підписками на email-сповіщення про нові релізи GitHub-репозиторіїв.
Production: https://release-notifier-production-04c1.up.railway.app
# Install
npm install
# Configure .env
cp .env.example .env
# Run migrations
npm run db:migrate:dev
# Start dev server
npm run devВеб-інтерфейс: http://localhost:3000/index.gtml - Статична сторінка для взаємодії з API (без curl) Production UI: https://release-notifier-production-04c1.up.railway.app/index.gtml
Підписатися на реліз. Відправляє confirmation email з uniqe токеном.
curl -X POST http://localhost:3000/api/subscribe \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","repo":"golang/go"}'Response (200):
{
"success": true,
"message": "Confirmation email sent"
}Підтвердити підписку через токен з email.
curl http://localhost:3000/api/confirm/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6Response (200):
{
"success": true,
"message": "Subscription confirmed successfully",
"repository": "golang/go"
}Відписатися через токен з email.
curl http://localhost:3000/api/unsubscribe/x1y2z3a4b5c6d7e8f9g0h1i2j3k4l5m6Response (200):
{
"success": true,
"message": "Unsubscribed successfully",
"repository": "golang/go"
}GET /api/subscriptions?email=user@example.com
Отримати активні підписки користувача (тільки confirmed).
curl "http://localhost:3000/api/subscriptions?email=user@example.com"Response (200):
[
{
"email": "user@example.com",
"repo": "golang/go",
"confirmed": true,
"last_seen_tag": "go1.20"
},
{
"email": "user@example.com",
"repo": "nodejs/node",
"confirmed": true,
"last_seen_tag": "v18.15.0"
}
]Health check.
curl http://localhost:3000/healthResponse (200):
{
"status": "ok",
"timestamp": "2026-04-13T12:34:56.789Z"
}DATABASE_URL=postgresql://...
GITHUB_API_TOKEN=ghp_...
EMAIL_PASSWORD=YOUR_MAILTRAP_API_TOKEN
EMAIL_FROM=noreply@example.com
API_URL= #URL для email посилань (confirmation, unsubscribe)npm test
npm run test:watchMIT