Skip to content

canvasandcodes/AI-Powered-HR-Management-System

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏢 An AI‑Powered HR Management System

A next‑gen AI‑powered HR Management System backend, built using FastAPI, LangChain, FAISS, and Google Gemini. This system provides intelligent HR assistance, policy search, natural‑language SQL automation, and automated payslip generation.

It is modular, scalable, and fully compatible with modern frontends like React, Vite, and mobile apps.


FeaturesInstallationRunStructureDependencies


🚀 Features

🔹 AI HR Assistant

  • Understands natural‑language questions
  • Answers HR policy queries
  • Generates summaries and explanations
  • Provides instant HR support

🔹 Policy Search (RAG Engine)

  • FAISS‑based vector search
  • PDF parsing + embedding generation
  • Fully searchable policy knowledgebase

🔹 Employee SQL Agent

  • Converts natural language → SQL queries
  • Secure SELECT‑only mode (default)
  • Optional write mode using allow_write=True

🔹 Payslip Generator

  • Auto‑creates clean PDF payslips
  • Sends payslips via email
  • Generates employee salary summaries

🔹 Powered by FastAPI


🛠️ Installation Guide

Follow the steps below to set up the backend.


1. Install Python 3.11

Make sure Python 3.11+ is installed.


2. Create Virtual Environment

# Create venv
py -3.11 -m venv backend/.venv

# Allow script execution (Windows only)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

# Activate venv
./backend/.venv/Scripts/Activate.ps1

3. Install Dependencies

Upgrade pip:

pip install --upgrade pip

Install all packages:

pip install -r requirements.txt

4. Create a .env File

Create a .env file in your project root:

GEMINI_API_KEY=your_key
EMAIL_USER=your_email
EMAIL_PASSWORD=your_password
EMAIL_DISABLE_SEND=true
DATABASE_URL=sqlite:///./hr_employees.db

▶️ Running the Server

Launch the FastAPI server:

python -m uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000

Open API documentation: 👉 http://localhost:8000/docs


📦 Project Structure

backend/
│── main.py
│── config.py
│── agents/
│   ├── main_agent.py
│   ├── employee/
│   ├── policy/
│   └── sql/
│── database/
│── utils/
└── uploads/

📚 Dependencies (from requirements.txt)

fastapi
uvicorn
python-multipart
google-generativeai
langchain
sentence-transformers
faiss-cpu
pandas
numpy
reportlab
tqdm
python-dotenv
transformers
torch

(Your actual file contains pinned versions.)


🧩 Frontend Compatibility

This backend works seamlessly with:

  • React / Vite apps
  • Any REST API client
  • Azure, AWS, Render, Railway deployments

✨ Personalization

This backend is branded and customized as HR Platform — a modern, AI‑first HR automation ecosystem.


Built with ❤️ using FastAPI, Gemini, LangChain, and modern AI tools.

About

AI-powered HR Management System with smart workflows, NLP assistant, leave automation, and secure OTP login.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 73.7%
  • JavaScript 25.7%
  • Other 0.6%