Koovira Dev Docs
10-actors/README.md

Actors & Identity Model

Partially validated (2026-09-06). Rows marked ๐ŸŸ  need a code/DB confirmation pass.

Koovira separates who you are (a person / login) from what capacity you are acting in (customer, a specific merchant type, staff, admin). One login can be both a customer and a merchant, and can hold sub-profiles.

The identity tables (validated names; confirm columns per feature)

  • customer_master โ€” one row per profile, not per person. A person can have a parent profile

(parent_user_id = 0) plus sub-profiles (professional, dating). Counting people โ‰  counting rows (a known trap: filter parent_user_id = 0 or overstate ~3ร—). This is the buyer/buyer_id, user_id referenced everywhere.

  • company_master โ€” one row per business (55 columns, corrected 2026-09-06 โ€” was cited as 57;

live SHOW COLUMNS count is 55; incl. primary_module, company_type, verified_badge). A merchant "acts as" a company. House rule: one account owns one company.

  • kv_module_registry โ€” the enrollment type a company signs up under (see

../00-architecture/module-registry.md).

  • Staff / sub-users, roles & permissions โ€” managed via classs/AdminUserManagerModule.php and the

merchant staff screens. ๐ŸŸ  exact permission tables to be documented in the auth pass.

Identity matrix (skeleton โ€” fill/verify per capability)

IdentityViewCreate listingBuySellBookManage businessFinancial accessKYC required
Guest / anonymouspublic onlyโœ–โœ–โœ–โœ–โœ–โœ–โ€”
Registered customerโœ”โœ–โœ” (wallet-first)โœ–โœ”โœ–own walletat purchase-risk gates
Merchant / business ownerโœ”โœ”โœ”โœ”โœ”โœ”company wallet/settlementโœ” (module-dependent)
Merchant staff / sub-userโœ”scopedโ€”scopedscopedscoped by permissionscopedinherits company
Service provider / freelancerโœ”โœ” (services/bids)โœ”โœ” (service)โœ”โœ”escrow/walletโœ”
Property agent / builderโœ”โœ” (listings/projects)โ€”โœ”โ€”โœ”membership/leadsโœ” (๐ŸŸ  role-gate issues on record)
Delivery / courier / driver partnerassigned jobsโœ–โ€”โ€”โ€”partner panelpayoutsโœ”
Admin / super-admin (padmin)allallโ€”โ€”โ€”allall (commission, refunds, settlement)n/a
โœ”/โœ– above are the intended model; each cell becomes authoritative only when tied to the actual permission check in code. Do not quote a cell as fact until the auth pass cites it.

To document next (auth & identity pass)

  • Signup/login/OTP/social-login flows (each its own page, per the spec's ยง5).
  • The permission/authorization matrix (ยง24) โ€” page access, CRUD, publish, approve, financial.
  • Identity switching (customer โ†” merchant), sub-profile activation

(TOGGLE_SUB_PROFILE), multi-module within one company.