π Live Demo: Check out the application at erp-y94u.onrender.com
A comprehensive Enterprise Resource Planning (ERP) solution focused on Human Resources management. Built with modern .NET technologies, this application provides a complete suite of HR modules including employee management, recruitment, payroll, equipment tracking, and compensation management.
Β Β Β Β
Β Β Β Β
Β Β Β Β
Β Β Β Β
Backend
- .NET 9.0 / ASP.NET Core MVC
- Entity Framework Core 9.0 (Code-First approach)
- SQLite for data persistence
Frontend
- Razor Views with Bootstrap 5
- jQuery for client-side interactions
- Bootstrap Icons
Infrastructure
- Docker containerization
- Render.com cloud deployment
| Layer | Technology | Responsibility |
|---|---|---|
| Presentation | Razor Views, Bootstrap 5, jQuery | User interface, form handling, client-side validation |
| Controller | ASP.NET Core MVC | Request routing, model binding, response generation |
| Business Logic | C# Services, Dependency Injection | Business rules, workflows, data validation |
| Data Access | Entity Framework Core 9.0 | ORM, migrations, query generation, change tracking |
| Database | SQLite | Data persistence, ACID transactions |
Complete employee lifecycle management from hiring to departure:
- Comprehensive Profiles - Personal information, contact details, professional data
- Contract Management - Multiple contract types (CDI, CDD, Stage, Freelance)
- Status Tracking - Active, On Leave, Terminated with effective dates
- Assignment History - Track equipment, compensation packages, and positions
- Department Organization - Organize employees by poles/departments
End-to-end recruitment workflow:
- Job Offers - Create and publish positions with detailed requirements
- Candidate Database - Centralized applicant information
- Application Pipeline - Track applications through stages (Submitted β Under Review β Interview β Decision)
- Interview Management - Schedule interviews, add notes, track feedback
- Status Workflow - Automated status updates and notifications
Comprehensive salary and compensation management:
- Salary Calculation - Position-based base salary with automated calculations
- Allowances (IndemnitΓ©s) - Housing, transport, meal allowances
- Bonuses (Primes) - Performance, project, seniority bonuses
- Advantages (Avantages) - Health insurance, gym memberships, training budgets
- Payslip Generation - Detailed salary breakdowns
Track and manage company assets:
- Inventory System - Computers, phones, furniture, vehicles, and more
- Assignment Tracking - Link equipment to employees with date ranges
- Status Management - Available, Assigned, Under Maintenance, Retired
- Equipment History - Full audit trail of assignments and returns
- Category Organization - Organize by equipment type
Flexible employee benefit structures:
- Package Templates - Pre-configured benefit bundles
- Custom Configurations - Employee-specific customizations
- Multiple Benefit Types - Combine bonuses, allowances, and advantages
- Historical Tracking - Maintain compensation history
Organizational structure and hierarchy:
- Job Positions - Define roles with base salaries
- Departmental Structure - Organize positions by department
- Hierarchy Tracking - Manager and reporting relationships
- .NET 9.0 SDK or later
- Git
- (Optional) Docker for containerized deployment
-
Clone the repository
git clone https://github.com/your-username/ERP.git cd ERP -
Restore NuGet packages
dotnet restore
-
Apply database migrations
dotnet ef database update
This creates the SQLite database with all required tables and seed data.
-
Run the application
dotnet run
-
Access the application
- HTTPS:
https://localhost:5001 - HTTP:
http://localhost:5000
- HTTPS:
For hot-reload during development:
dotnet watch runThe application uses Entity Framework Core Code-First approach with SQLite.
- Employe - Employee master data
- Contrat - Employment contracts
- Position - Job positions with salary ranges
- OffreEmploi - Job offers
- Candidat - Candidate information
- Candidature - Job applications
- Equipement - Company equipment inventory
- AssignationEquipement - Equipment assignments
- Paie - Payroll records
- Indemnite, Prime, Avantage - Compensation components
- CompensationPackage - Benefit packages
- One Employee β Many Contracts
- One Position β Many Employees
- One Employee β Many Equipment Assignments
- One Offer β Many Applications
- One Employee β One Compensation Package
Located in appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=erp.db"
}
}{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}# Create a new migration
dotnet ef migrations add MigrationName
# Apply all pending migrations
dotnet ef database update
# Rollback to a specific migration
dotnet ef database update PreviousMigrationName
# Remove last migration (if not applied)
dotnet ef migrations remove
# Generate SQL script
dotnet ef migrations script# Build in Debug mode
dotnet build
# Build in Release mode
dotnet build -c Release
# Publish for deployment
dotnet publish -c Release -o ./publish
# Run published application
cd publish
dotnet ERP.dll# Run all tests
dotnet test
# Run with coverage
dotnet test /p:CollectCoverage=true# Build Docker image
docker build -t erp-system .
# Run container
docker run -d -p 8080:8080 --name erp-app erp-system
# View logs
docker logs -f erp-app
# Stop container
docker stop erp-appversion: '3.8'
services:
erp:
build: .
ports:
- "8080:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- PORT=8080
volumes:
- erp-data:/app/data
volumes:
erp-data:Run with:
docker-compose up -dThe application is configured for deployment on Render.com:
- Dockerfile is optimized for cloud deployment
- Environment Variables are configured via Render dashboard
- SQLite database is stored in persistent volume
- Port binding uses
PORTenvironment variable
Live application: https://erp-y94u.onrender.com/
| Variable | Description | Default |
|---|---|---|
ASPNETCORE_ENVIRONMENT |
Runtime environment | Production |
PORT |
Application port | 8080 |
Services are registered in Program.cs:
builder.Services.AddScoped<IEmployeService, EmployeService>();
builder.Services.AddScoped<IRecrutementService, RecrutementService>();All data access goes through EF Core DbContext with service layer abstraction.
Separate view models for create/edit operations to avoid over-posting attacks:
public class CreateEmployeViewModel
{
[Required]
public string Nom { get; set; }
// ... other properties
}Server-side validation with Data Annotations:
[Required][StringLength][EmailAddress][DataType]- Custom validation attributes
- MVC Pattern - Clear separation of concerns
- Repository Pattern - Data access abstraction via services
- Dependency Injection - Loose coupling and testability
- ViewModel Pattern - Secure data binding
- β Entity Framework migrations for version control
- β Async/await for database operations
- β Model validation with Data Annotations
- β Service layer for business logic
- β CSRF protection enabled
- β SQL injection prevention via parameterized queries
- Anti-Forgery Tokens - CSRF protection on all forms
- Data Validation - Server-side validation on all inputs
- SQL Injection Prevention - EF Core parameterized queries
- XSS Protection - Razor automatic encoding
- HTTPS Enforcement - Redirect HTTP to HTTPS in production
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature - Open a Pull Request
- Follow C# naming conventions (PascalCase for public members)
- Use async/await for database operations
- Add XML documentation comments for public APIs
- Keep controllers thin - business logic belongs in services
This project is developed for educational and demonstration purposes.
- Built with β€οΈ using .NET 9.0
- UI powered by Bootstrap 5
- Icons from Bootstrap Icons
- Deployed on Render.com
Made with .NET 9.0
