No description
  • JavaScript 59.5%
  • CSS 21.7%
  • HTML 16.1%
  • Dockerfile 2.7%
Find a file
Serbay Acar 240d113802
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
chore: anonymize into a reusable template
- Replace the five photos with inline SVG placeholders; drop photos/ and
  the design/ canvas
- Turn api/send.js into a no-op endpoint (validation + honeypot only);
  remove nodemailer, lib/emails.js, SMTP env and the .env files
- Neutralize all personal copy in config.js, index.html and the tests;
  remove proje-akisi.md; rewrite README as a template guide
- Rename the k8s resources and image to date-wizard-anonymous; set the
  ingress host to test2.serbay.me; drop the SMTP secret wiring
- Point origin at the date-wizard-anonymous repo

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qi2NrtNPhR6Bts6zEAym4a
2026-09-06 15:38:14 +03:00
api chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
assets chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
k8s chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
src chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
tests chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
.dockerignore chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
.gitignore chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
.woodpecker.yml chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
config.js chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
dev-server.mjs chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
Dockerfile chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
index.html chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
package-lock.json chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
package.json chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
README.md chore: anonymize into a reusable template 2026-09-06 15:38:14 +03:00
styles.css feat: port invitation visual design to styles.css 2026-09-03 20:59:37 +03:00

date-wizard-anonymous

A 6-step invitation wizard template. A static, build-free frontend plus a single serverless-style handler. It sends nothing — the handler validates the payload and returns { ok: true }. Wire your own delivery into api/send.js where the TODO is.

Layout

index.html          wizard markup (6 sections)
styles.css          styles (Google Fonts: Cormorant Garamond + Karla)
config.js           all editable content: partnerName, signature, QUOTE, DATES[], EVENTS[], time slots
src/wizard-state.js pure state machine (step transitions, guards, validation, payload)
src/wizard-ui.js    DOM wiring / rendering
src/api-client.js   POST /api/send wrapper
api/send.js         no-op handler: method check, honeypot, validation -> { ok: true }
dev-server.mjs      static server + /api/send route; local dev and container entrypoint
tests/              Vitest unit tests
k8s/                Deployment / Service / Ingress / Namespace
Dockerfile          multi-stage build
.woodpecker.yml     CI: test on push/PR, deploy on push to main
assets/             put p1.jpg..p5.jpg here (see assets/README.md)

Develop

  • npm install
  • npm test — unit tests (Vitest)
  • npm run dev — full stack on http://localhost:5000 (serves the wizard and routes POST /api/send to the handler). No environment needed.

Make it yours

  • Content: edit config.jspartnerName, signature, QUOTE, the DATES and EVENTS arrays, and the weekday/weekend time slots. Edit the copy in index.html.
  • Images: drop assets/p1.jpgp5.jpg and replace the inline SVG placeholders in index.html with ./assets/pN.jpg (see assets/README.md).
  • Delivery: implement the TODO in api/send.js — send an email, POST a webhook, write a row, enqueue a job. submission holds the validated payload.
  • Deploy target: set the real host in k8s/ingress.yaml (currently test2.serbay.me) and the registry path in package.json / .woodpecker.yml / k8s/deployment.yaml if not using registry.serbay.me/public/date-wizard-anonymous.

Deploy (Docker + Kubernetes)

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

  1. Build + push whenever the code changes:
    npm run image      # docker build + docker push :latest
    
  2. Push to main. Woodpecker runs npm test, then kubectl apply -f k8s/ and kubectl rollout restart deployment/date-wizard-anonymous -n public (pods re-pull :latest, imagePullPolicy: Always).

Woodpecker secret: kube_config (base64 kubeconfig).

POST /api/send contract

Request body (JSON): { date, time, event, email, hp }.

Case HTTP Body
Valid input 200 { "ok": true }
Honeypot hp non-empty 200 { "ok": true } (silent, no-op)
Missing/blank field or invalid email 400 { "ok": false, "error": "invalid_input" }
Non-POST 405 { "ok": false, "error": "method_not_allowed" }

The frontend advances to the final step only on ok === true.