01 — Dev projects / Page 001
KRZResume Builder
Create your profile once, then tailor a resume and cover letter to every job. These are the app's real screens, captured with a demo profile. Scroll inside any screen to see the whole page.











import { labelOf, LABEL_VALUE, type MatchLabel } from "./scoring";
import type { JobAnalysis, Requirement } from "./workflows/job-analyzer";
/**
* The overall conclusion about how well a candidate fits a job,
* worked out requirement by requirement.
* A missing mandatory requirement can never be hidden behind
* many preferred ones.
*/
export const FIT_LEVELS = ["Excellent fit", "Strong fit", "Good fit",
"Partial fit", "Weak fit", "Insufficient evidence"] as const;
export type FitLevel = (typeof FIT_LEVELS)[number];
export const STRENGTHS = ["Strong", "Good", "Partial", "Weak"] as const;
export type Strength = (typeof STRENGTHS)[number];
export interface FitReport {
overall: FitLevel;
/** One or two sentences saying why, from the same evidence. */
reason: string;
mandatory: Strength | null;
preferred: Strength | null;
professional: Strength | null;
industry: Strength | null;
technical: Strength | null;
evidence: Strength | null;
mandatoryGaps: string[];
}const strength = (v: number): Strength =>
v >= 0.8 ? "Strong" : v >= 0.6 ? "Good" : v >= 0.35 ? "Partial" : "Weak";
type Row = { req: Requirement; label: MatchLabel; a: RequirementAssessment };
function avg(rows: Row[]): number | null {
return rows.length
? rows.reduce((s, r) => s + LABEL_VALUE[r.label], 0) / rows.length
: null;
}
const band = (rows: Row[]): Strength | null => {
const v = avg(rows);
return v === null ? null : strength(v);
};
export function computeFit(analysis: JobAnalysis,
assessments: RequirementAssessment[]): FitReport {
const byId = new Map(assessments.map((a) => [a.requirementId, a]));
const rows: Row[] = analysis.requirements.flatMap((req) => {
const a = byId.get(req.id);
return a ? [{ req, label: labelOf(a), a }] : [];
});// AI never invents candidate facts.
// Facts are copied from the profile in code; AI only rewords.
// Every AI output cites evidence ids and passes the fabrication guard.
export async function runWorkflow(name, input, user) {
await ensureCredits(user, priceOf(name));
const reservation = await credits.reserve(user.id, priceOf(name));
try {
const output = await model(routing[name]).run(input);
validate(output);
guardAgainstFabrication(output, input.profile);
await credits.settle(reservation);
return output;
} catch (err) {
await credits.refund(reservation);
throw err;
}
}export const RULES = {
signInIp: { name: "signin-ip", limit: 20, windowMs: 15 * 60_000 },
signUpIp: { name: "signup-ip", limit: 5, windowMs: 60 * 60_000 },
aiUser: { name: "ai-user", limit: 40, windowMs: 10 * 60_000 },
} as const;
/** Addresses, emails and ids are hashed. */
export const subjectOf = (value: string) =>
createHash("sha256").update(value.trim().toLowerCase())
.digest("hex").slice(0, 24);<PublicHeader aurora />
<main className="aurora">
<h1>Create your profile <em>once.</em> Tailor your application
for <em>every job.</em></h1>
<p>Paste any job description. KRZResumeBuilder shows how well
you match, then writes a resume and cover letter for that job
using only what's true about you.</p>
<Button href="/sign-up" icon={ArrowRight}>Get started free</Button>
</main>export function computeExperience(profile: Profile) {
// Overlapping roles are counted once.
// Start and end months are both counted.
const months = mergeRanges(profile.experiences.map(toRange));
return round1(months / 12);
}const store = getStore(); // memory or MongoDB, picked by env
const user = await requireUser();
const job = await store.getJob(user.id, params.jobId);
if (!job) notFound();
return <JobMatchReport job={job} fit={computeFit(job.analysis, job.assessments)} />;01 — Dev projects / Page 001
Create your profile once, then tailor a resume and cover letter to every job. These are the app's real screens, captured with a demo profile. Scroll inside any screen to see the whole page.





















