Employee & Employer Matching Backend System that leverages smart filtering and AI-powered semantic search with embeddings to connect the right candidates with the perfect job opportunities. Built with modern technologies and enterprise-grade architecture.
- AI-Powered Matching: Advanced semantic search using OpenAI embeddings for intelligent candidate-job matching
- Smart Filtering: Multi-dimensional filtering by location, experience, salary, skills, availability, and more
- Vector Search: High-performance similarity search with ChromaDB for scalable matching algorithms
- Real-time Synchronization: Automatic sync of candidates and jobs to the vector database
- Intelligent Ranking: Relevance-based scoring and ranking of matches
- Enterprise Security: Rate limiting, request sanitization, and comprehensive security middleware
- Runtime: Node.js 18+
- Framework: Express.js
- Language: TypeScript (Full type safety)
- Database: PostgreSQL (Primary data store)
- ORM: Prisma (Type-safe database access)
- Vector Database: ChromaDB (Similarity search & embeddings storage)
- AI/ML Engine: OpenAI Embeddings API (text-embedding-ada-002)
- Search Algorithm: Cosine similarity with metadata filtering
- Schema Validation: Zod (Runtime type checking)
- Security: Helmet.js, CORS, Rate limiting, Request sanitization
- Encryption: Crypto-JS for sensitive data handling
- Development: Nodemon, ts-node
- Build System: TypeScript compiler
- Testing: Type checking and build validation
- CI/CD: GitHub Actions with automated PR generation
GET /api/candidates # List all candidates
POST /api/candidates # Create new candidate
GET /api/candidates/:id # Get candidate by ID
PUT /api/candidates/:id # Update candidate
DELETE /api/candidates/:id # Delete candidateGET /api/jobs # List all job positions
POST /api/jobs # Create new job position
GET /api/jobs/:id # Get job position by ID
PUT /api/jobs/:id # Update job position
DELETE /api/jobs/:id # Delete job positionGET /api/applications # List all applications (with filters)
POST /api/applications # Create application (admin use)
POST /api/applications/apply # Apply to job (candidate use)
GET /api/applications/:id # Get application by ID
PUT /api/applications/:id # Update application
PATCH /api/applications/:id/status # Update application status (HR)
PATCH /api/applications/:id/withdraw # Withdraw application (candidate)
DELETE /api/applications/:id # Delete application
# Specialized endpoints
GET /api/applications/candidate/:candidateId # Get candidate's applications
GET /api/applications/job/:jobId # Get job's applicationsGET /api/matching/health # Health check
GET /api/matching/candidates/:id/jobs # Find matching jobs for candidate
GET /api/matching/jobs/:id/candidates # Find matching candidates for job
POST /api/matching/sync/candidates/:id # Sync individual candidate
POST /api/matching/sync/jobs/:id # Sync individual job
POST /api/matching/sync # Bulk sync (all/candidates/jobs)For Job Matching:
limit: Number of results (default: 10)location: Filter by locationremote_ok: Remote work availability (true/false)experience_level: entry, mid, senior, leademployment_type: full_time, part_time, contract, internshipsalary_min,salary_max: Salary range filters
For Candidate Matching:
limit: Number of results (default: 10)location: Filter by locationavailability: immediate, within_week, within_month, not_availablemin_experience,max_experience: Experience rangemax_salary_expectation: Maximum salary expectation
candidate-matching/
βββ π .github/
β βββ workflows/
β βββ dev-to-main-pr.yml # CI/CD pipeline
βββ π prisma/
β βββ schema.prisma # Database schema
β βββ migrations/ # Database migrations
βββ π src/
β βββ index.ts # Application entry point
β βββ π config/
β β βββ matching.config.ts # Matching system configuration
β βββ π controllers/ # Request handlers
β β βββ candidate.controller.ts # Candidate CRUD operations
β β βββ job.controller.ts # Job position CRUD operations
β β βββ application.controller.ts # Application management
β β βββ matching.controller.ts # AI matching endpoints
β βββ π middlewares/ # Express middlewares
β β βββ validation.middleware.ts # Schema validation
β β βββ enhanced-validation.middleware.ts
β β βββ security.middleware.ts # Security & rate limiting
β βββ π routes/ # API route definitions
β β βββ candidate.routes.ts
β β βββ job.routes.ts
β β βββ application.routes.ts
β β βββ matching.routes.ts
β βββ π schemas/ # Zod validation schemas
β β βββ candidate.schema.ts
β β βββ job.schema.ts
β β βββ application.schema.ts
β β βββ common.schema.ts
β βββ π services/
β β βββ matching/
β β βββ vector-matching.service.ts # AI matching logic
β βββ π utils/ # Utility functions
β β βββ validation.utils.ts
β β βββ encryption.utils.ts
β β βββ sanitization.utils.ts
β β βββ rate-limit.utils.ts
β βββ π generated/ # Prisma generated files
β βββ prisma/
βββ package.json # Dependencies & scripts
βββ tsconfig.json # TypeScript configuration
βββ LICENSE # Apache 2.0 License
βββ README.md
Our automated GitHub Actions pipeline provides:
- TypeScript compilation validation
- Build process verification
- Automated code quality checks
- Comprehensive error reporting
- AI-powered pull request generation using OpenAI GPT-4o-mini
- Automatic reviewer assignment
- Intelligent labeling system
- Detailed change analysis and reporting
- Runs on every push to
devbranch - Manual workflow dispatch available
- Automatic PR creation from dev β main
- All checks must pass before PR creation
- TypeScript strict mode validation
- Successful build requirement
- Automated deployment readiness verification
- Node.js 18+
- PostgreSQL 12+
- Git
- Clone the Repository
git clone https://github.com/firatyll/candidate-matching.git
cd candidate-matching- Install Dependencies
npm install- Environment Setup
cp .env.example .env
# Edit .env with your configuration (see Environment Variables section)- Database Setup
# Create PostgreSQL database
createdb candidate_matching
# Run Prisma migrations
npx prisma migrate dev --name init
# Generate Prisma client
npx prisma generate- ChromaDB Setup (Choose one method)
Option A - Docker (Recommended):
docker pull chromadb/chroma
docker run -p 8000:8000 chromadb/chromaOption B - Local Installation:
pip install chromadb
chroma run --host localhost --port 8000- Start Development Server
npm run devThe API will be available at http://localhost:3000
Create a .env file with the following configuration:
# Database Configuration
DATABASE_URL="postgresql://username:password@localhost:5432/candidate_matching?schema=public"
# Server Configuration
PORT=3000
NODE_ENV=development
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
# AI & Vector Search (Required for matching features)
OPENAI_API_KEY=your_openai_api_key_here
CHROMA_HOST=localhost
CHROMA_PORT=8000
CHROMA_URL=http://localhost:8000
# Security (Optional - defaults provided)
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100| Variable | Description | Required | Default |
|---|---|---|---|
DATABASE_URL |
PostgreSQL connection string | β Yes | - |
PORT |
Server port number | β No | 3000 |
NODE_ENV |
Environment mode | β No | development |
OPENAI_API_KEY |
OpenAI API key for embeddings | β Yes* | - |
CHROMA_URL |
ChromaDB server URL | β Yes* | http://localhost:8000 |
ALLOWED_ORIGINS |
CORS allowed origins | β No | localhost:3000 |
*Required for AI matching features
Our system uses three core models with proper relationships:
- id (UUID, Primary Key)
- firstName, lastName (String, Required)
- email (String, Unique, Required)
- phone (String, Optional)
- skills (String[], Required, min 1)
- experience (Integer, Required, β₯0)
- location (String, Required)
- availability (Enum: immediate|within_week|within_month|not_available)
- salary_expectation (Integer, Optional)
- resume_url (String, Optional, Valid URL)
- created_at, updated_at (Timestamps)- id (UUID, Primary Key)
- title, company (String, Required)
- description (String, Required, min 10 chars)
- required_skills, preferred_skills (String[])
- experience_level (Enum: entry|mid|senior|lead)
- location (String, Required)
- remote_ok (Boolean, Default: false)
- salary_min, salary_max (Integer, Optional)
- employment_type (Enum: full_time|part_time|contract|internship)
- status (Enum: active|inactive|filled, Default: active)
- created_at, updated_at (Timestamps)- id (UUID, Primary Key)
- candidate_id, job_position_id (UUID, Foreign Keys)
- status (Enum: pending|reviewed|interviewed|offered|accepted|rejected|withdrawn)
- cover_letter (String, Optional)
- applied_at, updated_at (Timestamps)
- Unique constraint: (candidate_id, job_position_id)| Script | Description | Usage |
|---|---|---|
npm run dev |
Start development server with hot reload | Development |
npm run build |
Build TypeScript to JavaScript | Production prep |
npm start |
Start production server | Production |
npm run build:watch |
Watch mode TypeScript compilation | Development |
npm run type-check |
Run TypeScript type checking only | Validation |
npm run clean |
Remove build directory | Cleanup |
npm run validate |
Run all checks (lint + build) | CI/CD |
We welcome contributions to improve the Employee & Employer Matching Platform!
- Fork the Repository
git clone https://github.com/your-username/candidate-matching.git
cd candidate-matching- Create Feature Branch
git checkout -b feature/your-feature-name- Development Setup
npm install
cp .env.example .env
# Configure your .env file
npx prisma migrate dev
npm run dev- Code Quality Standards
- Use TypeScript for all code
- Follow existing naming conventions (camelCase variables, PascalCase types)
- Add proper error handling for async operations
- Write meaningful commit messages
- Update documentation for new features
- Testing Your Changes
npm run type-check # Verify TypeScript compilation
npm run build # Test build process
npm run validate # Run all quality checks- Submit Changes
git add .
git commit -m "feat: add your feature description"
git push origin feature/your-feature-nameThen create a Pull Request targeting the dev branch.
- Modify
prisma/schema.prisma - Create migration:
npx prisma migrate dev --name description - Regenerate client:
npx prisma generate
- Create/update schemas in
src/schemas/ - Add controller functions in
src/controllers/ - Define routes in
src/routes/ - Import routes in
src/index.ts
- All PRs require review before merging
- Automated CI/CD checks must pass
- AI-generated PR descriptions help reviewers
- Manual testing of new features encouraged
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Copyright 2025 Candidate Matching Platform
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
π Built with modern technologies for scalable employee-employer matching