Skip to content

Hackathon wizard: publish-time cross-section validation checklist #595

@0xdevcollins

Description

@0xdevcollins

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

  1. 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).
  2. Render a Review & Publish checklist: list each section with its status and a deep-link (?section=...) that jumps straight to the section needing fixes.
  3. 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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions