A comprehensive, enterprise-grade Human Resource Management System built with ASP.NET Core, C#, and SQL Server. Designed for large organisations to streamline employee management, recruitment, payroll, and all day-to-day HR operations from a single platform.
- Overview
- Features
- Tech Stack
- System Architecture
- Installation
- Database Setup
- Configuration
- Usage Guide
- API Documentation
- Security
- Deployment
- Troubleshooting
- Contributing
- License
The HR Management System (HRMS) is a modern full-stack web application for managing the complete employee lifecycle. It covers everything from onboarding and payroll to recruitment pipelines and analytics β all secured behind a role-based access control layer.
- Complete employee profiles with personal and contact information
- Employment history, contract tracking, and status management (active / inactive / on leave)
- Department and position assignment
- Emergency contact information and skill / certification tracking
- Document upload and management per employee
- Salary calculation, processing, and history
- Monthly payroll run with bonus allocation
- Benefits management (health insurance, retirement, etc.)
- Tax calculations and department-level salary analysis
- Exportable salary reports
- Job offer creation and lifecycle management
- Multi-stage candidate pipeline with status tracking
- Interview scheduling, evaluation forms, and feedback recording
- Hiring analytics and trends by month and department
- Live counts: total employees, open job offers, monthly salary totals
- Charts: employees by department, status, gender, age range, contract type
- Salary evolution trends and recent promotions list
- Recruitment: candidates by stage, job offers by department, hiring trends
- Equipment status overview and bonuses by department
- Interview success rates and employee growth projections
- Document upload, categorisation, and versioning
- Access audit trails per document
- Full inventory tracking and assignment to employees
- Maintenance schedules and status monitoring
- Reports by equipment type and status
- Role-based access control (Admin, Manager, Employee)
- Department-level data filtering
- Audit logging across all sensitive operations
- Secure password policy enforcement
| Layer | Technology |
|---|---|
| Framework | ASP.NET Core 8.0+ |
| Language | C# 12.0+ |
| Database | SQL Server 2019+ |
| ORM | Entity Framework Core 8 |
| Frontend | HTML5, CSS3, Bootstrap 5, JavaScript |
| Authentication | Cookie-based Authentication |
| Authorization | Role-Based Access Control (RBAC) |
| Logging | Serilog |
| Charting | Chart.js, Plotly.js |
| Hosting | IIS Express (dev) / Azure App Service (prod) |
HR-Management-System/
β
βββ Controllers/ # MVC Controllers
β βββ HomeController # Dashboard & reports
β βββ EmployeesController # Employee CRUD
β βββ DepartmentsController # Department management
β βββ SalariesController # Payroll operations
β βββ RecruitmentController # Hiring process
β βββ InterviewController # Interview management
β βββ PromotionsController # Career progression
β βββ EquipmentController # Asset management
β βββ AccountController # Authentication
β βββ DocumentsController # File management
β
βββ Services/ # Business Logic
β βββ DashboardService
β βββ EmployeeService
β βββ DepartmentService
β βββ SalaryService
β βββ RecruitmentService
β βββ PromotionService
β βββ EquipmentService
β βββ AccountService
β βββ DocumentService
β
βββ Repositories/ # Data Access Layer
β βββ EmployeeRepository
β βββ DepartmentRepository
β βββ SalaryRepository
β βββ CandidateRepository
β βββ EquipmentRepository
β βββ DocumentRepository
β
βββ Models/ # EF Core Entities
β βββ Employee, Department, Position
β βββ Salary, Bonus, Benefit
β βββ Candidate, JobOffer, Interview
β βββ Equipment, EquipmentAssignment
β βββ Promotion, User, Document
β
βββ ViewModels/ # 30+ View Models
β βββ DashboardViewModel
β βββ EmployeeFormViewModel
β βββ SalaryReportViewModel
β βββ RecruitmentViewModel
β βββ ...
β
βββ Enums/
β βββ EmployeeStatus, ContractType
β βββ EquipmentStatus, CandidateStatus
β βββ JobOfferStatus, InterviewResult
β βββ UserRole
β
βββ Views/
β βββ Home/Index.cshtml # Main dashboard
β βββ Employees/ # List, Create, Edit, Details
β βββ Salaries/ # Salary management & reports
β βββ Recruitment/ # Job offers & candidates
β βββ Shared/ # Layout, NavBar, Footer
β βββ Account/ # Login, Register, ChangePassword
β
βββ Data/
βββ AppDbContext # EF Core context + migrations
- .NET 8.0 SDK or later
- SQL Server 2019 or later
- Visual Studio 2022 or VS Code
- Git
git clone https://github.com/adamsaidane/HR-Management-System.git
cd HR-Management-Systemdotnet restoreEdit appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=HRMS;Trusted_Connection=true;TrustServerCertificate=true;"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning"
}
}
}dotnet ef database updatedotnet runThe app will be available at https://localhost:5001
CREATE DATABASE HRMS;# Create a new migration
dotnet ef migrations add InitialCreate
# Apply all pending migrations
dotnet ef database update
# List migration history
dotnet ef migrations listIn Program.cs, seed the database on startup:
var scope = app.Services.CreateScope();
var context = scope.ServiceProvider.GetRequiredService<AppDbContext>();
DbInitializer.Initialize(context);| Table | Description |
|---|---|
Users |
System users and login credentials |
Employees |
Core employee records |
Departments |
Organisation structure |
Positions |
Job positions and grades |
Salaries |
Salary records and history |
Bonuses |
Bonus allocations |
Benefits |
Employee benefits |
Candidates |
Job applicants |
JobOffers |
Active job postings |
Interviews |
Interview records and results |
Equipment |
Company assets |
EquipmentAssignments |
Asset-to-employee allocation |
Promotions |
Career advancement records |
Documents |
HR documents and files |
{
"ConnectionStrings": {
"DefaultConnection": "Server=...;Database=HRMS;..."
},
"Authentication": {
"CookieName": "HRMS.Auth",
"ExpireTimeSpan": 480
},
"Email": {
"Host": "smtp.gmail.com",
"Port": 587,
"Username": "your-email@gmail.com",
"Password": "your-app-password"
},
"FileUpload": {
"MaxFileSize": 5242880,
"AllowedExtensions": [".pdf", ".docx", ".doc", ".xlsx"]
}
}builder.Services.AddDbContext<AppDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
builder.Services.AddScoped<IEmployeeService, EmployeeService>();
builder.Services.AddScoped<IDashboardService, DashboardService>();
builder.Services.AddScoped<ISalaryService, SalaryService>();
builder.Services.AddScoped<IRecruitmentService, RecruitmentService>();
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options =>
{
options.LoginPath = "/Account/Login";
options.AccessDeniedPath = "/Account/AccessDenied";
});
builder.Services.AddAuthorization();- Log in with admin credentials at
/Account/Login - View the main dashboard for live statistics and charts
- Manage employees under Employees β Add Employee
- Process payroll under Salaries
- Track open roles and candidates under Recruitment
- Navigate to Employees
- Click Add Employee
- Complete the employee form (personal info, department, position)
- Save β then assign salary and benefits under Salaries
- Go to Salaries
- Review and update individual salary records as needed
- Add bonuses and assign benefits
- Generate and export the payroll report
- Create a job offer under Recruitment β Job Offers
- Review incoming candidate applications
- Schedule interviews and record feedback
- Update candidate status through each stage
- On hire, convert the candidate record into a new employee
This is an MVC application. Below are the key controller actions available via HTTP.
// GET /Employees
public async Task<IActionResult> Index(string searchString, int? departmentId)
// GET /Employees/Details/{id}
public async Task<IActionResult> Details(int id)
// GET /Employees/Create [AdminRH only]
// POST /Employees/Create
public async Task<IActionResult> Create(EmployeeFormViewModel model)// GET /Salaries
public async Task<IActionResult> Index()
// GET /Salaries/EmployeeSalary/{employeeId}
public async Task<IActionResult> EmployeeSalary(int employeeId)
// POST /Salaries/UpdateSalary
public async Task<IActionResult> UpdateSalary(int employeeId, decimal newSalary)
// POST /Salaries/AddBonus
public async Task<IActionResult> AddBonus(Bonus bonus)// GET /Recruitment/JobOffers
public async Task<IActionResult> JobOffers()
// POST /Recruitment/CreateJobOffer
public async Task<IActionResult> CreateJobOffer(JobOfferFormViewModel model)
// GET /Recruitment/Candidates
public async Task<IActionResult> Candidates()
// POST /Interview/Create
public async Task<IActionResult> ScheduleInterview(Interview interview)- Cookie-based authentication with configurable session timeout
- Password hashing with bcrypt
- Automatic redirect to login on session expiry
- Three built-in roles:
AdminRH,Manager,Employee - Department-level data filtering enforced at the service layer
- Sensitive actions protected with
[Authorize(Roles = "AdminRH")]
builder.Services.AddIdentity<IdentityUser, IdentityRole>(options =>
{
options.Password.RequiredLength = 8;
options.Password.RequireNonAlphanumeric = true;
options.Password.RequireUppercase = true;
options.Password.RequireLowercase = true;
options.Lockout.MaxFailedAccessAttempts = 5;
});- HTTPS enforced on all connections
- CSRF token validation on all POST forms
- Input validation and sanitisation throughout
- Full audit logging for sensitive operations
# Publish a release build
dotnet publish -c Release -o ./publish
# Create an App Service plan
az appservice plan create \
--name hrms-plan \
--resource-group myResourceGroup \
--sku B1 --is-linux
# Deploy the zip
az webapp deployment source config-zip \
--resource-group myResourceGroup \
--name hrms-app \
--src publish.zipFROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=builder /app/publish .
EXPOSE 80
ENTRYPOINT ["dotnet", "HRMS.dll"]docker build -t hrms:latest .
docker run -p 80:80 hrms:latest# Remove the last migration
dotnet ef migrations remove
# Reset and re-apply the database
dotnet ef database drop --force
dotnet ef database update# Test SQL Server connectivity
sqlcmd -S localhost -U sa -P YourPassword# Clean and rebuild
dotnet clean
dotnet buildContributions are welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Commit your changes:
git commit -m "feat: describe your change" - Push to the branch:
git push origin feature/your-feature-name - Open a Pull Request against
master
Please include tests for any new functionality and follow the existing code style.