No description
- JavaScript 59.5%
- CSS 21.7%
- HTML 16.1%
- Dockerfile 2.7%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 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 |
||
|---|---|---|
| api | ||
| assets | ||
| k8s | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| .woodpecker.yml | ||
| config.js | ||
| dev-server.mjs | ||
| Dockerfile | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| styles.css | ||
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 installnpm test— unit tests (Vitest)npm run dev— full stack on http://localhost:5000 (serves the wizard and routesPOST /api/sendto the handler). No environment needed.
Make it yours
- Content: edit
config.js—partnerName,signature,QUOTE, theDATESandEVENTSarrays, and the weekday/weekend time slots. Edit the copy inindex.html. - Images: drop
assets/p1.jpg…p5.jpgand replace the inline SVG placeholders inindex.htmlwith./assets/pN.jpg(seeassets/README.md). - Delivery: implement the
TODOinapi/send.js— send an email, POST a webhook, write a row, enqueue a job.submissionholds the validated payload. - Deploy target: set the real host in
k8s/ingress.yaml(currentlytest2.serbay.me) and the registry path inpackage.json/.woodpecker.yml/k8s/deployment.yamlif not usingregistry.serbay.me/public/date-wizard-anonymous.
Deploy (Docker + Kubernetes)
The image is built and pushed manually; Woodpecker only tests and rolls out.
- Build + push whenever the code changes:
npm run image # docker build + docker push :latest - Push to
main. Woodpecker runsnpm test, thenkubectl apply -f k8s/andkubectl 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.