## 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.ts` — `GET` 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.ts` — `saveDraft()`, `submit()`, `getDraft()` — Mongo reads/writes stubbed - [ ] `src/lib/application/types.ts` — `Question`, `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.
Goal
Create all files for the Application Form feature. No real logic yet, stubs only.
The shared
(applicant)/layout.tsxis 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.ts—GETdraft,POSTsave,PUTsubmit; stub returns 501Library
src/lib/application/questions.ts— frozen question definitions (id, label, type, options, required)src/lib/application/schema.ts— schema derived fromquestions.tsfor validationsrc/lib/application/service.ts—saveDraft(),submit(),getDraft()— Mongo reads/writes stubbedsrc/lib/application/types.ts—Question,QuestionType,QuestionOption,ApplicationDraft,ApplicationSubmissiontypesComponents
src/components/application/ApplicationForm.tsx— RHF root, renders sections, handles save/submitsrc/components/application/FormSection.tsx— renders a group of questionssrc/components/application/QuestionField.tsx— switch onQuestionType, renders correct inputsrc/components/application/ShortTextField.tsx— single-line inputsrc/components/application/LongTextField.tsx— textareasrc/components/application/SelectField.tsx— dropdownsrc/components/application/MultiSelectField.tsx— checkbox groupsrc/components/application/FileUploadField.tsx— placeholder file inputsrc/components/application/SubmitBar.tsx— save draft + submit buttons,Acceptance criteria
/applicationrenders the form shell with placeholder questions./api/v1/registrationreturns 501 for all methods.