Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

feat: Add certification section to resume profile

Khuram Niazdf99a6cb8a2e
diff --git a/__tests__/addCertificationForm.schema.spec.ts b/__tests__/addCertificationForm.schema.spec.ts
new file mode 100644
index 0000000..13db57f
--- /dev/null
+++ b/__tests__/addCertificationForm.schema.spec.ts
@@ -0,0 +1,113 @@
+import { AddCertificationFormSchema } from "@/models/addCertificationForm.schema";
+
+describe("AddCertificationFormSchema", () => {
+ describe("valid data", () => {
+ it("should accept minimal required fields", () => {
+ const data = { title: "AWS SAA", organization: "Amazon" };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.title).toBe("AWS SAA");
+ expect(result.organization).toBe("Amazon");
+ });
+
+ it("should accept full data with all optional fields", () => {
+ const issueDate = new Date("2024-01-15");
+ const expirationDate = new Date("2027-01-15");
+ const data = {
+ id: "cert-1",
+ resumeId: "resume-1",
+ sectionId: "section-1",
+ sectionTitle: "Certifications",
+ title: "AWS Certified Solutions Architect",
+ organization: "Amazon Web Services",
+ issueDate,
+ expirationDate,
+ credentialUrl: "https://www.credly.com/badges/abc123",
+ noExpiration: false,
+ };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.title).toBe("AWS Certified Solutions Architect");
+ expect(result.organization).toBe("Amazon Web Services");
+ expect(result.issueDate).toEqual(issueDate);
+ expect(result.expirationDate).toEqual(expirationDate);
+ expect(result.credentialUrl).toBe("https://www.credly.com/badges/abc123");
+ });
+
+ it("should default sectionTitle to 'Certifications'", () => {
+ const data = { title: "AWS SAA", organization: "Amazon" };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.sectionTitle).toBe("Certifications");
+ });
+
+ it("should default noExpiration to false", () => {
+ const data = { title: "AWS SAA", organization: "Amazon" };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.noExpiration).toBe(false);
+ });
+
+ it("should accept noExpiration as true", () => {
+ const data = {
+ title: "AWS SAA",
+ organization: "Amazon",
+ noExpiration: true,
+ };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.noExpiration).toBe(true);
+ });
+
+ it("should accept null dates", () => {
+ const data = {
+ title: "AWS SAA",
+ organization: "Amazon",
+ issueDate: null,
+ expirationDate: null,
+ };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.issueDate).toBeNull();
+ expect(result.expirationDate).toBeNull();
+ });
+
+ it("should accept null credentialUrl", () => {
+ const data = {
+ title: "AWS SAA",
+ organization: "Amazon",
+ credentialUrl: null,
+ };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.credentialUrl).toBeNull();
+ });
+
+ it("should accept minimum 2-char title", () => {
+ const data = { title: "AB", organization: "Org" };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.title).toBe("AB");
+ });
+
+ it("should accept minimum 2-char organization", () => {
+ const data = { title: "AWS SAA", organization: "AB" };
+ const result = AddCertificationFormSchema.parse(data);
+ expect(result.organization).toBe("AB");
+ });
+ });
+
+ describe("invalid data", () => {
+ it("should reject missing title", () => {
+ const data = { organization: "Amazon" };
+ expect(() => AddCertificationFormSchema.parse(data)).toThrow();
+ });
+
+ it("should reject missing organization", () => {
+ const data = { title: "AWS SAA" };
+ expect(() => AddCertificationFormSchema.parse(data)).toThrow();
+ });
+
+ it("should reject title shorter than 2 characters", () => {
+ const data = { title: "A", organization: "Amazon" };
+ expect(() => AddCertificationFormSchema.parse(data)).toThrow();
+ });
+
+ it("should reject organization shorter than 2 characters", () => {
+ const data = { title: "AWS SAA", organization: "A" };
+ expect(() => AddCertificationFormSchema.parse(data)).toThrow();
+ });
+ });
+});
diff --git a/__tests__/company.actions.spec.ts b/__tests__/company.actions.spec.ts
index e22d15c..1b2e9e6 100644
--- a/__tests__/company.actions.spec.ts
+++ b/__tests__/company.actions.spec.ts
@@ -29,9 +29,14 @@ vi.mock("@prisma/client", () => {
},
job: {
count: vi.fn(),
+ groupBy: vi.fn(),
},
};
- return { PrismaClient: vi.fn(function() { return mPrismaClient; }) };
+ return {
+ PrismaClient: vi.fn(function () {
+ return mPrismaClient;
+ }),
+ };
});
vi.mock("@/utils/user.utils", () => ({
@@ -104,10 +109,15 @@ describe("Company Actions", () => {
(prisma.company.findMany as any).mockResolvedValue(mockData);
(prisma.company.count as any).mockResolvedValue(mockTotal);
+ (prisma.job.groupBy as any).mockResolvedValue([]);
const result = await getCompanyList(1, 10, "applied");
- expect(result).toEqual({ data: mockData, total: mockTotal });
+ const expectedData = mockData.map((c) => ({
+ ...c,
+ _count: { jobsRejected: 0 },
+ }));
+ expect(result).toEqual({ data: expectedData, total: mockTotal });
expect(prisma.company.findMany).toHaveBeenCalledWith({
where: { createdBy: mockUser.id },
skip: 0,
@@ -135,9 +145,7 @@ describe("Company Actions", () => {
});
it("should handle errors", async () => {
- (getCurrentUser as any).mockRejectedValue(
- new Error("Database error"),
- );
+ (getCurrentUser as any).mockRejectedValue(new Error("Database error"));
await expect(getCompanyList(1, 10)).resolves.toStrictEqual({
success: false,
@@ -248,9 +256,7 @@ describe("Company Actions", () => {
value: "new company",
createdBy: mockUser.id,
};
- (prisma.company.findFirst as any).mockResolvedValue(
- mockExistingCompany,
- );
+ (prisma.company.findFirst as any).mockResolvedValue(mockExistingCompany);
const result = await addCompany(validData);
@@ -379,9 +385,7 @@ describe("Company Actions", () => {
value: "updated company",
};
- (prisma.company.update as any).mockResolvedValue(
- mockUpdatedCompany,
- );
+ (prisma.company.update as any).mockResolvedValue(mockUpdatedCompany);
const result = await updateCompany(validData);
@@ -492,9 +496,7 @@ describe("Company Actions", () => {
value: "updated company",
};
- (prisma.company.update as any).mockResolvedValue(
- mockUpdatedCompany,
- );
+ (prisma.company.update as any).mockResolvedValue(mockUpdatedCompany);
const result = await updateCompany({
...validData,
diff --git a/__tests__/preprocessing.spec.ts b/__tests__/preprocessing.spec.ts
new file mode 100644
index 0000000..8883ed0
--- /dev/null
+++ b/__tests__/preprocessing.spec.ts
@@ -0,0 +1,237 @@
+import { convertResumeToText } from "@/lib/ai/tools/preprocessing";
+import { Resume, SectionType } from "@/models/profile.model";
+
+// Minimal resume fixture shared across tests
+const baseResume: Resume = {
+ id: "resume-1",
+ title: "My Resume",
+ ResumeSections: [],
+};
+
+describe("convertResumeToText - certification sections", () => {
+ it("includes certification section with title and organization", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [
+ {
+ id: "cert-1",
+ title: "AWS Certified Solutions Architect",
+ organization: "Amazon Web Services",
+ },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).toContain("## CERTIFICATIONS");
+ expect(text).toContain("Title: AWS Certified Solutions Architect");
+ expect(text).toContain("Organization: Amazon Web Services");
+ });
+
+ it("includes issue and expiration dates when present", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [
+ {
+ id: "cert-1",
+ title: "AWS SAA",
+ organization: "AWS",
+ issueDate: new Date("2023-06-01"),
+ expirationDate: new Date("2026-06-01"),
+ },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).toContain("Issue Date:");
+ expect(text).toContain("Expiration Date:");
+ });
+
+ it("shows 'No Expiration' when issueDate present but no expirationDate", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [
+ {
+ id: "cert-1",
+ title: "AWS SAA",
+ organization: "AWS",
+ issueDate: new Date("2023-06-01"),
+ },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).toContain("No Expiration");
+ });
+
+ it("omits date lines when no issueDate is provided", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [
+ {
+ id: "cert-1",
+ title: "AWS SAA",
+ organization: "AWS",
+ },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).not.toContain("Issue Date:");
+ expect(text).not.toContain("Expiration Date:");
+ expect(text).not.toContain("No Expiration");
+ });
+
+ it("includes credential URL when present", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [
+ {
+ id: "cert-1",
+ title: "AWS SAA",
+ organization: "AWS",
+ credentialUrl: "https://credly.com/badges/abc",
+ },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).toContain("Credential URL: https://credly.com/badges/abc");
+ });
+
+ it("handles license section type with correct heading", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Licenses",
+ sectionType: SectionType.LICENSE,
+ licenseOrCertifications: [
+ {
+ id: "lic-1",
+ title: "Professional Engineer",
+ organization: "APEGA",
+ },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).toContain("## LICENSES");
+ expect(text).toContain("Title: Professional Engineer");
+ expect(text).toContain("Organization: APEGA");
+ });
+
+ it("omits certification section when licenseOrCertifications is empty", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).not.toContain("## CERTIFICATIONS");
+ });
+
+ it("includes multiple certifications in the same section", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-1",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [
+ { id: "cert-1", title: "AWS SAA", organization: "Amazon" },
+ { id: "cert-2", title: "GCP Associate", organization: "Google" },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).toContain("Title: AWS SAA");
+ expect(text).toContain("Title: GCP Associate");
+ expect(text).toContain("Organization: Amazon");
+ expect(text).toContain("Organization: Google");
+ });
+
+ it("includes certifications alongside other sections", async () => {
+ const resume: Resume = {
+ ...baseResume,
+ ResumeSections: [
+ {
+ id: "sec-sum",
+ resumeId: "resume-1",
+ sectionTitle: "Summary",
+ sectionType: SectionType.SUMMARY,
+ summary: { content: "Experienced engineer." },
+ },
+ {
+ id: "sec-cert",
+ resumeId: "resume-1",
+ sectionTitle: "Certifications",
+ sectionType: SectionType.CERTIFICATION,
+ licenseOrCertifications: [
+ { id: "cert-1", title: "AWS SAA", organization: "Amazon" },
+ ],
+ },
+ ],
+ };
+
+ const text = await convertResumeToText(resume);
+ expect(text).toContain("## SUMMARY");
+ expect(text).toContain("## CERTIFICATIONS");
+ expect(text).toContain("Title: AWS SAA");
+ });
+});
diff --git a/src/actions/profile.actions.ts b/src/actions/profile.actions.ts
index 88b686a..28eaafb 100644
--- a/src/actions/profile.actions.ts
+++ b/src/actions/profile.actions.ts
@@ -3,6 +3,7 @@ import prisma from "@/lib/db";
import { handleError } from "@/lib/utils";
import { AddEducationFormSchema } from "@/models/AddEductionForm.schema";
import { AddContactInfoFormSchema } from "@/models/addContactInfoForm.schema";
+import { AddCertificationFormSchema } from "@/models/addCertificationForm.schema";
import { AddExperienceFormSchema } from "@/models/addExperienceForm.schema";
import { AddSummarySectionFormSchema } from "@/models/addSummaryForm.schema";
import { CreateResumeFormSchema } from "@/models/createResumeForm.schema";
@@ -17,7 +18,7 @@ import { writeFile } from "fs/promises";
export const getResumeList = async (
page: number = 1,
- limit: number = APP_CONSTANTS.RECORDS_PER_PAGE
+ limit: number = APP_CONSTANTS.RECORDS_PER_PAGE,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -68,7 +69,7 @@ export const getResumeList = async (
};
export const getResumeById = async (
- resumeId: string
+ resumeId: string,
): Promise<any | undefined> => {
try {
if (!resumeId) {
@@ -103,6 +104,7 @@ export const getResumeById = async (
location: true,
},
},
+ licenseOrCertifications: true,
},
},
},
@@ -115,7 +117,7 @@ export const getResumeById = async (
};
export const addContactInfo = async (
- data: z.infer<typeof AddContactInfoFormSchema>
+ data: z.infer<typeof AddContactInfoFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -154,7 +156,7 @@ export const addContactInfo = async (
};
export const updateContactInfo = async (
- data: z.infer<typeof AddContactInfoFormSchema>
+ data: z.infer<typeof AddContactInfoFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -188,7 +190,7 @@ export const updateContactInfo = async (
export const createResumeProfile = async (
title: string,
fileName: string,
- filePath?: string
+ filePath?: string,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -252,7 +254,7 @@ export const createResumeProfile = async (
const createFileEntry = async (
fileName: string | undefined,
- filePath: string | undefined
+ filePath: string | undefined,
) => {
const newFileEntry = await prisma.file.create({
data: {
@@ -269,7 +271,7 @@ export const editResume = async (
title: string,
fileId?: string,
fileName?: string,
- filePath?: string
+ filePath?: string,
): Promise<any | undefined> => {
try {
let resolvedFileId = fileId;
@@ -285,7 +287,7 @@ export const editResume = async (
if (!isValidFileId) {
throw new Error(
- `The provided FileId "${resolvedFileId}" does not exist.`
+ `The provided FileId "${resolvedFileId}" does not exist.`,
);
}
}
@@ -311,7 +313,7 @@ export const editResume = async (
export const deleteResumeById = async (
resumeId: string,
- fileId?: string
+ fileId?: string,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -354,6 +356,14 @@ export const deleteResumeById = async (
},
});
+ await prisma.licenseOrCertification.deleteMany({
+ where: {
+ ResumeSection: {
+ resumeId: resumeId,
+ },
+ },
+ });
+
await prisma.resumeSection.deleteMany({
where: {
resumeId: resumeId,
@@ -412,7 +422,7 @@ export const deleteFile = async (fileId: string) => {
};
export const addResumeSummary = async (
- data: z.infer<typeof AddSummarySectionFormSchema>
+ data: z.infer<typeof AddSummarySectionFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -449,7 +459,7 @@ export const addResumeSummary = async (
};
export const updateResumeSummary = async (
- data: z.infer<typeof AddSummarySectionFormSchema>
+ data: z.infer<typeof AddSummarySectionFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -489,7 +499,7 @@ export const updateResumeSummary = async (
};
export const addExperience = async (
- data: z.infer<typeof AddExperienceFormSchema>
+ data: z.infer<typeof AddExperienceFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -538,7 +548,7 @@ export const addExperience = async (
};
export const updateExperience = async (
- data: z.infer<typeof AddExperienceFormSchema>
+ data: z.infer<typeof AddExperienceFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -578,7 +588,7 @@ export const updateExperience = async (
};
export const addEducation = async (
- data: z.infer<typeof AddEducationFormSchema>
+ data: z.infer<typeof AddEducationFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -623,7 +633,7 @@ export const addEducation = async (
};
export const updateEducation = async (
- data: z.infer<typeof AddEducationFormSchema>
+ data: z.infer<typeof AddEducationFormSchema>,
): Promise<any | undefined> => {
try {
const user = await getCurrentUser();
@@ -662,3 +672,78 @@ export const updateEducation = async (
return handleError(error, msg);
}
};
+
+export const addCertification = async (
+ data: z.infer<typeof AddCertificationFormSchema>,
+): Promise<any | undefined> => {
+ try {
+ const user = await getCurrentUser();
+
+ if (!user) {
+ throw new Error("Not authenticated");
+ }
+
+ const section = !data.sectionId
+ ? await prisma.resumeSection.create({
+ data: {
+ resumeId: data.resumeId!,
+ sectionTitle: data.sectionTitle!,
+ sectionType: SectionType.CERTIFICATION,
+ },
+ })
+ : undefined;
+
+ const result = await prisma.resumeSection.update({
+ where: {
+ id: section ? section.id : data.sectionId,
+ },
+ data: {
+ licenseOrCertifications: {
+ create: {
+ title: data.title,
+ organization: data.organization,
+ issueDate: data.issueDate,
+ expirationDate: data.expirationDate,
+ credentialUrl: data.credentialUrl,
+ },
+ },
+ },
+ });
+ revalidatePath(`/dashboard/profile/resume/${data.resumeId}`);
+ return { data: result, success: true };
+ } catch (error) {
+ const msg = "Failed to create certification.";
+ return handleError(error, msg);
+ }
+};
+
+export const updateCertification = async (
+ data: z.infer<typeof AddCertificationFormSchema>,
+): Promise<any | undefined> => {
+ try {
+ const user = await getCurrentUser();
+
+ if (!user) {
+ throw new Error("Not authenticated");
+ }
+
+ const result = await prisma.licenseOrCertification.update({
+ where: {
+ id: data.id,
+ ResumeSection: { Resume: { profile: { userId: user.id } } },
+ },
+ data: {
+ title: data.title,
+ organization: data.organization,
+ issueDate: data.issueDate,
+ expirationDate: data.expirationDate,
+ credentialUrl: data.credentialUrl,
+ },
+ });
+ revalidatePath(`/dashboard/profile/resume/${data.resumeId}`);
+ return { data: result, success: true };
+ } catch (error) {
+ const msg = "Failed to update certification.";
+ return handleError(error, msg);
+ }
+};
diff --git a/src/components/auth/SignupForm.tsx b/src/components/auth/SignupForm.tsx
index 4406fef..7e4e985 100644
--- a/src/components/auth/SignupForm.tsx
+++ b/src/components/auth/SignupForm.tsx
@@ -102,8 +102,8 @@ function SignupForm() {
render={({ field }) => (
<FormItem>
<FormLabel>Password</FormLabel>
- <FormControl>
- <div className="relative">
+ <div className="relative">
+ <FormControl>
<Input
type={showPassword ? "text" : "password"}
autoComplete="new-password"
@@ -112,25 +112,25 @@ function SignupForm() {
autoCapitalize="off"
{...field}
/>
- <Button
- type="button"
- variant="ghost"
- size="icon"
- className="absolute right-0 top-0 h-full px-3 text-muted-foreground"
- onClick={() => setShowPassword((v) => !v)}
- aria-label={
- showPassword ? "Hide password" : "Show password"
- }
- tabIndex={-1}
- >
- {showPassword ? (
- <EyeOff className="h-4 w-4" aria-hidden="true" />
- ) : (
- <Eye className="h-4 w-4" aria-hidden="true" />
- )}
- </Button>
- </div>
- </FormControl>
+ </FormControl>
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="absolute right-0 top-0 h-full px-3 text-muted-foreground"
+ onClick={() => setShowPassword((v) => !v)}
+ aria-label={
+ showPassword ? "Hide password" : "Show password"
+ }
+ tabIndex={-1}
+ >
+ {showPassword ? (
+ <EyeOff className="h-4 w-4" aria-hidden="true" />
+ ) : (
+ <Eye className="h-4 w-4" aria-hidden="true" />
+ )}
+ </Button>
+ </div>
<FormMessage />
</FormItem>
)}
diff --git a/src/components/profile/AddCertification.tsx b/src/components/profile/AddCertification.tsx
new file mode 100644
index 0000000..e620879
--- /dev/null
+++ b/src/components/profile/AddCertification.tsx
@@ -0,0 +1,315 @@
+"use client";
+import { AddCertificationFormSchema } from "@/models/addCertificationForm.schema";
+import { LicenseOrCertification, ResumeSection } from "@/models/profile.model";
+import { useForm } from "react-hook-form";
+import { z } from "zod";
+import { zodResolver } from "@hookform/resolvers/zod";
+import {
+ Dialog,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "../ui/dialog";
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "../ui/form";
+import { Input } from "../ui/input";
+import { DatePicker } from "../DatePicker";
+import { Switch } from "../ui/switch";
+import { Button } from "../ui/button";
+import { useEffect, useTransition } from "react";
+import { toast } from "../ui/use-toast";
+import { Loader } from "lucide-react";
+import {
+ addCertification,
+ updateCertification,
+} from "@/actions/profile.actions";
+
+type AddCertificationProps = {
+ resumeId: string | undefined;
+ sectionId: string | undefined;
+ dialogOpen: boolean;
+ setDialogOpen: (e: boolean) => void;
+ certificationToEdit?: ResumeSection;
+};
+
+function AddCertification({
+ resumeId,
+ sectionId,
+ dialogOpen,
+ setDialogOpen,
+ certificationToEdit,
+}: AddCertificationProps) {
+ const pageTitle = certificationToEdit
+ ? "Edit Certification / License"
+ : "Add Certification / License";
+ const [isPending, startTransition] = useTransition();
+
+ const form = useForm<z.infer<typeof AddCertificationFormSchema>>({
+ resolver: zodResolver(AddCertificationFormSchema),
+ defaultValues: {
+ resumeId,
+ sectionId,
+ noExpiration: false,
+ },
+ });
+
+ const { watch, reset, formState, resetField } = form;
+ const noExpirationValue = watch("noExpiration");
+
+ useEffect(() => {
+ if (certificationToEdit) {
+ const cert: LicenseOrCertification =
+ certificationToEdit?.licenseOrCertifications?.at(0)!;
+ reset(
+ {
+ id: cert?.id,
+ title: cert?.title,
+ organization: cert?.organization,
+ issueDate: cert?.issueDate ? new Date(cert.issueDate) : undefined,
+ expirationDate: cert?.expirationDate
+ ? new Date(cert.expirationDate)
+ : undefined,
+ credentialUrl: cert?.credentialUrl ?? "",
+ noExpiration: !cert?.expirationDate,
+ },
+ { keepDefaultValues: true },
+ );
+ } else {
+ reset(
+ {
+ resumeId,
+ sectionId,
+ },
+ { keepDefaultValues: true },
+ );
+ }
+ }, [certificationToEdit, resumeId, sectionId, reset]);
+
+ const onNoExpirationChange = (checked: boolean) => {
+ if (checked) {
+ resetField("expirationDate");
+ }
+ };
+
+ const onSubmit = (data: z.infer<typeof AddCertificationFormSchema>) => {
+ startTransition(async () => {
+ const res = certificationToEdit?.licenseOrCertifications?.length
+ ? await updateCertification(data)
+ : await addCertification(data);
+ if (!res.success) {
+ toast({
+ variant: "destructive",
+ title: "Error!",
+ description: res.message,
+ });
+ } else {
+ reset();
+ setDialogOpen(false);
+ toast({
+ variant: "success",
+ description: `Certification has been ${
+ certificationToEdit ? "updated" : "added"
+ } successfully`,
+ });
+ }
+ });
+ };
+
+ const closeDialog = () => setDialogOpen(false);
+
+ return (
+ <Dialog open={dialogOpen} onOpenChange={setDialogOpen}>
+ <DialogContent className="h-full md:h-[85%] lg:max-h-screen md:max-w-[40rem] overflow-y-scroll">
+ <DialogHeader>
+ <DialogTitle>{pageTitle}</DialogTitle>
+ </DialogHeader>
+ <Form {...form}>
+ <form
+ onSubmit={form.handleSubmit(onSubmit)}
+ className="grid grid-cols-1 md:grid-cols-2 gap-4 p-2"
+ >
+ {/* SECTION TITLE */}
+ {!sectionId && (
+ <>
+ <div className="md:col-span-2">
+ <FormField
+ control={form.control}
+ name="sectionTitle"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>Section Title</FormLabel>
+ <FormControl>
+ <Input
+ {...field}
+ value={field.value ?? ""}
+ placeholder="Ex: Certifications"
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+ <hr className="md:col-span-2" />
+ </>
+ )}
+
+ {/* CERTIFICATION TITLE */}
+ <div className="md:col-span-2">
+ <FormField
+ control={form.control}
+ name="title"
+ render={({ field }) => (
+ <FormItem className="flex flex-col">
+ <FormLabel>Certification / License Name</FormLabel>
+ <FormControl>
+ <Input
+ {...field}
+ value={field.value ?? ""}
+ placeholder="Ex: AWS Certified Solutions Architect"
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+
+ {/* ORGANIZATION */}
+ <div className="md:col-span-2">
+ <FormField
+ control={form.control}
+ name="organization"
+ render={({ field }) => (
+ <FormItem className="flex flex-col">
+ <FormLabel>Issuing Organization</FormLabel>
+ <FormControl>
+ <Input
+ {...field}
+ value={field.value ?? ""}
+ placeholder="Ex: Amazon Web Services"
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+
+ {/* ISSUE DATE */}
+ <div className="flex flex-col">
+ <FormField
+ control={form.control}
+ name="issueDate"
+ render={({ field }) => (
+ <FormItem className="flex flex-col">
+ <FormLabel>Issue Date</FormLabel>
+ <DatePicker
+ field={field}
+ presets={false}
+ isEnabled={true}
+ captionLayout={true}
+ />
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+
+ {/* EXPIRATION DATE */}
+ <div className="flex flex-col">
+ <FormField
+ control={form.control}
+ name="expirationDate"
+ render={({ field }) => (
+ <FormItem className="flex flex-col">
+ <FormLabel>Expiration Date</FormLabel>
+ <DatePicker
+ field={field}
+ presets={false}
+ isEnabled={!noExpirationValue}
+ captionLayout={true}
+ />
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+
+ {/* NO EXPIRATION */}
+ <div className="flex items-center">
+ <FormField
+ control={form.control}
+ name="noExpiration"
+ render={({ field }) => (
+ <FormItem className="flex flex-row">
+ <Switch
+ checked={field.value}
+ onCheckedChange={(c) => {
+ field.onChange(c);
+ onNoExpirationChange(c);
+ }}
+ />
+ <FormLabel className="flex items-center ml-4 mb-2">
+ {field.value ? "No Expiration" : "Has Expiration Date"}
+ </FormLabel>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+
+ {/* CREDENTIAL URL */}
+ <div className="md:col-span-2">
+ <FormField
+ control={form.control}
+ name="credentialUrl"
+ render={({ field }) => (
+ <FormItem className="flex flex-col">
+ <FormLabel>Credential URL (optional)</FormLabel>
+ <FormControl>
+ <Input
+ {...field}
+ value={field.value ?? ""}
+ placeholder="https://www.credly.com/badges/..."
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+
+ <div className="md:col-span-2 mt-4">
+ <DialogFooter>
+ <div>
+ <Button
+ type="reset"
+ variant="outline"
+ className="mt-2 md:mt-0 w-full"
+ onClick={closeDialog}
+ >
+ Cancel
+ </Button>
+ </div>
+ <Button type="submit" disabled={!formState.isDirty}>
+ Save
+ {isPending && <Loader className="h-4 w-4 shrink-0 spinner" />}
+ </Button>
+ </DialogFooter>
+ </div>
+ </form>
+ </Form>
+ </DialogContent>
+ </Dialog>
+ );
+}
+
+export default AddCertification;
diff --git a/src/components/profile/AddResumeSection.tsx b/src/components/profile/AddResumeSection.tsx
index ee09d89..2e28609 100644
--- a/src/components/profile/AddResumeSection.tsx
+++ b/src/components/profile/AddResumeSection.tsx
@@ -19,6 +19,7 @@ import {
import AddResumeSummary from "./AddResumeSummary";
import AddExperience from "./AddExperience";
import AddEducation from "./AddEducation";
+import AddCertification from "./AddCertification";
interface AddResumeSectionProps {
resume: Resume;
@@ -29,6 +30,7 @@ export interface AddResumeSectionRef {
openSummaryDialog: (s: ResumeSection) => void;
openExperienceDialog: (s: ResumeSection) => void;
openEducationDialog: (s: ResumeSection) => void;
+ openCertificationDialog: (s: ResumeSection) => void;
}
const AddResumeSection = forwardRef<AddResumeSectionRef, AddResumeSectionProps>(
@@ -37,15 +39,19 @@ const AddResumeSection = forwardRef<AddResumeSectionRef, AddResumeSectionProps>(
const [summaryDialogOpen, setSummaryDialogOpen] = useState(false);
const [experienceDialogOpen, setExperienceDialogOpen] = useState(false);
const [educationDialogOpen, setEducationDialogOpen] = useState(false);
+ const [certificationDialogOpen, setCertificationDialogOpen] =
+ useState(false);
const [contactInfoToEdit, setContactInfoToEdit] =
useState<ContactInfo | null>(null);
const [summaryToEdit, setSummaryToEdit] = useState<ResumeSection | null>(
- null
+ null,
);
const [experienceToEdit, setExperienceToEdit] =
useState<ResumeSection | null>(null);
const [educationToEdit, setEducationToEdit] =
useState<ResumeSection | null>(null);
+ const [certificationToEdit, setCertificationToEdit] =
+ useState<ResumeSection | null>(null);
useImperativeHandle(ref, () => ({
openContactInfoDialog(contactInfo: ContactInfo) {
setContactInfoDialogOpen(true);
@@ -63,15 +69,22 @@ const AddResumeSection = forwardRef<AddResumeSectionRef, AddResumeSectionProps>(
setEducationDialogOpen(true);
setEducationToEdit({ ...educationSection });
},
+ openCertificationDialog(certificationSection: ResumeSection) {
+ setCertificationDialogOpen(true);
+ setCertificationToEdit({ ...certificationSection });
+ },
}));
const summarySection = resume?.ResumeSections?.find(
- (section) => section.sectionType === SectionType.SUMMARY
+ (section) => section.sectionType === SectionType.SUMMARY,
);
const experienceSection = resume?.ResumeSections?.find(
- (section) => section.sectionType === SectionType.EXPERIENCE
+ (section) => section.sectionType === SectionType.EXPERIENCE,
);
const educationSection = resume?.ResumeSections?.find(
- (section) => section.sectionType === SectionType.EDUCATION
+ (section) => section.sectionType === SectionType.EDUCATION,
+ );
+ const certificationSection = resume?.ResumeSections?.find(
+ (section) => section.sectionType === SectionType.CERTIFICATION,
);
const resetExperienceToEdit = () => {
setExperienceToEdit(null);
@@ -79,6 +92,9 @@ const AddResumeSection = forwardRef<AddResumeSectionRef, AddResumeSectionProps>(
const resetEducationToEdit = () => {
setEducationToEdit(null);
};
+ const resetCertificationToEdit = () => {
+ setCertificationToEdit(null);
+ };
const openContactInfoDialog = () => setContactInfoDialogOpen(true);
const openSummaryDialog = () => setSummaryDialogOpen(true);
const openExperienceDialog = () => {
@@ -93,6 +109,12 @@ const AddResumeSection = forwardRef<AddResumeSectionRef, AddResumeSectionProps>(
}
setEducationDialogOpen(true);
};
+ const openCertificationDialog = () => {
+ if (certificationToEdit) {
+ resetCertificationToEdit();
+ }
+ setCertificationDialogOpen(true);
+ };
return (
<>
<DropdownMenu>
@@ -136,6 +158,12 @@ const AddResumeSection = forwardRef<AddResumeSectionRef, AddResumeSectionProps>(
>
Add Education
</DropdownMenuItem>
+ <DropdownMenuItem
+ className="cursor-pointer"
+ onClick={openCertificationDialog}
+ >
+ Add Certification / License
+ </DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
@@ -165,9 +193,16 @@ const AddResumeSection = forwardRef<AddResumeSectionRef, AddResumeSectionProps>(
setDialogOpen={setEducationDialogOpen}
educationToEdit={educationToEdit!}
/>
+ <AddCertification
+ resumeId={resume?.id}
+ sectionId={certificationSection?.id}
+ dialogOpen={certificationDialogOpen}
+ setDialogOpen={setCertificationDialogOpen}
+ certificationToEdit={certificationToEdit!}
+ />
</>
);
- }
+ },
);
AddResumeSection.displayName = "AddResumeSection";
diff --git a/src/components/profile/CertificationCard.tsx b/src/components/profile/CertificationCard.tsx
new file mode 100644
index 0000000..dfabff7
--- /dev/null
+++ b/src/components/profile/CertificationCard.tsx
@@ -0,0 +1,83 @@
+"use client";
+import { ResumeSection } from "@/models/profile.model";
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardHeader,
+ CardTitle,
+} from "../ui/card";
+import { Button } from "../ui/button";
+import { Edit, ExternalLink } from "lucide-react";
+import { format } from "date-fns";
+
+interface CertificationCardProps {
+ certificationSection: ResumeSection | undefined;
+ openDialogForEdit: (id: string) => void;
+}
+
+function CertificationCard({
+ certificationSection,
+ openDialogForEdit,
+}: CertificationCardProps) {
+ const { sectionTitle, licenseOrCertifications } = certificationSection!;
+ return (
+ <>
+ <CardTitle className="pl-6 py-3">{sectionTitle}</CardTitle>
+ {licenseOrCertifications?.map(
+ ({
+ id,
+ title,
+ organization,
+ issueDate,
+ expirationDate,
+ credentialUrl,
+ }) => (
+ <Card key={id}>
+ <CardHeader className="p-2 pb-0 flex-row justify-between relative">
+ <CardTitle className="text-xl pl-4">{title}</CardTitle>
+ <Button
+ variant="ghost"
+ size="sm"
+ className="h-8 gap-1 absolute top-0 right-1"
+ onClick={() => openDialogForEdit(id!)}
+ >
+ <Edit className="h-3.5 w-3.5" />
+ <span className="sr-only sm:not-sr-only sm:whitespace-nowrap">
+ Edit
+ </span>
+ </Button>
+ </CardHeader>
+ <CardContent>
+ <h3>{organization}</h3>
+ <CardDescription>
+ {issueDate && (
+ <>Issued: {format(new Date(issueDate), "MMM yyyy")}</>
+ )}
+ {issueDate && expirationDate && " · "}
+ {expirationDate ? (
+ <>Expires: {format(new Date(expirationDate), "MMM yyyy")}</>
+ ) : (
+ issueDate && " · No Expiration"
+ )}
+ </CardDescription>
+ {credentialUrl && (
+ <a
+ href={credentialUrl}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="inline-flex items-center gap-1 text-sm text-blue-500 hover:underline mt-1"
+ >
+ View Credential
+ <ExternalLink className="h-3.5 w-3.5" />
+ </a>
+ )}
+ </CardContent>
+ </Card>
+ ),
+ )}
+ </>
+ );
+}
+
+export default CertificationCard;
diff --git a/src/components/profile/ResumeContainer.tsx b/src/components/profile/ResumeContainer.tsx
index 0da8f92..63fc365 100644
--- a/src/components/profile/ResumeContainer.tsx
+++ b/src/components/profile/ResumeContainer.tsx
@@ -7,6 +7,7 @@ import { useRef } from "react";
import SummarySectionCard from "./SummarySectionCard";
import ExperienceCard from "./ExperienceCard";
import EducationCard from "./EducationCard";
+import CertificationCard from "./CertificationCard";
import AiResumeReviewSection from "./AiResumeReviewSection";
import { DownloadFileButton } from "./DownloadFileButton";
@@ -14,13 +15,16 @@ function ResumeContainer({ resume }: { resume: Resume }) {
const resumeSectionRef = useRef<AddResumeSectionRef>(null);
const { title, ContactInfo, ResumeSections } = resume ?? {};
const summarySection = ResumeSections?.find(
- (section) => section.sectionType === SectionType.SUMMARY
+ (section) => section.sectionType === SectionType.SUMMARY,
);
const experienceSection = ResumeSections?.find(
- (section) => section.sectionType === SectionType.EXPERIENCE
+ (section) => section.sectionType === SectionType.EXPERIENCE,
);
const educationSection = ResumeSections?.find(
- (section) => section.sectionType === SectionType.EDUCATION
+ (section) => section.sectionType === SectionType.EDUCATION,
+ );
+ const certificationSection = ResumeSections?.find(
+ (section) => section.sectionType === SectionType.CERTIFICATION,
);
const openContactInfoDialog = () => {
resumeSectionRef.current?.openContactInfoDialog(ContactInfo!);
@@ -32,7 +36,7 @@ function ResumeContainer({ resume }: { resume: Resume }) {
const section: ResumeSection = {
...experienceSection!,
workExperiences: experienceSection?.workExperiences?.filter(
- (exp) => exp.id === experienceId
+ (exp) => exp.id === experienceId,
),
};
resumeSectionRef.current?.openExperienceDialog(section);
@@ -41,11 +45,21 @@ function ResumeContainer({ resume }: { resume: Resume }) {
const section: ResumeSection = {
...educationSection!,
educations: educationSection?.educations?.filter(
- (edu) => edu.id === educationId
+ (edu) => edu.id === educationId,
),
};
resumeSectionRef.current?.openEducationDialog(section);
};
+ const openCertificationDialogForEdit = (certificationId: string) => {
+ const section: ResumeSection = {
+ ...certificationSection!,
+ licenseOrCertifications:
+ certificationSection?.licenseOrCertifications?.filter(
+ (cert) => cert.id === certificationId,
+ ),
+ };
+ resumeSectionRef.current?.openCertificationDialog(section);
+ };
return (
<>
@@ -57,7 +71,7 @@ function ResumeContainer({ resume }: { resume: Resume }) {
? DownloadFileButton(
resume.File?.filePath,
title,
- resume.File?.fileName
+ resume.File?.fileName,
)
: title}
</CardDescription>
@@ -91,6 +105,12 @@ function ResumeContainer({ resume }: { resume: Resume }) {
openDialogForEdit={openEducationDialogForEdit}
/>
)}
+ {certificationSection && (
+ <CertificationCard
+ certificationSection={certificationSection}
+ openDialogForEdit={openCertificationDialogForEdit}
+ />
+ )}
</>
);
}
diff --git a/src/lib/ai/prompts/job-match/user.ts b/src/lib/ai/prompts/job-match/user.ts
index 86d5426..72ec6b0 100644
--- a/src/lib/ai/prompts/job-match/user.ts
+++ b/src/lib/ai/prompts/job-match/user.ts
@@ -8,7 +8,7 @@
*/
export function buildJobMatchPrompt(
resumeText: string,
- jobDescription: string
+ jobDescription: string,
): string {
return `Compare this resume against the job description and return a JSON analysis.
@@ -25,7 +25,7 @@ Analyze the match and provide:
- skills comparison (matched, missing, transferable, bonus)
- experience assessment (level match, years, relevance)
- keywords (matched, missing, phrases to add)
-- dealBreakers (critical missing requirements)
+- dealBreakers (critical missing requirements, including mandatory certifications or licenses)
- tailoringTips (specific resume changes)
- summary (2-3 sentence assessment)
diff --git a/src/lib/ai/prompts/resume-review/user.ts b/src/lib/ai/prompts/resume-review/user.ts
index 8e8fee9..34c4be2 100644
--- a/src/lib/ai/prompts/resume-review/user.ts
+++ b/src/lib/ai/prompts/resume-review/user.ts
@@ -37,8 +37,9 @@ ${resumeText}
- suggestions: Specific replacement recommendations
5. **Section Feedback** - Evaluate each resume section:
- - Key by section name (Summary, Experience, Skills, Education, etc.)
+ - Key by section name (Summary, Experience, Skills, Education, Certifications, etc.)
- Provide status (good/needsWork/missing) and specific feedback
+ - For Certifications/Licenses: assess relevance to the target role and whether any key certs are missing
6. **ATS Issues** - Only list issues that ACTUALLY EXIST in this resume:
- Check for: tables, graphics, unusual fonts (only report if found)
diff --git a/src/lib/ai/tools/preprocessing.ts b/src/lib/ai/tools/preprocessing.ts
index 3a12269..0a627bb 100644
--- a/src/lib/ai/tools/preprocessing.ts
+++ b/src/lib/ai/tools/preprocessing.ts
@@ -7,6 +7,7 @@
import {
ContactInfo,
Education,
+ LicenseOrCertification,
Resume,
ResumeSection,
SectionType,
@@ -156,6 +157,26 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {
.join("\n\n");
};
+ const formatCertifications = (certs?: LicenseOrCertification[]) => {
+ if (!certs || certs.length === 0) return "";
+ return certs
+ .map((cert) => {
+ const issueDate = cert.issueDate ? formatDate(cert.issueDate) : null;
+ const expirationDate = cert.expirationDate
+ ? formatDate(cert.expirationDate)
+ : "No Expiration";
+ const parts = [
+ `Title: ${cert.title}`,
+ `Organization: ${cert.organization}`,
+ issueDate ? `Issue Date: ${issueDate}` : "",
+ issueDate ? `Expiration Date: ${expirationDate}` : "",
+ cert.credentialUrl ? `Credential URL: ${cert.credentialUrl}` : "",
+ ].filter(Boolean);
+ return parts.join("\n");
+ })
+ .join("\n\n");
+ };
+
const formatResumeSections = (sections?: ResumeSection[]) => {
if (!sections || sections.length === 0) return "";
return sections
@@ -173,6 +194,15 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {
const content = formatEducation(section.educations);
return content ? `## EDUCATION\n${content}` : "";
}
+ case SectionType.CERTIFICATION:
+ case SectionType.LICENSE: {
+ const content = formatCertifications(
+ section.licenseOrCertifications,
+ );
+ return content
+ ? `## ${section.sectionTitle.toUpperCase()}\n${content}`
+ : "";
+ }
default:
return "";
}
diff --git a/src/lib/scraper/runner.ts b/src/lib/scraper/runner.ts
index 74e74e3..dffb6c6 100644
--- a/src/lib/scraper/runner.ts
+++ b/src/lib/scraper/runner.ts
@@ -118,6 +118,13 @@ interface ResumeWithSections extends PrismaResume {
description: string | null;
location: { label: string };
}>;
+ licenseOrCertifications: Array<{
+ title: string;
+ organization: string;
+ issueDate: Date | null;
+ expirationDate: Date | null;
+ credentialUrl: string | null;
+ }>;
}>;
}
@@ -163,6 +170,7 @@ export async function runAutomation(
location: true,
},
},
+ licenseOrCertifications: true,
},
},
},
@@ -307,7 +315,8 @@ export async function runAutomation(
jobsProcessed++;
- const modelName = aiSettings.model || getDefaultModelForProvider(aiSettings.provider);
+ const modelName =
+ aiSettings.model || getDefaultModelForProvider(aiSettings.provider);
automationLogger.log(
automation.id,
"info",
@@ -597,6 +606,27 @@ async function convertResumeForMatch(
);
}
}
+
+ if (
+ (section.sectionType === "certification" ||
+ section.sectionType === "license") &&
+ section.licenseOrCertifications.length > 0
+ ) {
+ parts.push(`## ${section.sectionType.toUpperCase()}S`);
+ for (const cert of section.licenseOrCertifications) {
+ parts.push(
+ `Title: ${cert.title}`,
+ `Organization: ${cert.organization}`,
+ cert.issueDate
+ ? `Issue Date: ${new Date(cert.issueDate).toLocaleDateString("en-US", { month: "short", year: "numeric" })}`
+ : "",
+ cert.expirationDate
+ ? `Expiration Date: ${new Date(cert.expirationDate).toLocaleDateString("en-US", { month: "short", year: "numeric" })}`
+ : "No Expiration",
+ "",
+ );
+ }
+ }
}
return parts.filter(Boolean).join("\n");
diff --git a/src/models/addCertificationForm.schema.ts b/src/models/addCertificationForm.schema.ts
new file mode 100644
index 0000000..57d02ec
--- /dev/null
+++ b/src/models/addCertificationForm.schema.ts
@@ -0,0 +1,22 @@
+import { z } from "zod";
+
+export const AddCertificationFormSchema = z.object({
+ id: z.string().optional(),
+ resumeId: z.string().optional(),
+ sectionId: z.string().optional(),
+ sectionTitle: z.string().default("Certifications").optional(),
+ title: z
+ .string({
+ error: "Certification title is required.",
+ })
+ .min(2),
+ organization: z
+ .string({
+ error: "Issuing organization is required.",
+ })
+ .min(2),
+ issueDate: z.date().nullable().optional(),
+ expirationDate: z.date().nullable().optional(),
+ credentialUrl: z.string().nullable().optional(),
+ noExpiration: z.boolean().default(false).optional(),
+});
diff --git a/src/models/profile.model.ts b/src/models/profile.model.ts
index 676cfce..9f150a7 100644
--- a/src/models/profile.model.ts
+++ b/src/models/profile.model.ts
@@ -63,6 +63,15 @@ export interface SummarySectionForm {
content: string;
}
+export interface LicenseOrCertification {
+ id?: string;
+ title: string;
+ organization: string;
+ issueDate?: Date;
+ expirationDate?: Date;
+ credentialUrl?: string;
+}
+
export interface ResumeSection {
id?: string;
resumeId: string;
@@ -71,6 +80,7 @@ export interface ResumeSection {
summary?: Summary;
workExperiences?: WorkExperience[];
educations?: Education[];
+ licenseOrCertifications?: LicenseOrCertification[];
}
export interface WorkExperience {