Skip to content

edycutjong/proofly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Proofly

Proofly 🧾

Prove it, don't reveal it β€” TEE-secured zero-knowledge privacy verification agent.

Proofly Banner

Live Demo Pitch Video Built for DoraHacks BUIDL


Next.js Rust TypeScript Tailwind CI/CD Pipeline


πŸ§‘β€βš–οΈ For Judges

TL;DR: Proofly is a did:t3n agent you delegate a compliance check to. Using Terminal 3's Agent Auth SDK, the data owner signs a scoped grant that lets the agent run exactly one function β€” verify β€” and nothing else; the host enforces it natively (no rogue functions, no rogue egress). The agent reads sealed credentials inside an Intel TDX enclave and returns an SD-JWT + OID4VP presentation disclosing only a signed yes/no β€” zero PII crosses the network.

What you're judging Where to look
πŸš€ Live demo proofly.edycu.dev
🎬 90-sec pitch video watch
πŸ”‘ Agent Auth implementation (scoped agent-auth-update grant + native enforcement) agent/src/authz.ts Β· agent/src/index.ts
🧠 The agentic flow (problem β†’ delegate β†’ verify β†’ selective disclosure) Architecture & Flow Β· contract/src/lib.rs
βœ… Stability (CI: lint, typecheck, 100% backend coverage, E2E, SAST, secret scan) Engineering Harness Β· CI runs
🐞 Onboarding bug + doc-gap report (the $200 track) docs/ONBOARDING_BUG_REPORT.md
πŸ”Œ Why only Terminal 3 docs/SPONSOR_DEFENSE.md

Run it in 60s: cd agent && npm install && npm run dev (agent on :3001), then cd board && npm install && npm run dev (UI on :3000). Without an AGENT_KEY the agent boots in demo mode; set one from the T3 claim page for live auth.


🎬 See it in Action

Proofly Board UI
personal-data-maya-1
βœ… Maya β€” Lisbon Β· passes adult-eu-nosanction β†’ disclosed { result: true }
personal-data-dmitri-1
❌ Dmitri β€” sanctioned Β· fails with reason β†’ { result: false }

The Flow: Verifier requests a compliance proof (e.g. over_18 ∧ country ∈ EU ∧ not_sanctioned) βž” Proofly loads user's sealed SD-JWT credentials inside the TEE βž” evaluates policy criteria on plaintext inside isolated memory βž” issues an SD-JWT selectively disclosing only the boolean result βž” packages the credential into an OID4VP Verifiable Presentation (vp).


πŸ’‘ The Problem & Solution

The Problem

Every app that gates on age, KYC, or jurisdiction collects raw identity documents to verify a single boolean. That's a honeypot: GDPR/CCPA liability, data breach exposure, and massive user drop-off. For AI agents acting on a user's behalf, it is even worse: an autonomous script is copying and pasting passports between services. The verifier never wanted the passport β€” it wanted a trustworthy "yes" or "no."

The Solution

Proofly is a did:t3n-verified privacy agent. The user's underlying credentials are decrypted only inside a Trusted Execution Environment (TEE).

  • Zero-PII Disclosure: The agent evaluates rules inside the enclave and exports only a signed boolean proof of compliance. Absolutely no birth date, country string, or name crosses the network.
  • Dynamic Policy Engine: Composable compliance rules: age>=18 AND country IN (EU) AND NOT sanctioned.
  • Tamper-Proof Audit logs: Records every disclosure (verifier, user, policy, timestamp, and signature hash) inside the enclave KV store.

πŸ—οΈ Architecture & Flow

flowchart LR
    subgraph App["Integrating app (VC verifier)"]
      REQ[presentation request:\n claims + predicate]
    end
    subgraph Proofly["Proofly agent (did:t3n)"]
      API[/POST /verify/]
      PE[Policy β†’ required claims]
      CLI[T3nClient.executeAndDecode]
    end
    subgraph T3["T3N TEE (Intel TDX / Wasmtime)"]
      DISP[proof contract: dispatch]
      VP[vp: build Verifiable Presentation]
      SIGN[signing: SD-JWT selective disclosure]
      PROF[(user-profile: sealed claims)]
    end
    REQ --> API --> PE --> CLI -->|execute fn| DISP
    PROF --> DISP --> SIGN --> VP --> CLI --> API -->|"VP disclosing only required claims"| App
    Proofly -. did:t3n .-> REG[did-registry / agent-registry]
Loading
  1. Verify Request: The verifier requests compliance check adult-eu-nosanction for a user did.
  2. Retrieve Profile: Enclave retrieves user's encrypted credentials from the user-profile host interface.
  3. Evaluate: Enclave contract decrypts profile under cluster CEK and checks rules.
  4. Selectively Disclose: Enclave signing generates SD-JWT disclosing only { result: boolean }, and vp packages it as an OID4VP Verifiable Presentation.
  5. Log Audit: Enclave saves the audit entry inside the isolated KV store.

πŸ† Sponsor Tracks Targeted & SDK Surface Area

Primary track β€” Agent Auth SDK. The data owner signs an agent-auth-update that scopes the Proofly agent to exactly its verify-policy / create-policy / get-health functions and api.terminal3.io egress. T3N enforces this natively at the host layer β€” an out-of-scope function or host fails with host/agent-auth.unauthorized_function / host/http.egress_denied. We construct the real grant payload in agent/src/authz.ts (buildAgentAuthUpdateInput).

We use seven distinct Terminal 3 host capability interfaces:

  1. agent-auth (agent/src/authz.ts): Scopes the agent to its functions + egress allowlist via a signed agent-auth-update grant (the bounty centerpiece).
  2. signing (contract/src/lib.rs:196): Generates SD-JWT selectively-disclosed credentials inside the hardware VM.
  3. vp (contract/src/lib.rs:208): Packages credentials as OID4VP Verifiable Presentations.
  4. user-profile (contract/src/lib.rs:95): Stores and retrieves encrypted user profiles securely.
  5. kv-store (contract/src/lib.rs:67): Manages registered policies and audit logs.
  6. did-registry & agent-registry (agent/src/identity.ts): Resolves the agent's did:t3n identity and discoverable agent URI.
  7. TEE Attestation (Intel TDX): Enforces execution of compiled WASM logic inside hardware-secured VMs.

πŸš€ Getting Started

Prerequisites

  • Node.js β‰₯ 20
  • Rust & Cargo (with wasm32-wasip2 target)
  • npm

Setup & Installation

  1. Clone the repository:

    git clone https://github.com/edycutjong/proofly.git
    cd proofly
  2. Build the Rust WASM contract:

    cd contract
    rustup target add wasm32-wasip2
    cargo build --target wasm32-wasip2 --release
    cd ..
  3. Install & run the standalone backend Agent Service:

    cd agent
    npm install
    npm run dev

    The agent boots on http://localhost:3001 and connects to the live Terminal 3 agent network.

  4. Install & run the frontend portal:

    cd board
    npm install
    npm run dev

    Open http://localhost:3000 to view the Proofly Dashboard.

Production Proxy Pattern: The frontend portal automatically routes compliance verification requests to the live Agent Service at http://localhost:3001.


πŸ§ͺ Engineering Harness & CI/CD

We enforce a production-grade 6-stage engineering harness (Quality βž” Security βž” Build βž” E2E βž” Perf βž” Deploy Gate) running on every commit.

Engineering Harness Summary

Layer Tool Status Details
Code Quality ESLint + TypeScript strict check βœ… Passing Zero warnings/errors across whole monorepo
Unit Testing Vitest with Coverage βœ… Passing 18+ tests with 100% backend code coverage
E2E Testing Playwright (Desktop & Mobile) βœ… Passing 3 test suites, 12 assertions passing on every commit
Security (SAST) GitHub CodeQL βœ… Active Continuous static application security scanning
Security (SCA) Dependabot + npm audit βœ… Active Inline dependency audits on build, weekly security PRs
Secret Scanning TruffleHog βœ… Active Inline git history scanning to prevent credential leaks
Performance Lighthouse CI βœ… Active Accessibility (>=90%), Performance, Best Practices, and SEO gates
CI/CD Pipeline GitHub Actions βœ… Active Parallelized multi-stage orchestrator with concurrency controls

Harness Command Reference

# ── Code Quality & Unit Tests ───────────────
npm run ci            # Full lint + typecheck + unit coverage (in board/)
npm run lint          # Run ESLint check
npm run typecheck     # Compile-check TypeScript types

# ── E2E & Performance Tests ──────────────────
npm run e2e           # Run Playwright E2E suites (demo mode)
npm run e2e:ui        # Playwright interactive runner
npm run lighthouse    # Lighthouse CI audit local build
Suite Focus Status
Key Custody Test Asserts that generated keys/signatures are restricted to TEE memory and never leak to disk/env/logs βœ… Passing
Happy Path Suite Verifies Maya (Lisbon, age 24, PT) successfully passes adult-eu-nosanction βœ… Passing
Age Gate Check Verifies Leo (minor) fails age checks and returns failure reason βœ… Passing
Sanction Check Verifies Dmitri (sanctioned) fails sanctions checks and returns failure reason βœ… Passing
Zero-PII Boundary Verifies that no birth date, country code, or name is present in verifier payload βœ… Passing
Audit Logs Verifies logs are recorded, searchable, and filterable βœ… Passing
Boundary Matrix Validates 100 distinct parameterized age checks βœ… Passing

⚑ Policy-Evaluation Microbenchmark

We ran 200 iterations of the AND-composed policy-evaluation step (claim comparison) in-process, mirroring contract/src/lib.rs:verify_policy.

Scope: This measures the deterministic evaluation logic, not a live T3N enclave round-trip (handshake + encrypted channel + Wasmtime execution + SD-JWT/VP packaging), which is network-bound. Numbers are fully reproducible:

python3 scripts/bench.py

Results (representative run)

  • Mean: 0.000611 ms
  • p50 (Median): 0.000292 ms
  • p95: 0.000625 ms

πŸ“„ License

MIT Β© 2026 Edy Cu

About

🧾 Prove it, don't reveal it β€” a did:t3n privacy agent that verifies compliance (age/KYC/jurisdiction) inside a TEE and discloses only a signed yes/no. Built on the Terminal 3 Agent Dev Kit.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors