Status: Employee-focused architecture port from the archived technical source, with its inferred algorithms and verification list preserved as limits. No current code execution, security testing, migration or production verification was performed.

Architecture and code map

Employee intake is mainly C# service orchestration over EF Core repositories, spanning Membership identity and tenant employment data. It is not the tenant-signup/KYC/provisioning pipeline. The original document contains both; company registration algorithms remain with platform administration.

Component Employee-onboarding responsibility
Admin/EmployeesController → Admin/AdminEmployeeService → PersonService Add, multiple create/import, invitation/resend, admin self-onboarding save/cancel, review/confirm, rehire and profile operations.
Employee_OnboardingService View_Index, View_Setup, View_Done; resolves identity/Person, welcome content and setup collections.
AccountService, IdentityService, JwtService Set/reset password, authentication and invitation/access tokens. Exact token contracts require verification.
Admin/Welcome_MessagesService Draft/save, Finish/Ready, default and deletion of welcome content.
Roles / Membership services Granted access, admin/profile distinction and revocation; default-role assignment is incompletely specified.
Documents / Tasks / Assets / Requests / Payroll Own their definitions, employee instances, approvals and employment/pay effects; onboarding consumes them rather than duplicating those engines.

Persistence and identity boundary

Membership holds ApplicationUser, roles/permissions, Organisation and shared identity/log data. TenantDb holds Company, Person and employment/profile collections. A database can contain multiple Companies; correct tenant connection alone is not enough—verify company scope on every relevant query/mutation. The archive questions whether global EF filters enforce it; do not certify universal filtering.

Person email matches ApplicationUser UserName by convention, not a cross-database foreign key. Base creation checks company Person duplicates and Membership login uniqueness. This legacy rule is not a complete multi-profile/company access design. Email corrections must reconcile both records through an authorised path, not force-delete the Person. External admins have a login but no Person; Add_Admin creates an internal admin Person/login, not a normal employee with automatic admin authority.

Claims/context resolve user, organisation, company and Person through CustomContextAccessorService. Cross-database identity creation and tenant mutation do not have a fully established rollback/transaction contract in the source. Preserve successful records and diagnose partial state before retrying.

Core processing — linked to the flows

Creation/import (UF2). CreatePerson validates identity and employment references, then inserts New Person with invitation/onboarding false and configured probation flags. Employee-number generation and checklist seed timing remain marked for verification. MultiCreatePerson loops creation with an optional invite step; the source describes a transaction, but cross-database/email atomicity is not established. Spreadsheet parsing is synchronous/in-process; valid rows can be imported while invalid rows are reported through FileImportMonitor. Partial-duplicate/idempotency behaviour needs verification.

Invitation (UF3). InvitePerson checks/creates the Membership login, generates a set-password token, sends the email and records invitation markers. Reinvite generates a fresh token. Already-invited handling, old-link invalidation, TTL and one-time use are not proven. The source’s overview diagrams place login creation at differing steps; the detailed invite/Add_Admin algorithms create identity earlier. Treat Person and login creation as separate operations, not a guarantee they occur only when the password is set.

Employee collection (UF4). View_Index resolves user → Person by email and expects New state. It selects an eligible active Ready welcome override, otherwise default; missing override falls back, no eligible note means none. Multiple defaults have implementation-defined ordering. View_Setup composes profile, accounts, address, kin, description, documents, assigned assets, active tasks and settings. Save_Self_Onboarding writes supplied profile collections, sets IsOnboarded and recalculates completion. Exact collection-write atomicity and HR-notification delivery are unverified.

HR review and confirmation (UF5/UF6). Save_Review applies reviewed information, makes Person Active and clears IsNew. CancelSelfOnboarding disables employee collection, not the Person. Save_Confirm records confirmed/probation/date flags; automatic confirmation-payroll creation versus a later/manual operation is unresolved. Batch variants do not justify an invented all-or-nothing recovery contract.

Existing-Person changes (UF7). Redeployment composes EmployeeRequest reviews, EmployeeRedeployment, Person changes and EmployeePaygradeHistory. Effective-date scheduling versus immediate-on-approval pseudocode is unresolved. Rehire reuses the terminated Person and re-enables identity in the described algorithm; retention/reset of banks, loans, leave and password state must be checked. No generic cleanup/delete recipe is authorised.

Tasks, documents and completion

RFD-002 separates PredefinedTask template from EmployeePredefinedTask assignment; EmployeeTask is a routine instance in that Tasks model. The onboarding technical source additionally describes EmployeeTask/EmployeeTaskItem materialisation, leaving subtask seeding/status writes unverified. Do not invent a single resolved schema by merging the two descriptions.

Handhold claims creation-time seeding, hire-date offsets and cohort targeting. Technical source marks seed timing unknown and describes only active/company/IsForOnboarding filtering, with no department whitelist. Keep this as a contract discrepancy. Template retirement/edits do not rewrite existing applied instances. Documents and Assets own signing/acknowledgement; neither checklist existence nor percentage proves their completion.

ProfileSetupParameter defines weighted completion. The archive’s sample weights and predicates are inferred; no canonical seed or “100% activates Person” rule was verified. Person and company SetupPercentage are different fields.

Workers, audit and safe diagnosis

The source lists DailyTaskService (archived 02:01 Lagos routine), CelebrationCardService, warehouse DataSynchronizationService and HRIS employee/status synchronisation. Fusion-specific employee sync is described as disabled. Current deployment/cadence and whether enrolment reminders actually send remain unverified; provider-side EWA/payment jobs are not employee-onboarding completion signals.