Audience: New engineers ramping into Assets. It's a small, self-contained module — a good first area.


Mental model

Two nouns, one join:

Everything else is CRUD, taxonomy, and read models. No money, no queues, no external providers.

The 20-minute code tour

  1. Asset.cs + EmployeeAsset.cs (Domain/Entities/Tenant/) — the two core entities. Note IsMultipleAssignable / MaxAssignment / AssignmentCount on Asset, and AssignmentDate / ReleaseDate / AutoReleaseDate on EmployeeAsset.
  2. AssetModel.cs — AssetStatuParams (Active/Inactive) and EmployeeAssetStatuParams (Assigned/Released). The two status axes.
  3. AssetService.CreateEmployeeAsset — how an allocation is built (and the interval-guard gotcha).
  4. AssetService.ReleaseEmployeeAsset(s) — how release works (and note nothing auto-fires it).
  5. AdminAssetsService — the admin orchestration + table read models (ExpandoObject rows).
  6. Frontend: dashboard/documents/assets/Assets.tsx (list) → AddAssignment.tsx (assign).

Where things live

You want to change… Go to
Item / allocation fields Asset.cs, EmployeeAsset.cs (+ migration)
Assign / release logic AssetService.cs, AdminAssetsService.cs
Statuses AssetModel.cs (AssetStatuParams, EmployeeAssetStatuParams)
Admin endpoints Admin/AssetsController.cs
Employee self-view Employee/AssetsController.cs, Employee/AssetsService.cs
Admin UI web-app/.../dashboard/documents/assets/*

Things that will trip you up

  1. Auto-release does nothing. AutoReleaseDate is stored but no worker acts on it. If you build a feature on it, you're building the worker too. (RFD-002)
  2. Two status axes. Item Active/Inactive ≠ allocation Assigned/Released. "Available" needs both (Active + free capacity).