Naalya Handbook
School featuresAdmissions and recruitment

Recruitment

Job vacancies and applications, staff-published postings, guest applicants, and a map-driven review state machine that strips personal details from its audit trail.

The recruitment half of the application module: staff post job vacancies, guests apply, staff move applications through a review pipeline. Same module, different rules: most notably, job applications reuse the APPLICATION permission resource (there is no separate JOB_APPLICATION resource) while vacancies get their own JOB_VACANCY.

Vacancies

job_vacancy (@TenantScoped): title, description, optional department/campus, requirements/responsibilities, employmentType (full_time / part_time / contract), a deadline, status (draft → published → closed), and an aiInterviewEnabled flag.

  • Staff CRUD is @RequireUserType(STAFF) + per-action JOB_VACANCY permissions, campus-scoped on list, all audited.
  • The "public" listing (GET job-vacancies) is authenticated guests, not anonymous: @RequireUserType(GUEST), filtered to published, ordered by deadline. There are no truly public routes in this module.

Job applications

job_application is not tenant-scoped: it has no schoolId; it snapshots campusId from its vacancy so staff list permissions can scope it. It carries personalInfo jsonb (name/contact/address), optional qualifications/experience, a cover letter, a stored CV (cvFileId), review fields (reviewedBy/At, rejectionReason), and isPrioritized: AI-screened applications sort first in the staff list.

Guest flow: create a draft (prefilled from the guest profile), update while draft, submit (requires a CV and a strict address, addressLine1 + country) → pending, or withdraw. Staff see everything except other people's drafts unless they filter for them explicitly.

The review state machine

Staff advance applications with PATCH :id/status, and the allowed moves live in a literal transition map, extend the map, not the handler:

Every status change stamps reviewedBy/reviewedAt and best-effort emails the applicant (APPLICATION_STATUS, campus-aware).

Audit snapshots strip personal details

Job-application audit entries record metadata only: no personalInfo, cover letter, qualifications, or CV reference. Recruitment data is the richest in personally identifiable information (PII) in the system; keep the snapshot allowlist that way.

Routes

Generated from job-vacancy.controller.ts and job-application.controller.ts at API fbb63d51. Both controllers require the recruitment feature. Who is the user type and permission each route checks. Prefix every path with /api/v1.

Vacancies

RouteOperation idDoesWho
POST /job-vacanciescreateJobVacancyCreate vacancystaff, create on job_vacancy
GET /job-vacancieslistOpenJobVacanciesList open vacanciesguest, list on job_vacancy
GET /job-vacancies/stafflistStaffJobVacanciesList staff vacanciesstaff, list on job_vacancy
GET /job-vacancies/staff/:idgetStaffJobVacancyGet staff vacancystaff, read on job_vacancy
GET /job-vacancies/:idgetJobVacancyGet vacancyguest, read on job_vacancy
PATCH /job-vacancies/:idupdateJobVacancyUpdate vacancystaff, update on job_vacancy
PATCH /job-vacancies/:id/closecloseJobVacancyClose vacancystaff, update on job_vacancy
DELETE /job-vacancies/:iddeleteJobVacancyDelete vacancystaff, delete on job_vacancy

Job applications

RouteOperation idDoesWho
POST /job-applicationscreateJobApplicationCreate applicationguest, create on application
GET /job-applications/minelistMyJobApplicationsList my applicationsguest, list on application
GET /job-applicationslistJobApplicationsList applicationsstaff, list on job_vacancy
GET /job-applications/:idgetJobApplicationGet applicationstaff or guest, read on job_vacancy
PATCH /job-applications/:id/statusupdateJobApplicationStatusUpdate application statusstaff, update on job_vacancy
PATCH /job-applications/:idupdateJobApplicationDraftUpdate draftguest, update on application
PATCH /job-applications/:id/submitsubmitJobApplicationSubmit applicationguest, update on application
PATCH /job-applications/:id/withdrawwithdrawJobApplicationWithdraw applicationguest, update on application

Where to go next

On this page