Audience: Engineers. What this answers: where the code actually is, how offers work, and what core-backend-service does and doesn't own.

Source: OffersService.cs (301), Offer_LettersService.cs (202), OfferService.cs (117), HiringService.cs (44), the Offer entity, AtsConfigSetting, and web-app/src/pages/dashboard/people/hiring/* — plus a live network capture (2026-07-20) that established the service split.


1. The three-service split

Do not start by grepping this repo. The web-app calls three backends for this one module:

web-app
  ├── ewa-*.paidhr.com          /v1/ats/jobs, /v1/ats/jobs/stats,
  │   (EWA / "extended")        /v1/ats/applicants, /v1/ats/pipelines,
  │                             /v1/ats/job-templates          ← THE ATS
  │
  ├── middleware-*.paidhr.com   /admin/offers/select,
  │   (legacy)                  /admin/offer_letters/get,
  │                             /admin/company/getatsconfigsetting,
  │                             /admin/company/getdepartments,
  │                             /admin/people/getforselection
  │
  └── corebackend-*.paidhr.com  /admin/offers/view/new         ← THIS REPO
      ("new arch")

Env mapping (web-app/.env): REACT_APP_EWA_BASE_URL / REACT_APP_EXTENDED_BASE_URL → EWA; REACT_APP_BASE_URL → middleware; REACT_APP_NEW_ARCH_BASE_URL → core-backend.

Implications

See RFD-001.

2. The Offer entity (TenantDb, CompanyId-scoped)

Field Notes
OfferId, CompanyId Identity + tenant scope
PersonId Set when the offer becomes an employee
DocumentTemplateId → a DocumentTemplate of type OFFER (§3)
OfferStatusId → OfferStatus lookup
FirstName, MiddleInitial, LastName, Email The candidate (pre-Person)
Contents The rendered letter body
SentDate, ExpireDate, AcceptedDate The lifecycle timestamps
Signature Captured on accept
Note Free text

The candidate exists as loose name/email fields on the Offer until acceptance — there's no Person yet. That's the whole point of the entity.

3. Offer letters ride the Documents template engine

Offer.DocumentTemplateId → DocumentTemplate where the type is OFFER (DocumentModel.cs: OFFER = "Offer", IOFFER = 1).

Offer_LettersService (202 lines) drives the template side: View/Customize, View/Ready, CheckTemplate, Get, GetContent, Add, Finish, Save. Rendering, merge fields, and signature capture are Documents-module concerns — don't reimplement them here.

4. Offer lifecycle in code