Koovira Dev Docs
20-modules/freelancer/overview.md

Module: Freelancer (freelancer / freelance)

Status: 🟒 Production (escrow-based; small real volume) · Last validated: 2026-09-06 · Priority: P0

Project marketplace: clients post projects, freelancers bid, work runs under milestone escrow. Validated against classs/FreelancerModule.php + schema.

A. Purpose

Clients hire freelancers; payment held in escrow, released per milestone. Revenue = 5% commission (platform_commission_settings.setting_key='freelance_order'; 2 processed rows in commission_transactions for order_table='flancer_escrows', 2026-09-06 β€” corrected from an earlier count of 1, a moving snapshot on an actively-tested environment).

B. Actors

Client; freelancer; admin. Enrollment freelance.

C. Entry points

/freelance.php, /freelance_bids.php. Also freelance_service.php (classs/FreelanceServiceModule.php, 41 lines) β€” correction: this is not a separate third implementation with its own tables; it is a 41-line backward-compatible faΓ§ade that extends FreelancerModule (:13) and has no tables of its own β€” it shares FreelancerModule's real tables. Its own overridden methods (bookService :24, listServiceCategories :32, createService :37) are non-functional stubs that return "not available" / empty results, kept only so legacy pages calling them don't fatal. Treat it as a deprecated compatibility shim, not a data source β€” do not cite it for feature/table claims.

E. Feature registry (prefix FREE-)

IDFeatureActorMethodTablesStatus
FREE-001Freelancer profilefreelancergetProfile/saveProfile :463/:475profile🟒
FREE-002Create projectclientcreateProject :553flancer_projects🟒
FREE-003Browse open projectsfreelancerbrowseOpenProjects :1090flancer_projects🟒
FREE-004Submit bidfreelancersubmitBid :1253flancer_bids🟒
FREE-005Project status / lifecycleclientsetProjectStatus :1002, closeProject :1190flancer_projects🟒
FREE-006Milestone escrowsystem(escrow)flancer_escrows, flancer_milestones🟒 (money)

F. Flow

freelance.php β†’ createProject(client)  :553 β†’ flancer_projects (open)
  β†’ freelancers submitBid  :1253 β†’ flancer_bids
  β†’ client awards β†’ escrow funded (flancer_escrows) β†’ milestones (flancer_milestones)
  β†’ milestone approved β†’ release β†’ freelancer wallet + 5% commission + central ledger (module_key='freelancer')
  β†’ closeProject  :1190

G. Data model (2026-09-06)

flancer_projects 8 Β· flancer_bids 4 Β· flancer_escrows 3 Β· flancer_milestones 2.

H. Financial impact

Milestone escrow (mirror of the Services escrow pattern). Wallet-first, 5% commission on release, central finance ledger. See ../../40-financial/. Note: the escrow-funding debit/credit pair (classs/FreelancerModule.php:2002 client debit, :2039 credit into CLASSIFIED_ESCROW_BUCKET_USER_ID) does not pass an acct_purpose in $meta, so both movements fall through to WalletModule::journalAccountsFor()'s historical default mapping (classs/WalletModule.php:952-983): the client's debit is journaled USER_WALLET_LIABILITY β†’ REVENUE_GENERAL (booked as recognised revenue) rather than as an escrow-liability movement, even though the funds are only being held pending milestone approval. Same gap as Food/Hotels/Events β€” see those pages and this audit's cover report.

K. State machine

Project: open β†’ awarded β†’ in_progress β†’ completed β†’ closed / cancelled. Escrow per milestone: funded β†’ released | refunded.

L / M / N

Errors: FREE-E001 escrow not released (milestone not approved). Depends on wallet, commission, escrow. Change-impact: escrow release affects held funds β€” re-test milestone release + commission.