Powered by Stellar Soroban Smart Contracts
Live Demo Β· PRD (Markdown) Β· Download PRD (PDF) Β· Report Bug
- Overview
- β¨ Key Features
- ποΈ Architecture
- π Quick Start
- πΈ Screenshots
- π§ Technology Stack
- π Documentation
- π€ Contributing
- π License
LatterFix is a fully on-chain decentralized task management and escrow platform built on Stellar Soroban smart contracts. It allows task creators to fund work via smart contract escrow, and contributors to earn instant USDC/XLM/EURC payouts the moment their delivery is verified β entirely without a centralized backend.
Every user action (task creation, assignment, work submission, dispute, governance vote) constructs a real Soroban transaction using @stellar/stellar-sdk, simulates it against the Soroban RPC, routes the XDR to the user's wallet for signing (Freighter, xBull, Lobstr), and polls for ledger confirmation before updating the UI.
| Challenge | Traditional Systems | LatterFix Solution |
|---|---|---|
| Payment Trust | 40% of freelancers face payment disputes | Smart contract escrow ensures guaranteed payments |
| Transaction Fees | 5-15% for international transfers | ~$0.000005 per transaction on Stellar |
| Settlement Time | 3-5 business days | 3-5 seconds finality |
| Global Access | Requires bank account | Only needs internet & wallet |
| Reputation Tracking | Platform-locked, opaque | On-chain, portable reputation |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Why We Built on Stellar β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β‘ LIGHTNING FAST π° NEAR-ZERO FEES β
β 3-5 second settlement $0.000005 per transaction β
β β
β π GLOBAL ACCESS π TRUSTLESS ESCROW β
β 50+ currencies via anchors Smart contract locked funds β
β β
β π IMMUTABLE RECORDS π¦ NO BANK REQUIRED β
β All transactions on ledger Financial inclusion for all β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Full transaction lifecycle β Simulate β Prepare β Sign β Submit β Poll for every action
- 20+ contract methods exposed via
sorobanTaskContract.tsservice - Wallet support β Freighter, xBull, Lobstr via
@creit.tech/stellar-wallets-kit - Simulation-first β Every tx is simulated against Soroban RPC before wallet prompt
create_task()locks reward tokens in Soroban contract storagecomplete_task()releases net payout (reward minus 2.5% platform fee) to contributordispute_task()freezes escrow awaiting adminresolve_dispute()with custom splitcancel_task()refunds creator in full
- Real account balances β XLM, USDC, EURC queried from Horizon on every page
- Network congestion β Live fee stats from
/fee_statsendpoint in AppNav - Transaction history β Paginated Horizon tx list, claimable balances, Soroban
getEvents - Live ledger number β Shown on landing page, updates on mount
create_proposal()/cast_vote()/execute_proposal()all wallet-signedgrant_role()/pause_all()/unpause_all()for admin circuit-breaking- Live proposals fetched from Soroban RPC on page load
- Tiered reputation system β Newcomer β Contributor β Expert β Master β Legend
get_profile()/get_user_reputation()/get_user_tier()called from Profile pageslash_reputation()/reward_contribution()for admin reputation managementtotal_earningstracked cumulatively in on-chain profile storage
- Role-based auth β Admin / Moderator / Verifier with
require_auth()guards - Granular pause β Each of 7 actions can be independently paused/unpaused
- Emergency circuit-breaker β
pause_all()halts the entire contract in one call
LatterFix is a backend-free dApp β all state lives on the Stellar ledger.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LATTERFIX ARCHITECTURE β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β React 19 + TypeScript (Vite) β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββ β
β βDashboard β βExplorer β βEscrow Mgrβ βGovernanceβ βProfile β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ βββββ¬βββββ β
β β β β β β β
β ββββββΌββββββββββββββΌβββββββββββββΌββββββββββββββΌβββββββββββββΌβββββ β
β β useContractTask / useHorizonAccount hooks β β
β β sorobanTaskContract.ts service layer β β
β βββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ β
β β Stellar Wallets Kit (Freighter / xBull / Lobstr) β β
β β simulate β prepare XDR β sign β submit β poll β β
β ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ β
β β β
βββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββ΄βββββββββββββββββββ
β β
βββββββββββββΌββββββββββββ βββββββββββββββΌβββββββββββββ
β Soroban RPC β β Stellar Horizon API β
β simulateTransaction β β account balances β
β sendTransaction β β tx history β
β getEvents (contract) β β fee_stats (live) β
β getTransaction β β claimable balances β
βββββββββββββ¬βββββββββββββ βββββββββββββββ¬βββββββββββββ
β β
ββββββββββββββββββββ¬βββββββββββββββββββββ
β
βββββββββββββββΌβββββββββββββββ
β Stellar Testnet Ledger β
β LatterFix TaskManager β
β Soroban Contract (Rust/Wasm) β
ββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PAYROLL PAYMENT FLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Organization Admin LatterFix Platform Stellar Network
β β β
β 1. Create Payroll Batch β β
ββββββββββββββββββββββββββββΆβ β
β β β
β 2. Fund Batch (USDC) β β
ββββββββββββββββββββββββββββΆβ β
β β 3. Lock in Escrow β
β βββββββββββββββββββββββββββββββΆβ
β β β
β β β³ Awaiting Completion β
β β β
β 4. Approve Payments β β
ββββββββββββββββββββββββββββΆβ β
β β 5. Execute Bulk Payment β
β βββββββββββββββββββββββββββββββΆβ
β β β
β β β‘ 3-5 second settlement β
β ββββββββββββββββββββββββββββββββ
β β β
β 6. Confirmation β β
βββββββββββββββββββββββββββββ β
β β β
β Employees Receive β
β Instant Payment π° β
- Node.js 18+
- PostgreSQL 14+
- Redis 6+
- Stellar Wallet (Freighter recommended)
# Clone the repository
git clone https://github.com/LatterFix/LatterFix-frontend.git
cd LatterFix-frontend
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Run database migrations
cd backend
npm run db:migrate
# Start development servers
npm run dev# Backend (.env)
DATABASE_URL=postgresql://user:password@localhost:5432/latterfix
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-jwt-secret
STELLAR_NETWORK=testnet
# Frontend (.env)
VITE_API_URL=http://localhost:3001
VITE_STELLAR_NETWORK=testnet| Service | Port | Description |
|---|---|---|
| Frontend | 5173 | React + Vite dev server |
| Backend | 3001 | Express API server |
| Redis | 6379 | Cache & job queues |
Our root layout showcases an interactive contract browser designed to let developers explore, query, and test Soroban functions directly from their browser:
The workspace dashboard integrates employee rosters, smart escrow trackers, and historical transaction ledgers into a single, cohesive pane:
graph TD
User([User Client]) -->|Web3 Wallet| WalletKit[Stellar Wallets Kit]
User -->|React Router| FE[React 19 Frontend]
FE -->|Zustand Store| Store[Zustand Local State]
FE -->|HTTPS / WSS| BE[Node.js Express Backend]
BE -->|Query / Mutate| DB[(PostgreSQL Database)]
BE -->|Job Queues| Queue[BullMQ + Redis]
WalletKit -->|Sign Tx| Stellar[Stellar Network Ledger]
FE -->|Query State| Stellar
sequenceDiagram
autonumber
actor Admin as Organization Admin
participant Platform as LatterFix Platform
participant Stellar as Stellar Ledger
actor Contributor as Assigned Contributor
Admin->>Platform: Create Task & Set Reward
Admin->>Platform: Fund Escrow (XLM/USDC)
Platform->>Stellar: Lock Tokens in Soroban Escrow Contract
Contributor->>Platform: Apply & Accept Assignment
Contributor->>Platform: Complete Work & Submit Delivery URL
Admin->>Platform: Verify Deliverable
Platform->>Stellar: Trigger verify() release
Stellar->>Platform: Deduct Platform Fee (2.5%)
Stellar->>Contributor: Disburse Net Payout
graph LR
TenantA[Tenant A Session] -->|JWT Claims| RLS[PostgreSQL Row-Level Security]
TenantB[Tenant B Session] -->|JWT Claims| RLS
RLS -->|Scope Isolation| Table[(Organization Ledger Table)]
Table -->|Only Tenant A Data| TenantA
Table -->|Only Tenant B Data| TenantB
| Technology | Version | Purpose |
|---|---|---|
| React | 19 | UI framework |
| TypeScript | 5.9 | Type safety |
| Vite | 7 | Build tool |
| Zustand | latest | Client state management |
| @stellar/stellar-sdk | latest | Transaction building, XDR, Horizon |
| @creit.tech/stellar-wallets-kit | latest | Freighter / xBull / Lobstr |
| Vanilla CSS | β | Styling (no Tailwind) |
| lucide-react | latest | Icons |
| Module | What it does |
|---|---|
sorobanTaskContract.ts |
20+ contract methods, simulate β sign β poll |
stellar.ts |
Horizon account ops, path payments, claimable balances, trustlines |
transactionHistory.ts |
Paginated Horizon txs, getEvents RPC, fee stats |
useContractTask.ts |
React hook wiring contract actions to wallet |
useHorizonAccount.ts |
Live XLM/USDC/EURC balances from Horizon |
| Module | Responsibility |
|---|---|
lib.rs |
Public contract entrypoint (20+ methods) |
escrow.rs |
Task state machine & token locking |
governance.rs |
Proposals, voting, execution |
reputation.rs |
Tiered points system & leaderboard |
access_control.rs |
Role-based auth with require_auth() |
pausable.rs |
Granular + global circuit-breaker |
user_profile.rs |
On-chain profiles, earnings, avatar |
storage.rs |
TTL management, statistics, categories |
events.rs |
22 timestamped event emitters |
| Document | Description |
|---|---|
| Architecture Diagram | System architecture details |
| Multi-Tenant Setup | Tenant configuration guide |
| API Documentation | REST API reference |
| Testing Guide | Test instructions |
| SDS Integration | Stellar Data Service docs |
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Run linter
npm run lint
# Format code
npm run format
# Run tests
npm testThis project is licensed under the MIT License - see the LICENSE file for details.
Website Β· Documentation Β· Discord Β· Twitter

