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 support for additional contact info fields including URLs and labels

Khuram Niazefc6a4e39eaf
diff --git a/__tests__/greenhouse-pipeline.spec.ts b/__tests__/greenhouse-pipeline.spec.ts
index 84e665b..1d12d8c 100644
--- a/__tests__/greenhouse-pipeline.spec.ts
+++ b/__tests__/greenhouse-pipeline.spec.ts
@@ -61,7 +61,7 @@ describe("runGreenhousePipeline", () => {
expect(result.funnel.located).toBeNull();
});
- it("hard-gates off-location jobs when strictLocation is on (remote passes)", () => {
+ it("hard-gates off-location jobs when strictLocation is on", () => {
const jobs = [
job({ title: "Frontend Engineer", location: "Toronto, Canada" }),
job({ title: "Frontend Engineer", location: "Berlin, Germany" }),
@@ -72,7 +72,7 @@ describe("runGreenhousePipeline", () => {
{ ...config, strictLocation: true },
[],
);
- expect(result.funnel.located).toBe(2); // Canada + Remote, Berlin dropped
+ expect(result.funnel.located).toBe(1); // only Canada; Berlin + Remote dropped
});
it("sorts toAnalyze by score descending", () => {
diff --git a/prisma/migrations/20260628161416_add_contact_info_urls/migration.sql b/prisma/migrations/20260628161416_add_contact_info_urls/migration.sql
new file mode 100644
index 0000000..78e063b
--- /dev/null
+++ b/prisma/migrations/20260628161416_add_contact_info_urls/migration.sql
@@ -0,0 +1,3 @@
+-- AlterTable
+ALTER TABLE "ContactInfo" ADD COLUMN "url1" TEXT;
+ALTER TABLE "ContactInfo" ADD COLUMN "url2" TEXT;
diff --git a/prisma/migrations/20260628161718_add_contact_info_url_labels/migration.sql b/prisma/migrations/20260628161718_add_contact_info_url_labels/migration.sql
new file mode 100644
index 0000000..456e9a4
--- /dev/null
+++ b/prisma/migrations/20260628161718_add_contact_info_url_labels/migration.sql
@@ -0,0 +1,3 @@
+-- AlterTable
+ALTER TABLE "ContactInfo" ADD COLUMN "url1Label" TEXT;
+ALTER TABLE "ContactInfo" ADD COLUMN "url2Label" TEXT;
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 13c3817..4a82510 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -132,6 +132,10 @@ model ContactInfo {
email String
phone String
address String?
+ url1 String?
+ url1Label String?
+ url2 String?
+ url2Label String?
resume Resume @relation(fields: [resumeId], references: [id])
}
diff --git a/src/actions/profile.actions.ts b/src/actions/profile.actions.ts
index 80d6660..d61e5b4 100644
--- a/src/actions/profile.actions.ts
+++ b/src/actions/profile.actions.ts
@@ -147,6 +147,10 @@ export const addContactInfo = async (
email: data.email!,
phone: data.phone!,
address: data.address,
+ url1: data.url1 || null,
+ url1Label: data.url1Label || null,
+ url2: data.url2 || null,
+ url2Label: data.url2Label || null,
},
},
},
@@ -182,6 +186,10 @@ export const updateContactInfo = async (
email: data.email!,
phone: data.phone!,
address: data.address,
+ url1: data.url1 || null,
+ url1Label: data.url1Label || null,
+ url2: data.url2 || null,
+ url2Label: data.url2Label || null,
},
});
revalidatePath("/dashboard/profile/resume");
diff --git a/src/components/profile/AddContactInfo.tsx b/src/components/profile/AddContactInfo.tsx
index 0a950d5..92dd1d7 100644
--- a/src/components/profile/AddContactInfo.tsx
+++ b/src/components/profile/AddContactInfo.tsx
@@ -1,5 +1,5 @@
"use client";
-import { Loader } from "lucide-react";
+import { Loader, X } from "lucide-react";
import { Button } from "../ui/button";
import {
Dialog,
@@ -21,7 +21,7 @@ import { AddContactInfoFormSchema } from "@/models/addContactInfoForm.schema";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import { z } from "zod";
-import { useEffect, useTransition } from "react";
+import { useEffect, useState, useTransition } from "react";
import { toast } from "../ui/use-toast";
import { ContactInfo } from "@/models/profile.model";
import { addContactInfo, updateContactInfo } from "@/actions/profile.actions";
@@ -40,6 +40,7 @@ function AddContactInfo({
resumeId,
}: AddContactInfoProps) {
const [isPending, startTransition] = useTransition();
+ const [showLink2, setShowLink2] = useState(false);
const pageTitle = contactInfoToEdit
? "Edit Contact Info"
@@ -55,6 +56,10 @@ function AddContactInfo({
email: "",
phone: "",
address: "",
+ url1: "",
+ url1Label: "",
+ url2: "",
+ url2Label: "",
},
});
@@ -62,6 +67,7 @@ function AddContactInfo({
useEffect(() => {
if (contactInfoToEdit) {
+ setShowLink2(!!contactInfoToEdit.url2);
reset(
{
id: contactInfoToEdit.id,
@@ -72,6 +78,10 @@ function AddContactInfo({
email: contactInfoToEdit.email,
phone: contactInfoToEdit.phone,
address: contactInfoToEdit.address ?? "",
+ url1: contactInfoToEdit.url1 ?? "",
+ url1Label: contactInfoToEdit.url1Label ?? "",
+ url2: contactInfoToEdit.url2 ?? "",
+ url2Label: contactInfoToEdit.url2Label ?? "",
},
{ keepDefaultValues: true }
);
@@ -218,10 +228,109 @@ function AddContactInfo({
)}
/>
</div>
+
+ {/* LINK 1 */}
+ <div className="md:col-span-2">
+ <p className="text-sm font-medium mb-2">
+ Link 1{" "}
+ <span className="text-muted-foreground font-normal">
+ (optional — portfolio, LinkedIn, GitHub, etc.)
+ </span>
+ </p>
+ <div className="grid grid-cols-3 gap-2">
+ <FormField
+ control={form.control}
+ name="url1Label"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel className="text-xs text-muted-foreground">Label</FormLabel>
+ <FormControl>
+ <Input placeholder="e.g. LinkedIn" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ <FormField
+ control={form.control}
+ name="url1"
+ render={({ field }) => (
+ <FormItem className="col-span-2">
+ <FormLabel className="text-xs text-muted-foreground">URL</FormLabel>
+ <FormControl>
+ <Input placeholder="https://" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+ </div>
+
+ {/* LINK 2 */}
+ {showLink2 ? (
+ <div className="md:col-span-2">
+ <div className="flex items-center justify-between mb-2">
+ <p className="text-sm font-medium">Link 2</p>
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="h-6 w-6 text-muted-foreground"
+ onClick={() => {
+ form.setValue("url2", "", { shouldDirty: true });
+ form.setValue("url2Label", "");
+ setShowLink2(false);
+ }}
+ >
+ <X className="h-4 w-4" />
+ </Button>
+ </div>
+ <div className="grid grid-cols-3 gap-2">
+ <FormField
+ control={form.control}
+ name="url2Label"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel className="text-xs text-muted-foreground">Label</FormLabel>
+ <FormControl>
+ <Input placeholder="e.g. GitHub" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ <FormField
+ control={form.control}
+ name="url2"
+ render={({ field }) => (
+ <FormItem className="col-span-2">
+ <FormLabel className="text-xs text-muted-foreground">URL</FormLabel>
+ <FormControl>
+ <Input placeholder="https://" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ </div>
+ </div>
+ ) : (
+ <div className="md:col-span-2">
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ className="text-muted-foreground px-0 h-auto"
+ onClick={() => setShowLink2(true)}
+ >
+ + Add another link
+ </Button>
+ </div>
+ )}
+
<div className="md:col-span-2 mt-4">
- <DialogFooter
- // className="md:col-span
- >
+ <DialogFooter>
<div>
<Button
type="reset"
diff --git a/src/components/profile/ContactInfoCard.tsx b/src/components/profile/ContactInfoCard.tsx
index 156bcdf..5f6c478 100644
--- a/src/components/profile/ContactInfoCard.tsx
+++ b/src/components/profile/ContactInfoCard.tsx
@@ -10,7 +10,23 @@ interface ContactInfoCardProps {
}
function ContactInfoCard({ contactInfo, openDialog }: ContactInfoCardProps) {
- const { firstName, lastName, headline, email, phone, address } = contactInfo!;
+ const { firstName, lastName, headline, email, phone, address, url1, url1Label, url2, url2Label } =
+ contactInfo!;
+ const contactParts = [email, phone, address].filter(Boolean).join(" · ");
+ const isSafeUrl = (u: string) => {
+ try {
+ const p = new URL(u);
+ return p.protocol === "https:" || p.protocol === "http:";
+ } catch {
+ return false;
+ }
+ };
+ const urls = (
+ [
+ { url: url1, label: url1Label },
+ { url: url2, label: url2Label },
+ ] as { url?: string; label?: string }[]
+ ).filter((e): e is { url: string; label?: string } => !!e.url && isSafeUrl(e.url));
return (
<Card>
<CardHeader className="flex-row justify-between relative">
@@ -19,9 +35,26 @@ function ContactInfoCard({ contactInfo, openDialog }: ContactInfoCardProps) {
{firstName} {lastName}
</CardTitle>
<CardDescription>{headline}</CardDescription>
- <CardDescription>
- {email} - {phone} - {address}
- </CardDescription>
+ {contactParts && (
+ <CardDescription>{contactParts}</CardDescription>
+ )}
+ {urls.length > 0 && (
+ <CardDescription className="flex flex-col gap-1">
+ {urls.map(({ url, label }) => (
+ <span key={url}>
+ {label && <span>{label}: </span>}
+ <a
+ href={url}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-primary underline underline-offset-2 hover:opacity-80"
+ >
+ {url}
+ </a>
+ </span>
+ ))}
+ </CardDescription>
+ )}
</div>
<Button
variant="ghost"
diff --git a/src/components/profile/resume-pdf/ProfessionalTemplate.tsx b/src/components/profile/resume-pdf/ProfessionalTemplate.tsx
index e9182e9..f224f61 100644
--- a/src/components/profile/resume-pdf/ProfessionalTemplate.tsx
+++ b/src/components/profile/resume-pdf/ProfessionalTemplate.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Document, Page, Text, View } from "@react-pdf/renderer";
+import { Document, Link, Page, Text, View } from "@react-pdf/renderer";
import { format } from "date-fns";
import { Resume, ResumeSection, SectionType } from "@/models/profile.model";
import { professionalStyles as s } from "./styles/professional.styles";
@@ -83,11 +83,13 @@ export function ProfessionalResumeDocument({ resume, htmlNodes }: Props) {
[SectionType.COURSE, SectionType.PROJECT, SectionType.OTHER].includes(sec.sectionType),
) ?? [];
- const contactParts = [
- ContactInfo?.address,
- ContactInfo?.phone,
- ContactInfo?.email,
- ].filter(Boolean) as string[];
+ const hasContact = !!(
+ ContactInfo?.address ||
+ ContactInfo?.phone ||
+ ContactInfo?.email ||
+ ContactInfo?.url1 ||
+ ContactInfo?.url2
+ );
return (
<Document
@@ -108,13 +110,37 @@ export function ProfessionalResumeDocument({ resume, htmlNodes }: Props) {
<Text style={s.headline}>{ContactInfo.headline}</Text>
) : null}
</View>
- {contactParts.length > 0 && (
+ {hasContact && (
<View style={s.headerRight}>
- {contactParts.map((part, i) => (
- <Text key={i} style={s.contactLine}>
- {part}
+ {(ContactInfo.address || ContactInfo.phone) && (
+ <Text style={s.contactLine}>
+ {[ContactInfo.address, ContactInfo.phone].filter(Boolean).join(" · ")}
</Text>
- ))}
+ )}
+ {ContactInfo.email && (
+ <Text style={s.contactLine}>{ContactInfo.email}</Text>
+ )}
+ {(ContactInfo.url1 || ContactInfo.url2) && (
+ <Text style={s.contactLine}>
+ {ContactInfo.url1 && (
+ <Link
+ src={ContactInfo.url1}
+ style={{ color: "#1a1a1a", textDecoration: "none" }}
+ >
+ {ContactInfo.url1.replace(/^https?:\/\/(www\.)?/, "")}
+ </Link>
+ )}
+ {ContactInfo.url1 && ContactInfo.url2 ? " · " : ""}
+ {ContactInfo.url2 && (
+ <Link
+ src={ContactInfo.url2}
+ style={{ color: "#1a1a1a", textDecoration: "none" }}
+ >
+ {ContactInfo.url2.replace(/^https?:\/\/(www\.)?/, "")}
+ </Link>
+ )}
+ </Text>
+ )}
</View>
)}
</View>
diff --git a/src/components/profile/resume-pdf/SimpleTemplate.tsx b/src/components/profile/resume-pdf/SimpleTemplate.tsx
index 0e03dac..6ce791b 100644
--- a/src/components/profile/resume-pdf/SimpleTemplate.tsx
+++ b/src/components/profile/resume-pdf/SimpleTemplate.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { Document, Page, Text, View } from "@react-pdf/renderer";
+import { Document, Link, Page, Text, View } from "@react-pdf/renderer";
import { format } from "date-fns";
import { Resume, SectionType } from "@/models/profile.model";
import { simpleStyles } from "./styles/simple.styles";
@@ -40,11 +40,18 @@ export function SimpleResumeDocument({ resume, htmlNodes }: Props) {
(s) => s.sectionType === SectionType.CERTIFICATION,
);
- const contactParts = [
- ContactInfo?.email,
- ContactInfo?.phone,
- ContactInfo?.address,
- ].filter(Boolean);
+ type ContactPart = { text: string; href?: string };
+ const contactParts: ContactPart[] = [
+ ContactInfo?.email ? { text: ContactInfo.email } : null,
+ ContactInfo?.phone ? { text: ContactInfo.phone } : null,
+ ContactInfo?.address ? { text: ContactInfo.address } : null,
+ ContactInfo?.url1
+ ? { text: ContactInfo.url1.replace(/^https?:\/\/(www\.)?/, ""), href: ContactInfo.url1 }
+ : null,
+ ContactInfo?.url2
+ ? { text: ContactInfo.url2.replace(/^https?:\/\/(www\.)?/, ""), href: ContactInfo.url2 }
+ : null,
+ ].filter((p): p is ContactPart => p !== null);
return (
<Document
@@ -64,7 +71,20 @@ export function SimpleResumeDocument({ resume, htmlNodes }: Props) {
<Text style={simpleStyles.subheading}>{ContactInfo.headline}</Text>
) : null}
{contactParts.length > 0 ? (
- <Text style={simpleStyles.contactLine}>{contactParts.join(" · ")}</Text>
+ <View style={{ flexDirection: "row", flexWrap: "wrap" }}>
+ {contactParts.map((part, i) => (
+ <Text key={i} style={simpleStyles.contactLine}>
+ {i > 0 ? " · " : ""}
+ {part.href ? (
+ <Link src={part.href} style={{ color: "#000000", textDecoration: "none" }}>
+ {part.text}
+ </Link>
+ ) : (
+ part.text
+ )}
+ </Text>
+ ))}
+ </View>
) : null}
</View>
)}
diff --git a/src/components/profile/resume-pdf/styles/professional.styles.ts b/src/components/profile/resume-pdf/styles/professional.styles.ts
index e70ec5b..6e643f3 100644
--- a/src/components/profile/resume-pdf/styles/professional.styles.ts
+++ b/src/components/profile/resume-pdf/styles/professional.styles.ts
@@ -8,7 +8,7 @@ const GRAY = "#555555";
export const professionalStyles = StyleSheet.create({
page: {
fontFamily: "Helvetica",
- fontSize: 10,
+ fontSize: 11,
paddingTop: 36,
paddingBottom: 40,
paddingHorizontal: 44,
@@ -29,21 +29,21 @@ export const professionalStyles = StyleSheet.create({
alignItems: "flex-end",
},
name: {
- fontFamily: "Times-Bold",
+ fontFamily: "Helvetica-Bold",
fontSize: 24,
color: NEAR_BLACK,
marginBottom: 16,
},
headline: {
fontFamily: "Helvetica",
- fontSize: 10,
+ fontSize: 12,
color: ACCENT,
textTransform: "uppercase",
letterSpacing: 1.2,
},
contactLine: {
- fontFamily: "Courier",
- fontSize: 9,
+ fontFamily: "Helvetica",
+ fontSize: 10,
color: NEAR_BLACK,
marginBottom: 1,
},
@@ -61,7 +61,7 @@ export const professionalStyles = StyleSheet.create({
},
sectionHeadingLabel: {
fontFamily: "Helvetica-Bold",
- fontSize: 9,
+ fontSize: 11,
color: ACCENT,
textTransform: "uppercase",
letterSpacing: 1.4,
@@ -74,7 +74,7 @@ export const professionalStyles = StyleSheet.create({
},
// Body
bodyText: {
- fontSize: 10,
+ fontSize: 11,
marginBottom: 2,
},
bold: { fontFamily: "Helvetica-Bold" },
@@ -82,7 +82,7 @@ export const professionalStyles = StyleSheet.create({
boldItalic: { fontFamily: "Helvetica-BoldOblique" },
h2text: {
fontFamily: "Helvetica-Bold",
- fontSize: 12,
+ fontSize: 13,
marginBottom: 3,
marginTop: 4,
},
@@ -94,24 +94,24 @@ export const professionalStyles = StyleSheet.create({
},
entryTitle: {
fontFamily: "Helvetica-Bold",
- fontSize: 10,
+ fontSize: 11,
color: NEAR_BLACK,
flex: 1,
},
// Use when entryTitle is NOT inside entryHeaderRow (no row sibling to flex against)
entryTitleBlock: {
fontFamily: "Helvetica-Bold",
- fontSize: 10,
+ fontSize: 11,
color: NEAR_BLACK,
},
entryDate: {
fontFamily: "Helvetica",
- fontSize: 9,
+ fontSize: 10,
color: GRAY,
marginLeft: 8,
},
entryMeta: {
- fontSize: 9,
+ fontSize: 10,
color: GRAY,
marginBottom: 3,
},
@@ -122,12 +122,12 @@ export const professionalStyles = StyleSheet.create({
},
bullet: {
width: 12,
- fontSize: 10,
+ fontSize: 11,
color: ACCENT,
},
listText: {
flex: 1,
- fontSize: 10,
+ fontSize: 11,
},
// Two-column section
twoColRow: {
diff --git a/src/lib/ai/tools/preprocessing.ts b/src/lib/ai/tools/preprocessing.ts
index fa58786..566f989 100644
--- a/src/lib/ai/tools/preprocessing.ts
+++ b/src/lib/ai/tools/preprocessing.ts
@@ -104,6 +104,8 @@ export const convertResumeToText = (resume: Resume): Promise<string> => {
contactInfo.email ? `Email: ${contactInfo.email}` : "",
contactInfo.phone ? `Phone: ${contactInfo.phone}` : "",
contactInfo.address ? `Address: ${contactInfo.address}` : "",
+ contactInfo.url1 ? `Link: ${contactInfo.url1}` : "",
+ contactInfo.url2 ? `Link: ${contactInfo.url2}` : "",
].filter(Boolean);
return parts.join("\n");
};
diff --git a/src/models/addContactInfoForm.schema.ts b/src/models/addContactInfoForm.schema.ts
index b1dab81..3bbeb62 100644
--- a/src/models/addContactInfoForm.schema.ts
+++ b/src/models/addContactInfoForm.schema.ts
@@ -35,4 +35,14 @@ export const AddContactInfoFormSchema = z.object({
error: "Phone is required!",
}),
address: z.string().optional(),
+ url1: z
+ .string()
+ .optional()
+ .refine((v) => !v || /^https?:\/\//i.test(v), "URL must start with http:// or https://"),
+ url1Label: z.string().optional(),
+ url2: z
+ .string()
+ .optional()
+ .refine((v) => !v || /^https?:\/\//i.test(v), "URL must start with http:// or https://"),
+ url2Label: z.string().optional(),
});
diff --git a/src/models/profile.model.ts b/src/models/profile.model.ts
index a6e1040..9f43b59 100644
--- a/src/models/profile.model.ts
+++ b/src/models/profile.model.ts
@@ -35,6 +35,10 @@ export interface ContactInfo {
email?: string;
phone?: string;
address?: string;
+ url1?: string;
+ url1Label?: string;
+ url2?: string;
+ url2Label?: string;
}
export enum SectionType {