Commit Graph

71 Commits

Author SHA1 Message Date
hamid baa3cc63cd manual improvement 1 2026-07-27 22:27:04 +03:30
hamid bd06ef0016 start of manual testing 2026-07-27 00:54:22 +03:30
hamid 12ce7fa7de ui phase 13 2026-07-20 01:35:15 +03:30
hamid d33568bf31 ui phase 12 2026-07-19 21:31:59 +03:30
hamid 87fa4cd497 ui phase 11 2026-07-19 19:19:44 +03:30
hamid b4b8c9ea79 ui phase 10 2026-07-19 17:13:32 +03:30
hamid b638e25a0e ui phase 9 2026-07-19 15:14:44 +03:30
hamid 1ef4feb911 ui phase 8 2026-07-19 13:57:11 +03:30
hamid edc38543fd ui phase 7 2026-07-19 11:56:59 +03:30
hamid a438edeeaa ui phase 6 2026-07-19 09:49:25 +03:30
hamid 4c70d8e424 ui phase 5 2026-07-18 09:51:03 +03:30
hamid 53b4e1b0a4 ui phase 3 2026-07-18 01:56:17 +03:30
hamid 222856d600 ui phase 2 2026-07-17 19:05:17 +03:30
hamid 370c1beefa ui phase 1 2026-07-17 17:10:39 +03:30
hamid f1cba6cf74 ui phase 0 2026-07-17 14:00:22 +03:30
hamid 9051bb3e18 some ui phase improvement planning 2026-07-17 13:22:04 +03:30
hamid 70fb0a9202 refinement phase 9 2026-07-13 22:52:57 +03:30
hamid ef3024ef2f refinement phase 8 2026-07-13 21:49:50 +03:30
hamid 7edadadea1 refinement phase 7 2026-07-13 17:48:50 +03:30
hamid 70268ecc06 refinement phase 6 2026-07-13 17:03:45 +03:30
hamid d4147342da refinement phase 5 2026-07-13 16:00:34 +03:30
hamid 64f6aa45c9 refinement phase 4 2026-07-13 12:29:00 +03:30
hamid 314763f764 refinement phase 3 2026-07-13 11:26:39 +03:30
hamid 1ce36f9414 refinement phase 2 2026-07-13 01:14:35 +03:30
hamid 0b45ec51f4 refinement phase 1 2026-07-13 00:49:24 +03:30
hamid 7acecda5c4 refinement phase 0 2026-07-12 01:09:11 +03:30
hamid 850cdf3414 add refinement phases 2026-07-10 20:59:47 +03:30
hamid a87b47bedb Add frontend phase 15 updates: complete MVP for admin backoffice and partner-center consoles, including new services and endpoints; document requests for backend enhancements. 2026-07-10 20:28:36 +03:30
hamid 70cf00ce4a frontend phase 15 2026-07-10 20:28:06 +03:30
hamid bc51cf59b4 frontend phase 14 2026-07-10 18:46:16 +03:30
hamid 85488bc25b frontend phase 13 2026-07-10 16:58:15 +03:30
hamid 6186f54294 frontend phase 12 2026-07-10 14:48:15 +03:30
hamid 67c028562e frontend phase 11 2026-07-10 13:55:42 +03:30
hamid ccfa27aff6 frontend phase 10 2026-07-10 12:51:53 +03:30
hamid 40cc1d163b frontend phase 9 2026-07-10 11:49:55 +03:30
hamid cd6c2591a6 backend phase 15 & frontend phase 8 2026-07-10 03:22:29 +03:30
hamid 93cc5ecb98 backend phase 14 & frontend phase 7 2026-07-09 15:30:03 +03:30
hamid de53f9d8a6 backend phase 13 & frontend phase 6 2026-07-09 04:09:35 +03:30
hamid dc64472631 frontend phase 5 & backend phase 12 2026-07-09 03:05:14 +03:30
hamid 465f75c29e backend phase 11 2026-07-09 02:13:30 +03:30
hamid 23605591eb ignore graphify 2026-07-09 01:04:44 +03:30
hamid aae056b4e5 backend phase 10 2026-07-06 21:17:00 +03:30
hamid 12c7e51c32 backend phase 9 2026-07-06 19:23:44 +03:30
hamid 2cfc082a04 backend phase 8 2026-07-06 02:48:56 +03:30
hamid 99ebf5d881 frontend phase 4: catalog browse (Home A5) & nurse service builder (B7)
Light up the two faces of the configurable service catalog over a new cached
services/catalog domain (consumes the b5 contract; unlocks f6 search).

- services/catalog: types/keys/constants/apis(client+mock+seam)/hooks/index +
  names.ts. Categories & option groups are session-cached reference data
  (Infinity staleTime, like geography); variant mutations invalidate
  myVariantsLists() and setQueryData the edited row. Mock-primary
  (USE_CATALOG_MOCK), one-line swap; mock reproduces the 400 missing-required
  and (nurse,category,option-set) 409 duplicate rules.
- Customer Home (A5): greeting+avatar, search bar (navigates toward f6),
  data-driven category grid (loading/empty/error), patient nudge from the
  cached f2 query. Deferred /search placeholder stub.
- Nurse Services & prices (B7) at /nurse/services: offerings list (active vs
  deactivated, edit, soft-deactivate w/ confirm, reactivate, no delete) and a
  3-step variant builder (category -> required/optional options -> price+unit+
  duration). Required-group gate; Toman->IRR digit-string at the field
  boundary (no float); live unit-aware estimated total (never from price
  alone); editable auto display_name; inline 409 duplicate warning; locked
  category edit form.
- Shared, tested components: CategoryTile, PriceDisplay, VariantCard. Money
  util: tomanToRial + multiplyIrr (integer-safe) + tests.
- i18n: catalog/services/search namespaces + home additions + nav.services
  (both locales, in sync). Icons, routes (SEARCH, NURSE_SERVICES), nurse nav.

Gate: npm run check green; npm run test:ci green (147 tests, +18 across 4
suites); npm run build green with NEXT_PUBLIC_API_URL set.

Docs: client/CLAUDE.md (Project Structure, caching note, namespaces), STATUS,
for-backend REQ-010 (pagination param casing), phase report, mocks registry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 17:33:44 +03:30
hamid 5839b3508f backend phase 7: search & matching (nurse_search_index)
Add the discovery layer: the denormalized nurse_search_index read model
(one row per bookable variant x covered service area), maintained inline
inside each source write's transaction, plus the single public search
query behind the INurseSearch seam.

- Entity + EF config + migration (search schema): covering search index,
  filtered-unique (variant_id, city_id, district_id) pair with NULL
  district participating, nurse_id index, soft-delete.
- ISearchIndexMaintainer (write seam) + SearchIndexMaintainer: reindex
  variant / nurse / fan-out / remove-area / full rebuild, staged in the
  owning source write's unit of work; wired into the b3/b4/b5/b6 handlers.
- INurseSearch (read seam) + SqlNurseSearch (real MVP backend): reads only
  is_searchable=1, category/city/district(NULL-aware)/gender/price filters,
  rating sort, pagination. Elasticsearch deferred (config Search:Backend).
- SearchNursesQuery (+ validator) and RebuildSearchIndexCommand; public
  SearchController (GET search/nurses) + admin AdminSearchController
  (POST admin_search/rebuild_index).
- Tests: 9 DB-backed maintainer/search + 4 WebApplicationFactory; updated
  affected b3/b4/b5/b6 handler tests. Build clean, 167 tests green.
- Docs: server CLAUDE.md project map, contract search.md, swagger refresh,
  handoff, report, mocks-registry rows, STATUS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 17:24:26 +03:30
hamid e2b22df2d6 include product files 2026-07-05 14:57:05 +03:30
hamid b8934f531d frontend phase 3: geography — addresses, map-pin picker & nurse coverage areas
Three domain services (mirroring the patients/nurse template): services/geography
(cached province→city→district lookups; Infinity staleTime + shared geographyKeys),
services/addresses (address book CRUD + set-primary; single-primary invariant), and
services/serviceAreas (coverage add/remove; areaExists dup-guard, districtId=null = whole city).

Four tested composites in src/components/geography: CascadingRegionSelect (drives the
cascade queries), AddressMapPicker (map-pin stand-in emitting real lat/lng), AddressForm,
AddressCard. Screens: customer address book (/addresses, reached from the profile hub) and
nurse coverage editor (/nurse/coverage, new sidebar tab, inline duplicate block + 409).

Adds geo/address/coverage i18n namespaces (both locales), location/delete/coverage icons,
ADDRESSES/NURSE_COVERAGE routes. Consumes the b4 geography-addresses contract; filed REQ-008
(accept the map pin on create/update) and REQ-009 (provinceId on CustomerAddressDto) for gaps.

Gate: npm run check + npm run test:ci (129, +17) + npm run build all green. A 5-dimension
adversarial review fixed 3 findings (map-marker RTL transform, page_size→pageSize pagination
casing, coverage districts-scope dead-end on district-less cities).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 14:50:41 +03:30
hamid 1c266523bc backend phase 6: nurse verification & credentials (mocked vendors)
The trust engine. New `verif` schema (5 tables) + a data-driven verification
pipeline: steps are rows (6 seeded step-types), not a code enum.

- nurse_verifications.status is the single source of verification truth;
  nurse_profiles.is_verified is flipped ONLY inside the finalize transaction
  (VerificationAggregator: tracked verification + tracked profile -> one commit)
  and reversed on suspension/expiry — no in-between state.
- is_automated snapshotted onto each step at submit; steps seeded from active
  required step-types; automated runs (identity-KYC, Shahkar, IBAN ownership)
  find their step by code.
- users.national_id populated only on identity-KYC pass; Shahkar + IBAN owner
  compare against it (money-mule guard); shared-SIM -> shared_sim support alert.
- Documents are metadata-only behind signed URLs; credential_number encrypted
  and never serialized; public trust badge exposes credential TYPES, not numbers;
  holder-name cross-checked against the verified identity before recording.
- Admin-triggered credential-expiry scan reverts lapsed steps, re-gates
  bookability, raises a verification_expired alert + verification_expiry_prompt
  notification (scheduled cron deferred; config key
  verification_expiry_scan_cadence_hours).

Three new mock vendor seams (IShahkarVerifier / IIdentityKycProvider /
ICredentialVerifier) behind DI; reuses b3 IBankAccountOwnershipVerifier and
b0 IObjectStorage/IFieldEncryptor. 15 endpoints across 4 controllers.

Two migrations (tables + step-type seed). 154 tests pass, zero new warnings.
Contract dev/contracts/domains/verification.md + swagger snapshot refreshed;
handoff/report/mocks-registry updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 14:39:32 +03:30
hamid 687fbfc6d9 include .claude settings 2026-07-02 22:25:27 +03:30