No description
- JavaScript 82.5%
- HTML 13.2%
- CSS 3.8%
- Dockerfile 0.5%
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DqWfGAvMSY6k9ajGxybsE |
||
|---|---|---|
| api | ||
| assets | ||
| design | ||
| k8s | ||
| lib | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .woodpecker.yml | ||
| config.js | ||
| dev-server.mjs | ||
| Dockerfile | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| proje-akisi.md | ||
| README.md | ||
| styles.css | ||
romance-wizard
A 6-step invitation wizard. On completion it sends two emails over SMTP (via nodemailer): an invitation to the guest, and a notification to serbayacar@gmail.com.
Develop
npm installnpm test— unit tests (Vitest)npm run dev— full stack on http://localhost:5000 (serves the static wizard and routesPOST /api/sendto the real handler). Needs a local.env(copy.env.example, fill in the SMTP values).dev-server.mjsis a local convenience only — it is not deployed.vercel dev— full stack via the Vercel CLI instead (needsvercel login)
Configure before deploy
- Edit
config.js— dates, events,partnerName,signature, quote. - Drop
assets/p1.jpg…p5.jpg(seeassets/README.md).
Deploy (Docker + Kubernetes)
The image is built and pushed manually; Woodpecker only tests and rolls out.
- One-time: create the SMTP secret in the cluster (keys match
.env.example):kubectl create secret generic date-wizard-smtp -n public \ --from-literal=SMTP_HOST=smtp.protonmail.ch \ --from-literal=SMTP_PORT=587 \ --from-literal=SMTP_USER=... \ --from-literal=SMTP_PASS=... \ --from-literal=SMTP_SECURE=false \ --from-literal=MAIL_FROM=... - Build + push the image whenever the code changes:
Or with a version tag:npm run image # docker build + docker push :latestdocker build -t registry.serbay.me/public/date-wizard:1.0.1 . && docker push … - Push to
main. Woodpecker runsnpm test, thenkubectl apply -f k8s/andkubectl rollout restart deployment/date-wizard -n public(pods re-pull:latest,imagePullPolicy: Always).
Woodpecker secrets: harbor_username, harbor_password (unused now that the
build step is gone — kept for reference), kube_config (base64 kubeconfig).
The notification recipient (serbayacar@gmail.com) is a constant in api/send.js.
The public host is test.serbay.me (k8s/ingress.yaml).
End-to-end check after first deploy (manual)
- Open https://test.serbay.me, walk all 6 steps.
- Step 2: primary button stays disabled until both a date and a time are chosen; changing the date clears the chosen time; weekend dates show 15.00–20.00, weekday dates show 19.00–21.00.
- Step 4: primary button stays disabled until an event card is chosen.
- Step 5: an invalid email shows the Turkish hint and does not proceed.
- Finish with your own address as the guest email; confirm:
- the done screen appears,
- an invitation email arrives at the guest address (
Bir randevumuz var 💌), - a notification email arrives at
serbayacar@gmail.com(Davet tamamlandı — …).
- Error path:
curl -X POST <url>/api/send -H 'content-type: application/json' -d '{"date":"x","time":"x","event":"x","email":"bad","hp":""}'returns HTTP 400{"ok":false,"error":"invalid_input"}; the same with"hp":"bot"returns{"ok":true}and sends nothing.