gh_UserManager/docs/PASSPORT.md
bermooda-company 1f995295a6 last changes
2026-10-22 16:58:51 +03:30

64 lines
3.1 KiB
Markdown

# Passport (jobid) — Phase 1 + 2 + 3 + 4
Additive module. No existing model touched.
## Endpoints (v1)
- `GET/PATCH /api/v1/passport/me/` — ProfessionalProfile (auto-created)
- `GET /api/v1/passport/me/completeness/` — completeness + breakdown (10 sections)
- `CRUD /api/v1/passport/experiences/` + `GET /timeline/`
- `CRUD /api/v1/passport/educations/`
- `GET /api/v1/passport/skills-catalog/` — Skill catalog (filter `?category=`, `?search=`)
- `CRUD /api/v1/passport/skills/` — PersonSkill (title + level + source + verification)
- `CRUD /api/v1/passport/certificates/`
- `CRUD /api/v1/passport/projects/` (M2M `skills`)
- `CRUD /api/v1/passport/affiliations/` — BusinessAffiliation (profile+org+role, context-based)
- `CRUD /api/v1/passport/taxonomy/` — OrganizationTaxonomy (member-scoped)
- `CRUD /api/v1/passport/share-links/` — ShareLink (label + scope + expiry, owner only)
- `GET /api/v1/passport/public/<token>/` — public, AllowAny, scope-filtered, counts views
## Business model (Phase 3)
- `OrganizationTaxonomy`: OneToOne to Organization — org_kind
(company/guild_unit/sole_business/ngo/government) + guild_name +
guild_license_no + industry + sector + size_band.
- `BusinessAffiliation`: profile + organization + role
(founder/owner/ceo/board_member/managing_director/manager/employee/
partner/agent_mubasher/consultant/freelancer) + is_current + ownership%.
- Identity ≠ Authorization: `membership` = access, `affiliation` = professional fact.
## Completeness (100, capped)
headline 12 + summary 12 + profession 8 + years 8 + experiences 15
+ educations 10 + skills 15 + certificates 10 + projects 10 + affiliations bonus 5.
## Frontend
- `/passport` — Snapshot + breakdown counts + experience + education
+ skills (chips) + certificates + projects + businesses & roles
(org dropdown + role select + taxonomy display) + share-links card
(label + scope chips + copy/open + views). `/account` untouched.
Trust badges L0-L3 on every item.
- `/p/[token]` — public, no login: printable passport (print → PDF),
QR image, scope-filtered sections, trust labels.
## Sharing model (Phase 4)
- `ShareLink`: token (urlsafe) + label + scope[] (empty = all) +
expires_at + is_active + views_count. Consent = scope selection at create.
- Verification (L0 self / L1 doc / L2 org / L3 official) shown as badges.
## Verification wiring (Phase 5)
- `verification`: dimensions += career/education/skill (choices only, no break).
- `VerificationClaim`: profile + item_type (6 types) + item_id + evidence FK
+ level + status (pending/approved/rejected). Unique per item.
- Level map: national_id/passport/drivers_license/face → official (L3);
org_membership/user_role → institution (L2); manual_review/otp → document (L1).
- `approve()` upgrades the item's `verification_status`; `reject()` keeps L0.
- Auto-approve: org_membership evidence matching affiliation org → L2;
national_id/passport on education/skill/certificate → L3.
- API: `CRUD claims/` + `POST claims/:id/approve|reject/` (staff) +
`GET me/trust/` (trust_state + evidence_count + claims + items_by_level).
- Frontend: trust card in sidebar + per-item Verify/Pending/Verified button.