Files
evidencija-rezija/email-worker/package.json
Knee Cola a901980a6f feat: implement email notification worker with Mailgun integration
- Add MongoDB connection module for database access
- Implement Mailgun email service for sending notifications
- Add shareChecksum utility for generating secure share links
- Implement three email sender functions:
  - Email verification requests (highest priority)
  - Rent due notifications (CET timezone)
  - Utility bills due notifications
- Create main email worker with budget-based email sending
- Add environment variables for configuration
- Install dependencies: mongodb, mailgun.js, form-data
- Update package.json description to reflect email worker purpose
- Add .env.example with all required configuration

The worker processes emails in priority order and respects a configurable
budget to prevent overwhelming the mail server. All database operations are
atomic and updates are performed immediately after each email send.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 12:27:32 +01:00

54 lines
1.4 KiB
JSON

{
"name": "email-worker",
"version": "0.1.0",
"description": "Email notification worker service for sending verification requests, rent due notices, and utility bills notifications",
"main": "entry.ts",
"scripts": {
"start": "nodemon ./src/entry.ts",
"run-server": "DEBUG=* node --enable-source-maps ./build/entry.js",
"build": "ttsc --project ./",
"test": "ENV=jest jest --watch"
},
"author": "Nikola",
"license": "ISC",
"dependencies": {
"debug": "^2.6.9",
"express": "^4.18.2",
"form-data": "^4.0.5",
"http-errors": "^1.7.2",
"mailgun.js": "^12.4.1",
"mongodb": "^7.0.0",
"node-fetch": "^2.6.7",
"prom-client": "^14.0.1",
"stoppable": "^1.1.0"
},
"devDependencies": {
"@babel/preset-typescript": "^7.18.6",
"@types/debug": "^4.1.7",
"@types/express": "^4.17.13",
"@types/http-errors": "^1.8.1",
"@types/jest": "^29.2.5",
"@types/mongodb": "^4.0.6",
"@types/node": "^16.10.2",
"@types/node-fetch": "^2.6.2",
"@types/stoppable": "^1.1.1",
"@types/supertest": "^2.0.11",
"dotenv": "^16.0.3",
"esbuild": "^0.16.14",
"esbuild-jest": "^0.5.0",
"jest": "^29.3.1",
"nodemon": "^2.0.13",
"supertest": "^6.3.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.2",
"ttypescript": "^1.5.15",
"typescript": "^4.9.4",
"typescript-transform-paths": "^3.4.4"
},
"babel": {
"presets": [
"@babel/preset-typescript"
]
}
}