How prajwal471/workvault works
WorkVault is a Stellar-based freelance escrow product. Clients connect a wallet, create and configure a vault, then fund it; freelancers submit deliverables, and the parties approve release or pursue dispute and refund actions. The Soroban contract enforces vault and milestone state while storing records on-ledger. The frontend also provides role-specific dashboards, wallet/network handling, transaction status, and activity updates. README capabilities inform the map where source excerpts were unavailable; links for those areas are limited to documented ownership and existing paths.
Main entry points: contracts.ts Contract calls · page.tsx Client dashboard · layout.tsx Dashboard shell · WalletContext.tsx Wallet state
Components 26
Access and roles
- Landing and connect
frontend/app/page.tsx - Wallet state
frontend/context/WalletContext.tsx - Role state
frontend/context/RoleContext.tsx - Dashboard shell
frontend/app/dashboard/layout.tsx
Escrow workflow
- Client dashboard
frontend/app/dashboard/client/page.tsx - Freelancer dashboard
frontend/app/dashboard/freelancer/page.tsx - Create vault
frontend/components/CreateVaultForm.tsx - Milestone setup
frontend/components/SetMilestonesForm.tsx - Fund escrow
frontend/components/DepositFundsForm.tsx - Submit deliverable
frontend/components/SubmitDeliverableForm.tsx - Vault actions
frontend/components/VaultActions.tsx - Raise dispute
frontend/components/RaiseDisputeForm.tsx - Vault listing
frontend/components/VaultList.tsx
Soroban contract
- Contract calls
frontend/lib/contracts.ts - Vault contract
contracts/vault/src/lib.rs - Vault and milestone types
contracts/vault/src/types.rs - Contract storage
contracts/vault/src/storage.rs
Network and activity
- Stellar integration
frontend/lib/stellar.ts - Wallet adapters
frontend/lib/freighter.ts - Stellar RPC and Horizon
- Soroban token
- Vault aggregation
frontend/lib/myVaults.ts - Event polling
frontend/lib/events.ts - Activity feed
frontend/components/ActivityFeed.tsx
Other components
- Client
- Freelancer
Connections 36
- Client → Landing and connect: opens
- Freelancer → Landing and connect: opens
- Landing and connect → Wallet state: connects wallet
- Landing and connect → Role state: selects role
- Wallet state → Wallet adapters: connects and signs
- Wallet state → Stellar integration: fetches balance
- Client → Client dashboard: uses
- Freelancer → Freelancer dashboard: uses
- Client dashboard → Dashboard shell: renders within
- Freelancer dashboard → Dashboard shell: renders within
- Dashboard shell → Wallet state: reads wallet
- Dashboard shell → Role state: reads role
- Client dashboard → Create vault: offers creation
- Client dashboard → Milestone setup: offers setup
- Client dashboard → Fund escrow: offers funding
- Client dashboard → Vault listing: shows vaults
- Freelancer dashboard → Submit deliverable: offers submission
- Freelancer dashboard → Vault listing: shows vaults
- Vault listing → Vault aggregation: loads vaults
- Create vault → Contract calls: calls
- Milestone setup → Contract calls: calls
- Fund escrow → Contract calls: looks up and funds
- Submit deliverable → Contract calls: submits proof
- Vault listing → Vault actions: offers actions
- Vault actions → Contract calls: calls
- Raise dispute → Contract calls: raises dispute
- Contract calls → Wallet state: requests signing
- Contract calls → Stellar RPC and Horizon: submits contract calls
- Stellar integration → Stellar RPC and Horizon: queries account and transactions
- Vault contract → Contract storage: reads and writes
- Vault contract → Vault and milestone types: uses records
- Vault contract → Soroban token: transfers escrow tokens
- Vault aggregation → Contract calls: reads vault data
- Activity feed → Event polling: polls events
- Event polling → Stellar RPC and Horizon: fetches events
- Dashboard shell → Activity feed: displays activity