No description
  • JavaScript 82.9%
  • HTML 12.7%
  • CSS 3.9%
  • Dockerfile 0.5%
Find a file
Serbay 85fafceb30
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix(ci): drop host from kaniko repo (was double-prefixed)
kaniko prepends `registry` to `repo`; repo already carried the host, so the
push target became registry.serbay.me/registry.serbay.me/... → Harbor
"project not found". repo is now public/serzel-datepicker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-19 20:49:20 +03:00
api feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
assets feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
design feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
k8s feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
lib feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
src feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
tests feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
.dockerignore feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
.env.example feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
.gitignore feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
.woodpecker.yml fix(ci): drop host from kaniko repo (was double-prefixed) 2026-10-19 20:49:20 +03:00
config.js feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
dev-server.mjs feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
Dockerfile feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
index.html feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
package-lock.json feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
package.json feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
proje-akisi.md feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +03:00
README.md ci: build and push the image in Woodpecker (kaniko) 2026-10-19 20:47:15 +03:00
styles.css feat: serzel-datepicker — Zeliş için buluşma daveti sihirbazı 2026-10-19 20:42:49 +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 the owner (the person throwing the surprise — set OWNER_EMAIL in api/send.js).

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.jpg…p5.jpg (see assets/README.md).

Deploy (Docker + Kubernetes)

Woodpecker builds the image (kaniko), pushes it, then rolls out — push to main is enough, no manual docker build needed.

  1. One-time: create the SMTP secret in the cluster (keys match .env.example):
    kubectl create secret generic serzel-datepicker-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. Push to main. Woodpecker runs npm test, then the kaniko build step (registry.serbay.me/public/serzel-datepicker:latest), then kubectl apply -f k8s/ and kubectl rollout restart deployment/serzel-datepicker -n public (pods re-pull :latest, imagePullPolicy: Always).

Local manual build (optional, e.g. to test the image): npm run image (docker build + docker push :latest).

Woodpecker secrets: harbor_username, harbor_password (registry auth for the build step), kube_config (base64 kubeconfig).

The notification recipient is the exported OWNER_EMAIL constant in api/send.js. The public host is serzel.serbay.me (k8s/ingress.yaml).

End-to-end check after first deploy (manual)

  • Open https://serzel.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 the owner address (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.