This document provides guidelines, environment setup instructions, and testing workflows for engineers contributing to the Resume Builder project.
- Node.js:
v18.0.0or higher (tested with Nodev20.xandv24.x). - Package Manager:
npm(comes bundled with Node.js). - Optional for AI Features: A Google Gemini API Key from Google AI Studio.
-
Clone the Repository:
git clone https://github.com/naphiertech/resumebuilder.git cd resumebuilder -
Install Dependencies:
npm install
-
Configure Environment Variables: Copy
.env.exampleto.env:cp .env.example .env
Configure the variables in
.env:# Server-side Google Gemini API Key for Job Match GEMINI_API_KEY=your_actual_gemini_api_key_here # Gemini Model (Default: gemini-3.5-flash) GEMINI_MODEL=gemini-3.5-flash # Production Canonical Site URL (Used for SEO and Open Graph) VITE_SITE_URL=https://naphix-resume.netlify.app
-
Start Development Server:
npm run dev
The application will be accessible at
http://localhost:5173/.
| Command | Description |
|---|---|
npm run dev |
Starts the Vite development server with the /api/job-match server middleware. |
npm run build |
Runs TypeScript compilation (tsc) and compiles the production bundle into dist/. |
npm run preview |
Starts a local server to preview the built dist/ production assets. |
The repository contains specialized automated test suites in the scripts/ directory executed via npx tsx:
Validates metadata, Open Graph, Twitter cards, Schema.org JSON-LD, robots.txt, and sitemap.xml:
npx tsx scripts/test_seo.tsValidates IP concurrency locks, sliding window limits, daily quotas, token bomb defense, cryptographic caching, and circuit breaker mechanics:
npx tsx scripts/test_job_match_security.tsValidates model configuration, input sanitization, error propagation, and real Gemini API response schemas:
npx tsx scripts/test_job_match.tsTests the 10-stage importer pipeline across 16 valid resume layouts, 12 negative non-resume controls (invoices, receipts, certificates), and 7 borderline layouts:
npx tsx scripts/test_universal_importer_comprehensive.tsnpx tsx scripts/test_seo.ts && npx tsx scripts/test_job_match_security.ts && npx tsx scripts/test_job_match.ts && npx tsx scripts/test_universal_importer_comprehensive.tssrc/
├── components/ # React UI components
│ ├── editor/ # Accordion forms & custom section manager
│ ├── export/ # PDF/Word download modal
│ ├── importer/ # Universal Resume Importer dialog & staged review
│ ├── jobMatch/ # Job Match modal & results visualization
│ ├── preview/ # Live A4 canvas & zoom toolbar
│ └── ui/ # Reusable UI primitives (Button, Modal, Input)
├── features/ # Domain-driven feature modules
│ ├── importer/ # 10-stage document extraction & parsing engine
│ ├── jobMatch/ # Client API & store for Gemini Job Match
│ └── resume/ # Core resume data models, Zustand store, utilities
├── landing/ # Marketing landing page components & section data
├── seo/ # Centralized SEO site config, JSON-LD, and usePageSeo hook
├── templates/ # Resume templates (Developer standard with PDF/DOCX builders)
├── App.tsx # Root component & route switcher
└── main.tsx # Application mount point
server/
├── config.ts # Security constants, rate limit policies, and model config
├── jobMatchApiHandler.ts # HTTP pipeline with security headers & request ID
├── jobMatchService.ts # Server-side Gemini client with injection defenses
└── security/ # Rate limiter, cache, circuit breaker, input validator
- Language: TypeScript with strict type checking enabled.
- Component Pattern: Functional components with TypeScript interfaces for props.
- Styling: Tailwind CSS classes; use
clsxortailwind-mergefor conditional class joining. - State Updates: Immutable Zustand mutations (
set((state) => ({ ... }))). - Icons: Lucide React.
- File Naming: PascalCase for React components (
JobMatchModal.tsx), camelCase for modules and utilities (resumeImporter.ts,rateLimiter.ts).