Note: Some backend services (blog API) are legacy/deprecated. Contact form submission still works when environment variables are configured—it sends to the clinic and a confirmation copy back to the user.
Developed by Martin Wong
- Next.js 14 (App Router)
- React 18
- Tailwind CSS + DaisyUI
- Radix UI (Dialog, Collapsible, Carousel)
- Lucide React (icons)
- react-hook-form + Zod (form validation)
| Component | Purpose | Status |
|---|---|---|
| Nodemailer | Contact form → SMTP email delivery | ✅ Configure SMTP_EMAIL, SMTP_PASSWORD |
| Contact form flow | Submits to reception; sends confirmation copy to user | ✅ Works when SMTP env vars are set |
| PostgreSQL | (Intended) Database for form submissions, blog content | ❌ Not implemented |
| reCAPTCHA | Contact form bot protection | Optional; configure RECAPTCHA_SECRET_KEY + NEXT_PUBLIC_RECAPTCHA_SITE_KEY |
| External Blog API | Fetches articles for /blog |
❌ Deprecated; blog uses hardcoded content |
On successful submission:
- To clinic — Email sent to
reception@broadwaysmiles.cawith the form data - To user — Confirmation email sent to the submitter with a copy of their submission (sample of what was received)
| Variable | Description |
|---|---|
SMTP_EMAIL |
Gmail address for Nodemailer transport |
SMTP_PASSWORD |
Gmail app password |
NEXT_PUBLIC_RECAPTCHA_SITE_KEY |
reCAPTCHA site key (client-side, public) |
RECAPTCHA_SECRET_KEY |
reCAPTCHA secret key (server-side only) |
NEXT_PUBLIC_API_BASE_URL |
External blog API base URL |
Copy
.env.exampleto.env.localand fill in your values. The reCAPTCHA secret key is found in Google reCAPTCHA Admin and pairs with your site key.
src/
├── app/api/
│ ├── email/route.js # POST contact form → Nodemailer
│ └── verify-recaptcha/ # reCAPTCHA server-side verification
├── lib/
│ ├── mail.js # Nodemailer transport (legacy helper)
│ └── validationSchema.js # Zod schemas for forms
- Clone the repository:
git clone <repo-url> cd BWS
- Install dependencies:
npm install
- Copy
.env.exampleto.env.localand addSMTP_EMAILandSMTP_PASSWORDfor contact form submission. - Start the dev server:
npm run dev
- Open http://localhost:5000.
- Dockerfile: Multi-stage build (deps → builder → runner), exposes port 5000.
- docker-compose.yml: Single service
app, uses.env, includes healthcheck.