Documentation

Everything you need to understand, use and integrate TalentTrust.

Overview

TalentTrust is a decentralized escrow protocol for freelance work on Stellar. A client locks the project budget into a Soroban smart contract, the work is split into milestones, and each milestone is paid out to the freelancer when the client approves it. If something goes wrong either party can open a dispute that an arbiter settles by splitting the held funds. Completed engagements produce a rating that builds the freelancer's on-chain reputation.

Architecture

The system has three parts, each in its own repository:

Web app

Next.js site (this app): landing, escrow dashboard, reputation lookup, docs.

REST API

Express service on Vercel. Mirrors the contract state machine and serves OpenAPI docs.

Escrow contract

Rust Soroban contract on Stellar holding funds and enforcing every transition.

The web app talks to the API over HTTPS (https://talenttrust-backend.vercel.app). The API exposes the same operations as the contract, so integrators can prototype against the API and then submit the equivalent contract invocations from a wallet.

Escrow lifecycle

StatusMeaningNext
CreatedMilestones agreed, escrow not yet fully fundedFunded, Cancelled, Disputed
FundedThe full budget is held by the contractCompleted, Cancelled, Disputed
CompletedEvery milestone was released to the freelancerRated (once)
DisputedFrozen until the arbiter resolves itResolved
ResolvedHeld balance split between the parties-
CancelledUnreleased funds refunded to the client-

How to use

In the web app

  1. Open the Escrows dashboard and create an engagement with a client address, a freelancer address and one or more milestones.
  2. Click Fund to deposit the remaining budget into escrow.
  3. Click Release next each time a milestone is approved.
  4. When all milestones are released, rate the freelancer from 1 to 5.
  5. Look up any freelancer's score on the Reputation page.

From the command line

curl -X POST https://talenttrust-backend.vercel.app/api/v1/contracts \
  -H 'content-type: application/json' \
  -d '{"title":"Logo design","client":"GCLIENT...","freelancer":"GFREE...",
       "milestones":[{"title":"Concepts","amount":100},{"title":"Final","amount":200}]}'

curl -X POST https://talenttrust-backend.vercel.app/api/v1/contracts/1/deposit -H 'content-type: application/json' -d '{"amount":300}'
curl -X POST https://talenttrust-backend.vercel.app/api/v1/contracts/1/milestones/0/release

Note: the hosted API keeps data in memory for demo purposes, so records can reset between deployments.

API

Interactive Swagger documentation is served by the API itself at https://talenttrust-backend.vercel.app/docs and the raw spec at /openapi.json. Health status is available at /health.

EndpointDescription
GET /api/v1/contractsList escrows (filter by status or party)
POST /api/v1/contractsCreate an escrow
POST /api/v1/contracts/:id/depositFund an escrow
POST /api/v1/contracts/:id/milestones/:i/releaseRelease a milestone
POST /api/v1/contracts/:id/disputeOpen a dispute
POST /api/v1/contracts/:id/resolveResolve a dispute
POST /api/v1/contracts/:id/cancelCancel and refund
POST /api/v1/contracts/:id/reputationRate the freelancer
GET /api/v1/reputation/:addressReputation for an address

Smart contract

The escrow is a Rust Soroban contract. Key functions: initialize, create_contract, deposit_funds, release_milestone, open_dispute, resolve_dispute, cancel_contract, issue_reputation, get_contract and get_reputation. Deposits and releases perform real token transfers through the Stellar Asset Contract interface, and an admin circuit breaker can pause all mutations.

stellar contract invoke --id CCZMIVUBMG5SBC47SDTC32RWLBJ2HW2DCFVWJEOKCH2IFJBZGBKTXK5W \
  --source <your-key> --network testnet -- get_admin

Deployments