-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Labels
BackendStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programgood first issueGood for newcomersGood for newcomers
Description
Description:
Create a full NestJS Contact module that handles contact form submissions end-to-end. This includes: a ContactMessage entity stored in PostgreSQL, a validated DTO, a public POST /contact endpoint with rate limiting (5 requests/minute), and two email notifications — a confirmation to the user and a notification to the admin.
Acceptance Criteria:
-
ContactMessageentity with: fullName, email, phone (optional), company (optional), subject, message, ipAddress, isRead -
SubmitContactDtowith class-validator decorators and@SanitizeString() -
POST /contactendpoint — public (@Public()), rate-limited (@Throttle) - Saves submission to database
- Sends confirmation email to user (non-blocking)
- Sends notification email to admin with full message (non-blocking)
- Two Handlebars email templates:
contact-confirmation.hbsandcontact-notification.hbs -
sendContactConfirmation()andsendContactNotification()methods added toEmailService -
ContactModuleregistered inapp.module.ts - Rate limit config added to
ThrottlerModule:{ name: 'contact', ttl: 60_000, limit: 5 }
File(s): backend/src/contact/ (new module), backend/src/email/email.service.ts, backend/src/email/templates/contact-confirmation.hbs, backend/src/email/templates/contact-notification.hbs, backend/src/app.module.ts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BackendStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programgood first issueGood for newcomersGood for newcomers