Skip to content

Application Form Files #450

@adityapat24

Description

@adityapat24

Goal

Create all files for the Application Form feature. No real logic yet, stubs only.

The shared (applicant)/layout.tsx is created by ticket working on auth. This ticket only adds the application page inside it.

Folders to create

  • src/app/(applicant)/application/
  • src/app/api/v1/registration/
  • src/lib/application/
  • src/components/application/

Files to create

Routes

  • src/app/(applicant)/application/page.tsx — application form page, gated by "registration open" check (mocked for now)
  • src/app/api/v1/registration/route.tsGET draft, POST save, PUT submit; stub returns 501

Library

  • src/lib/application/questions.ts — frozen question definitions (id, label, type, options, required)
  • src/lib/application/schema.ts — schema derived from questions.ts for validation
  • src/lib/application/service.tssaveDraft(), submit(), getDraft() — Mongo reads/writes stubbed
  • src/lib/application/types.tsQuestion, QuestionType, QuestionOption, ApplicationDraft, ApplicationSubmission types

Components

  • src/components/application/ApplicationForm.tsx — RHF root, renders sections, handles save/submit
  • src/components/application/FormSection.tsx — renders a group of questions
  • src/components/application/QuestionField.tsx — switch on QuestionType, renders correct input
  • src/components/application/ShortTextField.tsx — single-line input
  • src/components/application/LongTextField.tsx — textarea
  • src/components/application/SelectField.tsx — dropdown
  • src/components/application/MultiSelectField.tsx — checkbox group
  • src/components/application/FileUploadField.tsx — placeholder file input
  • src/components/application/SubmitBar.tsx — save draft + submit buttons,

Acceptance criteria

  • All folders and files listed above exist and the project compiles.
  • /application renders the form shell with placeholder questions.
  • /api/v1/registration returns 501 for all methods.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions