Problem
The hackathon create/edit wizard is free-roam (any section reachable at any time) and validates per-section on save, but there is no aggregate validation at publish/submit time. An organizer can land on Review & Publish with sections that are empty or invalid and only discover the problem when the publish call fails server-side, with no clear pointer to what's wrong.
Current state (verified 2026-06-15)
- Per-section save validation exists (each section validates its own zod schema when saved).
- Publish runs through
hooks/use-hackathon-publish.ts (the escrow/publish flow) with no pre-publish full-draft validation gate.
- No aggregate validator exists — grep for
validateAllSteps / validateForPublish / getMissingSections in lib/utils/hackathon-step-validation.ts, hooks/use-hackathon-step-save.ts, hooks/use-hackathon-publish.ts returns nothing.
Proposed
- Add a submit-time validator in
lib/utils/hackathon-step-validation.ts that runs every section's schema against the saved draft and returns a per-section result: valid | empty | invalid (+ the specific errors).
- Render a Review & Publish checklist: list each section with its status and a deep-link (
?section=...) that jumps straight to the section needing fixes.
- Block publish until all required sections are valid (the checklist is the gate, not a raw server error).
Sections to cover
Information, Timeline, Participation, Tracks, Rewards/Prizes, Custom Questions, Resources, Judging, Collaboration.
Acceptance criteria
- Clicking Publish with a missing/invalid section shows the checklist and blocks submission.
- Each checklist item deep-links to the correct section.
- A fully-valid draft publishes with no checklist blockers.
Notes
Purely frontend — no backend or env dependency. This is the remaining half of the "save-time + submit-time validation" wizard work (save-time already exists).
Problem
The hackathon create/edit wizard is free-roam (any section reachable at any time) and validates per-section on save, but there is no aggregate validation at publish/submit time. An organizer can land on Review & Publish with sections that are empty or invalid and only discover the problem when the publish call fails server-side, with no clear pointer to what's wrong.
Current state (verified 2026-06-15)
hooks/use-hackathon-publish.ts(theescrow/publishflow) with no pre-publish full-draft validation gate.validateAllSteps/validateForPublish/getMissingSectionsinlib/utils/hackathon-step-validation.ts,hooks/use-hackathon-step-save.ts,hooks/use-hackathon-publish.tsreturns nothing.Proposed
lib/utils/hackathon-step-validation.tsthat runs every section's schema against the saved draft and returns a per-section result:valid | empty | invalid(+ the specific errors).?section=...) that jumps straight to the section needing fixes.Sections to cover
Information, Timeline, Participation, Tracks, Rewards/Prizes, Custom Questions, Resources, Judging, Collaboration.
Acceptance criteria
Notes
Purely frontend — no backend or env dependency. This is the remaining half of the "save-time + submit-time validation" wizard work (save-time already exists).