Every backend service MUST use structured logging — pino/structlog/slog, JSON format, request IDs, proper log levels. console.log is never acceptable.
88
85%
Does it follow best practices?
Impact
97%
3.03xAverage score across 4 eval scenarios
Passed
No known issues
A SaaS company needs a Node.js background job processor that consumes email notification jobs from a queue and sends them. The processor runs as a standalone process (not an HTTP server) in a Docker container on ECS.
The processor should:
job_id, type (one of: "welcome", "password_reset", "invoice"), recipient_email, template_data, and priority (1-3).recipient_email contains "invalid", mark as failed.The processor needs to be operationally solid since it runs unattended in production with no human watching the output.
Produce:
output/package.json with dependenciesoutput/src/processor.ts — The main job processoroutput/src/types.ts — TypeScript interfaces for jobsComplete TypeScript code, no placeholders.