A comprehensive HR management system built for iScore, featuring AI-powered chatbot assistance, employee surveys, analytics dashboard, and multi-language support for Egyptian Labour Law compliance.
- RAG (Retrieval-Augmented Generation) system for Egypt Labour Law questions
- Multi-language support (Arabic & English)
- Real-time conversation with confidence scoring
- Source citation and reference links
- Feedback system for continuous improvement
- Dynamic survey creation with multiple question types
- Real-time analytics dashboard with engagement metrics
- Department-wise insights and trend analysis
- Anonymous and identified response options
- Email notifications and reminders
- Role-based access control (HR & Employee)
- Department management and organizational structure
- User profiles with avatar and contact information
- Activity tracking and audit logs
- Email notifications via SendGrid integration
- Survey invitations and reminders
- Response alerts for HR managers
- Welcome emails for new users
- JWT-based authentication
- Environment-based configuration
- Audit logging for all activities
- Data privacy and GDPR compliance
- Material-UI for modern, responsive design
- Redux Toolkit for state management
- Real-time chat interface with AI chatbot
- Analytics dashboard with interactive charts
- Multi-language support with RTL layout
- RESTful API with comprehensive endpoints
- Prisma ORM for database management
- JWT authentication middleware
- Email service with retry mechanisms
- Comprehensive error handling
- RAG pipeline with FAISS vector search
- OpenAI GPT-4 for answer generation
- Web scraping for Egypt Labour Law content
- Multi-language translation support
- Confidence scoring and source attribution
- Comprehensive schema for all entities
- User management with roles and departments
- Survey system with questions and responses
- Analytics data storage and retrieval
- Audit logging and system configuration
- React 18 with TypeScript
- Material-UI (MUI) for components
- Redux Toolkit for state management
- Recharts for data visualization
- Axios for API communication
- Node.js with Express
- TypeScript for type safety
- Prisma ORM with PostgreSQL
- JWT for authentication
- SendGrid for email services
- Python 3.9+ with Flask
- OpenAI API for language models
- FAISS for vector similarity search
- BeautifulSoup for web scraping
- Google Translate for language support
- Docker for containerization
- PostgreSQL for data persistence
- Redis for caching (optional)
- MailHog for email testing
- Node.js 18+ and npm
- Python 3.9+
- PostgreSQL 15+
- Docker and Docker Compose (optional)
- OpenAI API Key
- SendGrid API Key (optional)
git clone https://github.com/your-username/hrhelpdesk.git
cd hrhelpdeskCreate environment files for each service:
# Database
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/hrhelpdesk"
# JWT
JWT_SECRET="your-super-secret-jwt-key"
JWT_EXPIRES_IN="24h"
# SendGrid (Optional)
SENDGRID_API_KEY="your-sendgrid-api-key"
SENDGRID_FROM_EMAIL="your-email@example.com"
SENDGRID_FROM_NAME="iScore HR HelpDesk"
# Server
PORT=3001
NODE_ENV="development"
FRONTEND_URL="http://localhost:3000"# OpenAI
OPENAI_API_KEY="your-openai-api-key"
# Database
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/hrhelpdesk"# Using Docker (Recommended)
npm run docker:up
# Or manually install PostgreSQL and create database
createdb hrhelpdesk# Install root dependencies
npm install
# Install backend dependencies
cd hrhelpdesk/backend && npm install
# Install frontend dependencies
cd hrhelpdesk/frontend && npm install
# Install AI chatbot dependencies
cd hrhelpdesk/FAQchatbot && pip install -r requirements.txtcd hrhelpdesk/backend
npx prisma migrate dev
npx prisma db seed# From root directory
npm run dev# Terminal 1: Backend
cd hrhelpdesk/backend
npm run dev
# Terminal 2: Frontend
cd hrhelpdesk/frontend
npm run dev
# Terminal 3: AI Chatbot
cd hrhelpdesk/FAQchatbot
python chatbot_service.py- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- AI Chatbot: http://localhost:5000
- Database: localhost:5432
Watch the Demo Video - Coming Soon
Clean and modern login interface with iScore branding
Streamlined employee creation interface with required fields and validation
AI-powered chatbot with Egypt Labour Law knowledge, confidence scoring, and source citations
Interactive survey interface with star ratings, multiple choice questions, and progress tracking
Real-time analytics dashboard showing engagement metrics, satisfaction rates, and detailed insights
The application uses PostgreSQL with Prisma ORM. Key configuration options:
// Database connection
DATABASE_URL="postgresql://username:password@host:port/database"
// Connection pool settings
DB_POOL_SIZE=10
DB_POOL_TIMEOUT=30000Configure SendGrid for email notifications:
// SendGrid settings
SENDGRID_API_KEY="your-api-key"
SENDGRID_FROM_EMAIL="noreply@yourcompany.com"
SENDGRID_FROM_NAME="Your Company HR"Configure OpenAI and RAG pipeline:
# OpenAI settings
OPENAI_API_KEY="your-openai-api-key"
OPENAI_MODEL="gpt-4o-mini"
# RAG settings
MAX_CHARS=350
TOP_K=6
MAX_CONTEXT_CHARS=8000cd hrhelpdesk/backend
npm testcd hrhelpdesk/frontend
npm testcd hrhelpdesk/FAQchatbot
python test_rag_simple.pycd hrhelpdesk
python test_chatbot_integration.pyPOST /api/auth/register- User registrationPOST /api/auth/login- User login
GET /api/surveys/templates- Get survey templatesPOST /api/surveys/create- Create new surveyGET /api/surveys/published- Get published surveysPOST /api/surveys/:id/responses- Submit survey responseGET /api/surveys/:id/results- Get survey results
POST /ask- Ask question to chatbotGET /common-questions- Get common questionsPOST /feedback- Submit feedback
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/departments- Get departments
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Set up production environment variables
- Configure reverse proxy (nginx)
- Set up SSL certificates
- Configure database backups
- Set up monitoring and logging
Built with β€οΈ by the iScore Team