No description
- JavaScript 82.9%
- HTML 12.7%
- CSS 3.9%
- Dockerfile 0.5%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
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> |
||
|---|---|---|
| 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 the
owner (the person throwing the surprise — set OWNER_EMAIL in api/send.js).
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)
Woodpecker builds the image (kaniko), pushes it, then rolls out — push to main
is enough, no manual docker build needed.
- 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=... - Push to
main. Woodpecker runsnpm test, then the kaniko build step (registry.serbay.me/public/serzel-datepicker:latest), thenkubectl apply -f k8s/andkubectl 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.