نظام تقييم الاحتياجات التدريبية - نظام متكامل لتقييم مهارات الموظفين وتحديد الفجوات التدريبية باستخدام الذكاء الاصطناعي.
- Create targeted questionnaires/tests per functional area
- Support multiple question types:
- Multiple Choice (MCQ)
- Open Text
- Likert Scale
- Self-Assessment Rating
- Map each question to specific skills/competencies
- Process responses through AI engine (OpenAI GPT-4)
- Derive skill levels per competency (Low / Medium / High)
- Detect performance and skill gaps
- Analyze open-text answers for themes and sentiments
- Generate analytical profiles per employee
- Identify strengths and skill gaps
- Personalized training recommendations
- Integration-ready for National Digital Content Repository API
- Upload CV (PDF, DOC, DOCX) to automatically extract skills
- Local text extraction from CV files (no external APIs)
- AI-powered parsing using OpenAI to extract structured data
- Intelligent skill extraction (short terms, 1-2 words max)
- Auto-populate skill profiles from CV
- Preview and edit extracted data before import
- Employee-level dashboard
- Department-level analytics
- Center-wide overview
- Participation rates and skill gap metrics
- System Administrator (HR): Manage users, permissions, and training domains
- Training & Development Officer (HR): Create tests, assign employees, monitor results
- Employee: Complete assessments and view personal development plans
- Backend: Node.js + Express
- Frontend: React + Vite + Tailwind CSS
- Database: PostgreSQL (Cloud SQL for production)
- AI: OpenAI GPT-4o-mini
- Deployment: Google Cloud Run (with app-factory pattern)
- Database Connection: Unix socket (Cloud Run) / Connection string (local)
- Node.js 18+
- PostgreSQL 14+
- OpenAI API Key (optional, for AI analysis)
- Clone the repository:
git clone <repository-url>
cd HR- Install dependencies:
npm run install:all- Configure environment variables:
# Backend (.env in backend folder)
DATABASE_URL=postgresql://user:password@localhost:5432/hrx_db
JWT_SECRET=your-secret-key
OPENAI_API_KEY=sk-your-openai-key
PORT=3001
FRONTEND_URL=http://localhost:5173- Set up the database:
# Create database
createdb hrx_db
# Run migrations
npm run db:migrate
# Seed sample data
npm run db:seed- Start the development servers:
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
After running the seed script:
| Role | Password | |
|---|---|---|
| Admin | [email protected] | password123 |
| Training Officer | [email protected] | password123 |
| Employee | [email protected] | password123 |
| Employee | [email protected] | password123 |
POST /api/auth/login- User loginGET /api/auth/me- Get current userPOST /api/auth/change-password- Change password
GET /api/users- List usersPOST /api/users- Create userPUT /api/users/:id- Update userDELETE /api/users/:id- Delete user
GET /api/domains- List domainsPOST /api/domains- Create domainPUT /api/domains/:id- Update domainDELETE /api/domains/:id- Delete domain
GET /api/tests- List testsPOST /api/tests- Create testGET /api/tests/:id- Get test with questionsPUT /api/tests/:id- Update testPOST /api/tests/:id/publish- Publish testDELETE /api/tests/:id- Delete test
GET /api/assignments- List assignmentsGET /api/assignments/my- Get my assignmentsPOST /api/assignments- Assign test to usersPOST /api/assignments/:id/start- Start test
POST /api/responses- Save responsePOST /api/responses/submit/:assignmentId- Submit test
POST /api/analysis/assignment/:assignmentId- Analyze responsesGET /api/analysis/:id- Get analysis result
POST /api/cv-import/upload- Upload CV and extract dataPOST /api/cv-import/confirm- Confirm and save CV importGET /api/cv-import/history- Get CV import history
GET /api/dashboard/center- Center-wide dashboardGET /api/dashboard/department/:id- Department dashboardGET /api/dashboard/employee- Employee dashboard
This application is configured to work with Google Cloud SQL (PostgreSQL) following the app-factory pattern for Cloud Run deployments.
📖 See CLOUD_SQL_SETUP.md for detailed Cloud SQL configuration instructions.
Quick setup:
- Set up Google Cloud project and enable required APIs
- Create Cloud SQL PostgreSQL instance:
gcloud sql instances create hrx-db \
--database-version=POSTGRES_15 \
--tier=db-f1-micro \
--region=me-central1- Configure secrets in Secret Manager:
echo -n "postgres" | gcloud secrets create hrx-db-user --data-file=-
echo -n "your-password" | gcloud secrets create hrx-db-pass --data-file=-
echo -n "hrx" | gcloud secrets create hrx-db-name --data-file=-
echo -n "your-jwt-secret" | gcloud secrets create hrx-jwt-secret --data-file=-
echo -n "your-openai-key" | gcloud secrets create hrx-openai-key --data-file=--
Update
cloudbuild.yamlwith your Cloud SQL instance connection name -
Deploy using Cloud Build:
gcloud builds submit --config cloudbuild.yaml# Build
docker build -t hrx-training .
# Run
docker run -p 8080:8080 \
-e DATABASE_URL=postgresql://... \
-e JWT_SECRET=... \
hrx-trainingHR/
├── backend/
│ ├── src/
│ │ ├── db/
│ │ │ ├── schema.sql
│ │ │ ├── migrate.js
│ │ │ ├── seed.js
│ │ │ └── index.js
│ │ ├── routes/
│ │ │ ├── auth.js
│ │ │ ├── users.js
│ │ │ ├── domains.js
│ │ │ ├── skills.js
│ │ │ ├── tests.js
│ │ │ ├── questions.js
│ │ │ ├── assignments.js
│ │ │ ├── responses.js
│ │ │ ├── analysis.js
│ │ │ ├── recommendations.js
│ │ │ ├── dashboard.js
│ │ │ └── notifications.js
│ │ ├── middleware/
│ │ │ └── auth.js
│ │ └── index.js
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ └── layout/
│ │ ├── pages/
│ │ ├── store/
│ │ ├── utils/
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── index.css
│ ├── index.html
│ └── package.json
├── Dockerfile
├── cloudbuild.yaml
└── package.json
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is proprietary software. All rights reserved.