OVERVIEW
During my training in the Human Resources Development Department at the National Oil Corporation, employee transfer, secondment, and assignment requests moved on paper and through scattered spreadsheets. Nobody could answer a simple question quickly: where is this request right now, and who is it waiting on? I designed and built a workflow management system that puts every request, approval step, and supporting document in one place.
THE PROBLEM
- No single source of truth. Request data lived across separate files, so the same employee could appear differently in two places.
- Invisible approval status. Tracking a request meant phoning the next department in the chain.
- Documents detached from requests. Supporting paperwork was archived separately from the decision it justified.
- Reporting built by hand. Every summary for management was reassembled manually from raw sheets.
REQUEST LIFECYCLE
01SubmissionA transfer, secondment, or assignment request is created against an employee record, with the originating and receiving departments captured up front.
02Document attachmentSupporting documents are attached to the request itself, so the paperwork and the decision never drift apart.
03Approval chainThe request moves through its defined approval steps. Each decision is recorded with who, what, and when.
04Status trackingEvery request carries a live status, so anyone with access can see the current stage without making a single phone call.
05ReportingCompleted and in-flight requests feed the dashboards used for reporting and decision-making.
WHAT I BUILT
Workflow Engine
Request states and approval routing modelled explicitly, so a request can only move along paths the process actually allows.
Document Management
Supporting files attached directly to each request, keeping the full justification retrievable with the record.
Data Quality Work
Cleaning, validation, and analysis of the existing records to improve data quality, consistency, and reliability.
Reporting Dashboards
Reworked data presentation, organization, and usability so management could read the state of HR operations at a glance.
ARCHITECTURE
A React web client talks to an ASP.NET Core API over REST/JSON with JWT authentication. The server follows Clean Architecture: dependencies point inward, so business rules never depend directly on the database, HTTP, or email.
APIEntry pointControllers, authentication, CORS, and one middleware that turns every exception into a uniform API response.
APPUse casesServices, DTOs, and FluentValidation validators. Controllers call services through interfaces and never touch EF Core.
DOMDomainEntities and business rules, free of any technical detail.
PERPersistenceEF Core with SQL Server, repositories, a unit of work, migrations, and seed data.
INFInfrastructureReplaceable outside concerns: JWT issuing, the current user, file storage, and email.
A WORKFLOW THE SERVER ENFORCES
Each stage of a request is recorded as Waiting, Current, Completed, or Rejected. The rules live on the server, so they hold even if someone sends a request outside the UI:
- A request can only move from its current stage to the very next one — no skipping, no going back.
- Only decision stages can reject, and a request can only be closed at its final stage.
- Archived or rejected requests cannot be changed again.
- Every stage stores when it started and finished, so the UI shows how long each stage took and the request’s total age.
TECHNOLOGY
Server
ASP.NET Core 10, C#, EF Core 10 with migrations, FluentValidation, Mapster.
Client
React 19, TypeScript, Vite, React Router — a fully Arabic, right-to-left, responsive interface.
Security
JWT bearer tokens, BCrypt password hashing, and server-side validation of every input.
Files & email
Attachments up to 10 MB from an allow-list of document and image types, stored outside the database; MailKit for notifications.
RELIABILITY DETAILS
Audit trail
Every action on a request or attachment is logged with the user, time, and IP address.
Email never blocks work
Notifications are best effort: if sending fails after a save, the request stays updated and the error is logged.
History is protected
Key relationships use no-cascade deletes, so removing a record can never silently erase history.
Time in UTC
All timestamps are created in UTC and converted to local time only for display.
WHAT I TOOK AWAY
The technical part was the smaller half. The harder work was mapping how transfers and secondments actually move between departments in a large organisation, then representing that faithfully in software — including the exceptions people had been handling informally. It was also my first time building something that had to fit an existing administrative culture rather than replace it.
Note: This system was built for internal use at the National Oil Corporation. The source code and data are confidential, so no repository or live demo is available — this page describes the design and the problem it solved.