No description
  • JavaScript 82.5%
  • HTML 13.2%
  • CSS 3.8%
  • Dockerfile 0.5%
Find a file
Serbay Acar 2090b36cb8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/manual/woodpecker Pipeline was successful
feat: add "Dondurmaaaa" event option
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DqWfGAvMSY6k9ajGxybsE
2026-09-04 02:03:39 +03:00
api refactor: send mail over SMTP (nodemailer) instead of Resend 2026-09-04 00:19:01 +03:00
assets feat: add the five wizard photos 2026-09-04 00:45:57 +03:00
design chore: scaffold romance-wizard project 2026-09-03 20:48:49 +03:00
k8s ci: deploy a pre-pushed image instead of building in CI 2026-09-04 01:43:53 +03:00
lib feat: partner and owner email body builders 2026-09-03 20:54:18 +03:00
src fix: wire the client honeypot field into the submit payload 2026-09-03 21:11:04 +03:00
tests feat: add weekend brunch/game events and earlier weekend times 2026-09-04 02:01:20 +03:00
.dockerignore ci: containerize and add Woodpecker pipeline + k8s manifests 2026-09-04 01:29:09 +03:00
.env.example refactor: send mail over SMTP (nodemailer) instead of Resend 2026-09-04 00:19:01 +03:00
.gitignore feat: add the five wizard photos 2026-09-04 00:45:57 +03:00
.woodpecker.yml ci: deploy a pre-pushed image instead of building in CI 2026-09-04 01:43:53 +03:00
config.js feat: add "Dondurmaaaa" event option 2026-09-04 02:03:39 +03:00
dev-server.mjs ci: containerize and add Woodpecker pipeline + k8s manifests 2026-09-04 01:29:09 +03:00
Dockerfile ci: containerize and add Woodpecker pipeline + k8s manifests 2026-09-04 01:29:09 +03:00
index.html style: match steps 2/4/5 photo size to step 1 2026-09-04 01:00:20 +03:00
package-lock.json refactor: send mail over SMTP (nodemailer) instead of Resend 2026-09-04 00:19:01 +03:00
package.json ci: deploy a pre-pushed image instead of building in CI 2026-09-04 01:43:53 +03:00
proje-akisi.md refactor: send mail over SMTP (nodemailer) instead of Resend 2026-09-04 00:19:01 +03:00
README.md ci: deploy a pre-pushed image instead of building in CI 2026-09-04 01:43:53 +03:00
styles.css feat: port invitation visual design to styles.css 2026-09-03 20:59:37 +03:00

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 install
  • npm test — unit tests (Vitest)
  • npm run dev — full stack on http://localhost:5000 (serves the static wizard and routes POST /api/send to the real handler). Needs a local .env (copy .env.example, fill in the SMTP values). dev-server.mjs is a local convenience only — it is not deployed.
  • vercel dev — full stack via the Vercel CLI instead (needs vercel login)

Configure before deploy

  • Edit config.js — dates, events, partnerName, signature, quote.
  • Drop assets/p1.jpgp5.jpg (see assets/README.md).

Deploy (Docker + Kubernetes)

The image is built and pushed manually; Woodpecker only tests and rolls out.

  1. 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=...
    
  2. Build + push the image whenever the code changes:
    npm run image      # docker build + docker push :latest
    
    Or with a version tag: docker build -t registry.serbay.me/public/date-wizard:1.0.1 . && docker push …
  3. Push to main. Woodpecker runs npm test, then kubectl apply -f k8s/ and kubectl 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.0020.00, weekday dates show 19.0021.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.