💡 Inspiration

Freelancing, client agency work, and remote contracting frequently start with messy chats, scattered PDF briefs, and vague instructions. This results in two recurring industry headaches:

  1. Unchecked Scope Drift: Clients request "small tweaks" verbally or through chat without adjusting the budget; providers end up doing unbilled work or falling into bitter payment disputes.
  2. Blind Escrow Releases: Client funds in escrow are released based on arbitrary calendar dates or subjective promises, with zero cryptographic or verifiable proof that code compiles, endpoints respond, or criteria are met.

Clausora was built to turn this broken dynamic into a deterministic, verifiable outcome pipeline:

$$\text{Raw Brief} \longrightarrow \text{AI Work DNA} \longrightarrow \text{SHA-256 Agreement} \longrightarrow \text{Evidence Graph} \longrightarrow \text{3-Agent AI Jury} \longrightarrow \text{PayPal Capture}$$


⚡ What It Does

Clausora replaces ambiguity with six interconnected systems:

1. Multimodal AI Work DNA Synthesizer

Clients or providers submit unstructured text, technical RFPs, UI wireframes, or runtime traces. Powered by Google Gemini 1.5 Pro (flagship higher-reasoning model with a 2,000,000-token context window) and Qwen2.5-VL-7B, Clausora decomposes the prompt into:

  • Modular workstreams and tasks
  • Testable acceptance criteria with verification methodologies
  • Native multilingual support, including Tamil script (([\text{U+0B80}-\text{U+0BFF}])), Hindi, Spanish, French, and Japanese
  • A 9-dimension objective quality radar and financial risk register

2. Immutable Cryptographic Baseline (SHA-256)

Before any work begins, both parties review the generated deliverables. When accepted, Clausora generates a canonical, sorted JSON snapshot and computes a SHA-256 agreement fingerprint. Terms, milestones, and budgets can never be modified unilaterally.

3. Bilateral Counterpart Governance

To prevent unilateral contract creation, Clausora enforces the Anti-Self-Approval Theorem:

$$\forall p \in \text{Projects}, \quad \text{CanActivate}(u, p) \iff u.\text{id} \neq p.\text{createdBy} \land u.\text{id} = p.\text{counterpartId}$$

A client creator cannot activate their own agreement; the assigned provider must review and accept the project (and vice versa).

4. Proof-Before-Payout Enforcement & Evidence Hub

Milestone payout buttons remain locked until the provider submits verified evidence across four modalities:

  • 🌐 Live Staging URL (hosted site, functional endpoint)
  • 💻 Git Commit / PR (immutable repository hash)
  • 📸 Visual UI Screenshot (layout proof, mobile view)
  • 📄 Technical Documentation (API specification, runbook)

5. Multi-Agent AI Review Council ("The AI Jury")

When evidence is submitted, an autonomous 3-agent deliberation panel audits the deliverables in parallel:

  • 🏛️ Architecture Auditor: Verifies contract adherence and API modularity.
  • 🛡️ Security Verifier: Tests authentication, rate limiting, and transport security.
  • 🧪 QA Test Specialist: Evaluates test coverage and edge-case handling.

The council produces a transparent consensus verdict ((\text{APPROVED}), (\text{REVISE}), or (\text{REJECT})) and alerts clients to physical verification limitations.

6. PayPal Orders v2 Sandbox Escrow & Split Settlements

Direct server-to-server integration with PayPal Orders v2 REST API:

  • When clicking a deliverable button with a specific amount (e.g., Pay Deliverable ($600.00)), the payment modal pre-fills that exact sum.
  • Generic payout buttons auto-fill the full remaining project balance.
  • Executes real server-side captures upon client authorization and produces an immutable audit receipt.

🛠️ How We Built It

Clausora is built as a unified production monorepo deployed across modern cloud services:

  • Frontend SPA (Vercel): React 19, TypeScript, Tailwind CSS, Lucide Icons, Vite, and React Router with single-page reload rewrites.
  • Backend REST API (Render): Node.js 20 LTS, Express, TypeScript, Zod schema validation, and secure cookie sessions.
  • Cloud Database (MongoDB Atlas): M0 multi-tenant cluster with dual persistence (Mongoose replica set + resilient in-memory failover).
  • Multimodal AI Intelligence:
    • Google Gemini 1.5 Pro: Primary higher-reasoning engine for 2M token context, multilingual task parsing, and multi-perspective risk evaluation.
    • Hugging Face Qwen2.5-VL-7B: Multimodal vision analysis for UI screenshots and diagrams.
  • Transactional Email (Resend & Nodemailer): Resend HTTPS REST API over port 443 with an automated 3.5-second race timeout, preventing cloud firewall port blocks (587/465) and ensuring sub-second OTP password recovery delivery.
  • Escrow Settlement: PayPal Orders v2 Sandbox REST API with split payout calculation and deterministic milestone state machines.

🧗 Challenges We Faced

  1. Cloud Firewall Blocks on SMTP: Render's network blocks traditional SMTP ports (587/465), causing email verification timeouts. We built an adaptive dual-transport engine: our primary transport uses Resend's HTTPS REST API over port 443 with a 3.5-second timeout race, falling back to an in-memory audit store so users are never stranded.
  2. Reverse Proxy Rate Limiting: Behind Render's reverse proxy, Express initially misread X-Forwarded-For. We properly configured app.set('trust proxy', 1) and validated custom IP key generators.
  3. SPA Refresh 404s on Vercel: Hard refreshes on deep routes (/projects/proj_...) returned Vercel 404 errors due to a conflict with cleanUrls: true. Removing cleanUrls and configuring clean wildcard rewrites (/api/:path* to Render and /(.*) to /index.html) resolved the issue.
  4. Organizing Large Deliverables (100+ Tasks): In complex milestones with over 100 subtasks, the UI previously stretched and caused button wrapping. We created a full-width MilestoneTaskOrganizer with single-line action toolbars, client-side pagination, search filters, 1-click batch completion, and a collapsible MilestoneScopeViewer.

🏆 Accomplishments That We're Proud Of

  • 50 Automated Tests Passing: Comprehensive test suites covering financial safety, zero-budget hallucination prevention, SHA-256 canonical hashing, and milestone state machines.
  • Strict Anti-Self-Approval: Enforced mathematical checks preventing creators from activating their own contracts.
  • Full Cloud Resilience: Clean separation across Vercel (Edge SPA), Render (API), MongoDB Atlas (Database), and Resend (Email).

📚 What We Learned

  • How to safely ground generative AI prompts so they never fabricate budgets or deadlines that human counterparts have not verified.
  • The intricacies of PayPal Orders v2 server capture, intent states, and minor currency unit calculations.
  • Designing accessible, balanced responsive interfaces capable of handling both 1-line tasks and 100+ item enterprise deliverables.

🔮 What's Next for Clausora

  • PayPal Dispute Resolution Webhooks: Automatic milestone freezing if an external dispute is filed.
  • On-Chain Proof Anchoring: Writing SHA-256 agreement fingerprints and council verdicts to decentralized ledgers.
  • Multi-Currency Escrow Pools: Real-time cross-border FX settlements using PayPal Payouts.

Built With

Share this project:

Updates

Submission history