Add Contact Page and Link It from Navbar
Is your feature request related to a problem?
The Contact page at /contact exists (src/app/contact/page.tsx) and renders the <Contact /> component, but the contact form currently uses a simulated API with a random 70% success rate — it does not actually send emails or store messages.
What Needs to Be Done
- Backend: Create a real API route at
src/app/api/contact/route.ts to handle form submissions
- Email Integration: Use
nodemailer (already in dependencies) to send contact form submissions to the project admin email
- Form Validation: Add server-side validation for name, email, subject, and message fields
- Rate Limiting: Add basic rate limiting to prevent spam
- Success/Error Handling: Show proper toast notifications based on actual API response
- Navbar Link: Verify the
/contact link in Navbar.tsx works correctly (it already exists in the navLinks array)
Files to Modify
src/components/Contact.tsx — Update form submission handler to call real API
- Create:
src/app/api/contact/route.ts — New API endpoint
.env.example — Add SMTP/email config variables if needed
Tech Stack
- Email: nodemailer (already installed)
- Validation: Zod schema validation
- UI: shadcn/ui form components, toast notifications
Acceptance Criteria
Add Contact Page and Link It from Navbar
Is your feature request related to a problem?
The Contact page at
/contactexists (src/app/contact/page.tsx) and renders the<Contact />component, but the contact form currently uses a simulated API with a random 70% success rate — it does not actually send emails or store messages.What Needs to Be Done
src/app/api/contact/route.tsto handle form submissionsnodemailer(already in dependencies) to send contact form submissions to the project admin email/contactlink inNavbar.tsxworks correctly (it already exists in the navLinks array)Files to Modify
src/components/Contact.tsx— Update form submission handler to call real APIsrc/app/api/contact/route.ts— New API endpoint.env.example— Add SMTP/email config variables if neededTech Stack
Acceptance Criteria