Skip to content

Repository files navigation

Agentic AI Recruitment System

This implementation includes:

  • Backend (NestJS): Core API and business logic
  • AI Service (FastAPI): CV parsing and ranking using LangChain + Ollama
  • Frontend (Next.js 14): Modern UI with React, TypeScript, TailwindCSS, and ShadCN UI
  • Databases: PostgreSQL (main data), Weaviate (vector search)
  • Infrastructure: Docker Compose for local development

Quick Start

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • Docker & Docker Compose
  • Ollama (for local LLM)

Installation

  1. Install Ollama and pull the required models:
# Install Ollama from https://ollama.ai
ollama pull qwen2.5:7b
ollama pull nomic-embed-text
  1. Start infrastructure services:
docker-compose up -d
  1. Setup Backend (NestJS):
cd backend
npm install
npm run start:dev
  1. Setup AI Service (FastAPI):
cd ai-service
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8001
  1. Setup Frontend (Next.js):
cd frontend
npm install
npm run dev

Access Points

Features Implemented

1. CV Upload & Parsing

  • Supports PDF and DOCX formats
  • Extracts: personal info, skills, experience, education
  • Structured data mapping

2. AI-Powered Ranking

  • Semantic similarity matching with job requirements
  • Scoring based on:
    • Skills match (40%)
    • Experience relevance (30%)
    • Education fit (20%)
    • Additional factors (10%)

3. Vector Search

  • Weaviate integration for semantic CV search
  • Fast candidate retrieval based on job descriptions

4. UI

  • Drag & drop CV upload
  • Real-time parsing status
  • Candidate ranking dashboard
  • Detailed candidate profiles

Tech Stack

  • Backend: NestJS, TypeScript, TypeORM, PostgreSQL
  • AI Service: FastAPI, LangChain, Ollama, Weaviate
  • Frontend: Next.js 14, React, TypeScript, TailwindCSS, ShadCN UI
  • Databases: PostgreSQL, Redis, Weaviate
  • Infrastructure: Docker, Docker Compose

API Endpoints

Backend (NestJS)

  • POST /api/candidates/upload - Upload CV
  • GET /api/candidates - List all candidates
  • GET /api/candidates/:id - Get candidate details
  • POST /api/candidates/rank - Rank candidates for a job

AI Service (FastAPI)

  • POST /parse-cv - Parse CV file
  • POST /rank-candidates - Rank candidates against job description
  • POST /extract-skills - Extract skills from text

Environment Variables

Create .env files in each service directory:

Backend (.env)

DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres
DATABASE_NAME=recruitment_db
REDIS_HOST=localhost
REDIS_PORT=6379
AI_SERVICE_URL=http://localhost:8001
JWT_SECRET=your-secret-key

AI Service (.env)

OLLAMA_BASE_URL=http://localhost:11434
MODEL_NAME=qwen2.5:7b
EMBEDDING_MODEL=nomic-embed-text
WEAVIATE_URL=http://localhost:8080

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:3001

Database Schema

Candidates Table

- id: UUID (primary key)
- email: string (unique)
- full_name: string
- phone: string
- skills: json
- experience: json
- education: json
- cv_file_path: string
- parsed_data: json
- score: float
- created_at: timestamp
- updated_at: timestamp

Development

Run Tests

# Backend
cd backend && npm run test

# AI Service
cd ai-service && pytest

# Frontend
cd frontend && npm run test

Code Quality

# Backend
npm run lint
npm run format

# AI Service
black .
flake8

# Frontend
npm run lint
npm run format

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Copyright 2025 Agentic AI Recruitment System Contributors

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.

About

autonomous, multi-agent platform that orchestrates end-to-end hiring workflows with minimal human intervention.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages