UNPKG

backend-mcp

Version:

Generador automático de backends con Node.js, Express, Prisma y módulos configurables. Servidor MCP compatible con npx para agentes IA. Soporta PostgreSQL, MySQL, MongoDB y SQLite.

208 lines (188 loc) 4.44 kB
module: name: "email" version: "1.0.0" description: "Sistema completo de emails con templates, colas y múltiples proveedores" category: "communication" author: "Backend MCP" license: "MIT" triggers: - condition: "user_wants_email" value: true - condition: "needs_notifications" value: true - condition: "requires_email_verification" value: true - condition: "has_password_reset" value: true - keywords: - "email" - "correo" - "notificaciones" - "verificación" - "templates" - "queue" - "nodemailer" - "resend" - "sendgrid" entry_points: service: "templates/email.service.ts.hbs" queue: "templates/queue.service.ts.hbs" templates: "templates/html-templates/" config: "templates/email.config.ts.hbs" dependencies: required: - "database" optional: - "logging" - "auth" environment_variables: required: - EMAIL_PROVIDER optional: - SMTP_HOST - SMTP_PORT - SMTP_USER - SMTP_PASS - RESEND_API_KEY - SENDGRID_API_KEY - EMAIL_FROM - EMAIL_FROM_NAME - REDIS_URL features: - "multiple-providers" - "html-templates" - "email-queue" - "template-variables" - "attachment-support" - "email-tracking" - "retry-mechanism" - "bulk-emails" - "email-validation" - "unsubscribe-handling" api_endpoints: - "POST /email/send" - "POST /email/send-bulk" - "GET /email/templates" - "POST /email/test" - "GET /email/queue/status" generated_files: - "src/email/email.service.ts" - "src/email/queue.service.ts" - "src/email/email.config.ts" - "src/email/templates/verify-email.html" - "src/email/templates/reset-password.html" - "src/email/templates/welcome.html" - "src/email/email.controller.ts" - "src/email/email.routes.ts" integration: database_tables: - "email_logs" - "email_templates" - "email_queue" auth_integration: - "email-verification" - "password-reset" - "welcome-emails" providers: - name: "nodemailer" description: "SMTP tradicional" config: - "SMTP_HOST" - "SMTP_PORT" - "SMTP_USER" - "SMTP_PASS" - name: "resend" description: "Resend API moderna" config: - "RESEND_API_KEY" - name: "sendgrid" description: "SendGrid para escala" config: - "SENDGRID_API_KEY" templates: - name: "verify-email" description: "Verificación de email" variables: - "userName" - "verificationLink" - "companyName" - name: "reset-password" description: "Reseteo de contraseña" variables: - "userName" - "resetLink" - "expirationTime" - name: "welcome" description: "Bienvenida a nuevos usuarios" variables: - "userName" - "loginLink" - "supportEmail" queue_config: default_attempts: 3 retry_delay: 5000 max_concurrent: 10 priority_levels: - "high" - "normal" - "low" usage_examples: - "Email verification for auth" - "Password reset notifications" - "Welcome emails for new users" - "Bulk marketing campaigns" - "Transactional notifications" ai_instructions: | Use this module when: - User mentions "email", "notifications", "templates", "verification" - Auth module is active (for verification emails) - Project requires user communication Always combine with: - database module (for email logging) - auth module (for verification flows) Configuration steps: 1. Choose email provider (nodemailer/resend/sendgrid) 2. Set appropriate environment variables 3. Configure email templates 4. Setup email queue for reliability 5. Integrate with auth flows automation: scripts: - "setup-provider" - "test-email" - "generate-templates" - "queue-monitor" testing: unit_tests: - "email.service.test.ts" - "queue.service.test.ts" integration_tests: - "email-flow.test.ts" e2e_tests: - "email-verification.e2e.test.ts" performance: metrics: - "emails_sent_per_minute" - "delivery_rate" - "bounce_rate" - "queue_processing_time" optimization: - "batch_processing" - "connection_pooling" - "template_caching" compatibility: node_versions: - ">=16.0.0" frameworks: - "express" - "fastify" - "nestjs" databases: - "postgresql" - "mysql" - "mongodb" documentation: - "README.md" - "API.md" - "TEMPLATES.md" - "PROVIDERS.md"