hackquest logo

cairn

AI-powered worker safety credential platform, anchored on NEAR Protocol.

Video

Hình ảnh dự án 1
Hình ảnh dự án 2
Hình ảnh dự án 3
Hình ảnh dự án 4

Công nghệ sử dụng

React
Next
Ethers
Solidity
Node
Python
Web3

Sự miêu tả

Cairn is An AI-powered worker safety credential platform, anchored on NEAR Protocol — the safety record that follows the worker, not the employer.

THE PROBLEM:

Fewer than 8% of safety records across Southeast Asian industrial sites exist in verifiable digital form. Workers who spend years building an incident-free record walk away with nothing when they switch employers — no proof, no portability, no leverage. Meanwhile site managers still run compliance by walking the floor with a clipboard, catching hazards only after they've become incidents.

Failure

Consequence

Workers own no portable identity

Re-prove competence from zero at every new site

Managers get no real-time signal

Hazards caught only after they escalate

No shared trust layer

$2T ASEAN infrastructure pipeline runs on paper trails


THE SOLUTION:

Cairn converts a daily photo check-in into a cryptographically verifiable, portable safety identity — with an AI compliance co-pilot running underneath for the people managing the site.

Worker checks in:        photo + note, submitted from job site
Gemini analysis:         hazard detection, ISO 45001 categorization, < 15s
Safety score:            recomputed from streak, incidents, hazard rate
On-chain attestation:    ledger.cairn-deployer.testnet.attest_checkin()
Verification:            /verify/[workerId]  public, no auth, always live

ARCHITECTURE:

┌─────────────────────────────────────────────────────────────────┐
│                Next.js 16 App Router (Turbopack)                 │
│  ┌───────────────────────┐        ┌───────────────────────────┐ │
│  │  Worker / Manager UI   │        │   API Routes                │ │
│  │  Check-in · Roster     │◄──────►│   /api/ai/*   /api/checkins │ │
│  │  Incidents · Wages     │        │   /api/near/* /api/reports  │ │
│  │  /verify/[id]  (public)│        └──────────────┬────────────┘ │
│  └───────────────────────┘                       │              │
└───────────────────────────────────────────────────┼──────────────┘
                    │                               │
         ┌──────────▼──────────┐        ┌───────────▼────────────┐
         │  Google Gemini        │        │   NEAR Protocol         │
         │  Vision + text        │        │   (testnet)             │
         │  hazard / incident /  │        │   4 near-sdk-js         │
         │  predictive analysis  │        │   contracts, live       │
         └──────────┬────────────┘        └───────────┬────────────┘
                    │                               │
                    └───────────┬───────────────────┘
                                ▼
                    ┌────────────────────────┐
                    │  Supabase Postgres      │
                    │  10 tables · RLS on all │
                    │  Storage + Realtime     │
                    └────────────────────────┘

ON-CHAIN TRUST LAYER — 4 Live NEAR Contracts

Contract

Testnet Account

Core Methods

CairnRegistry

reg.cairn-deployer.testnet

register_worker, get_worker

CredentialVault

vault.cairn-deployer.testnet

issue_credential, verify_credential

SafetyLedger

ledger.cairn-deployer.testnet

attest_checkin, checkpoint_score, record_incident_hash, record_wage_hash

OrgRegistry

org.cairn-deployer.testnet

register_org, add_issuer

Every check-in, credential, incident, and wage approval writes a real signed transaction to testnet — nothing simulated, all independently verifiable via each contract's own view methods.


KEY FEATURES:

  1. Real-time AI hazard detection — Gemini Vision flags missing PPE, trip hazards, electrical exposure across 14 categories with severity, confidence, and ISO 45001 clause references.

  2. AI-classified incident reports — plain-language incident write-ups converted into structured severity/root-cause/corrective-action reports.

  3. On-chain trust layer — four live NEAR contracts covering identity, credentials, attestation, and org management.

  4. Portable public verification — one QR code opens /verify/[workerId]: safety record, credentials, and wage history, no login required.

  5. Live safety score algorithm — weighted composite (consistency 25%, incident severity 30%, credentials 25%, hazard rate 20%), checkpointed on-chain after every check-in.

  6. Manager compliance suite — real-time hazard feed, incident board, wage approval with on-chain hashing, and Gemini-generated predictive risk intelligence.

  7. Verified wage records — gross/net pay computed, SHA-256 hashed, and written to record_wage_hash() on approval.

  8. Zero mock data — every number displayed is a live Postgres query or a real Gemini/NEAR call; no seed scripts, no fake workers.


TECH STACK:

Layer

Choice

Frontend

Next.js 16, React 19, TypeScript

AI

Google Gemini (vision + text, structured JSON out)

Chain

NEAR Protocol (testnet), near-sdk-js / WASM

Data

Supabase Postgres + Storage + Realtime

Design

Editorial monochrome-warm palette, Instrument Serif / Plus Jakarta Sans / IBM Plex Mono


HACKATHON POSITIONING:

Targeting Real-World Applications (primary) and AI × Web3 (secondary), triple sponsor alignment across:
- NEAR (four live deployed contracts),
- Google Cloud (Gemini multimodal analysis, not canned responses), and
- AWS (Supabase infra).

Tiến độ hackathon

Phase 1:

Shipped 4 live NEAR contracts (registry, credential vault, safety ledger, org registry) with real signed testnet transactions for every check-in, credential, incident, and wage.

Phase 2:

Built and wired Gemini vision hazard detection end-to-end — confirmed live on a real welding photo (95%+ confidence, correct PPE flag).

Phase 3:

Built the public /verify portal, live safety-score algorithm (verified 50→73 on a real check-in), and the manager compliance suite (hazard feed, incident board, wage approval).

Fixed a Phase 6 RLS gap on org_members/worker_assignments by routing through service-role guards.

Zero mock data anywhere in the app.

Trạng thái huy động vốn

Self-funded, hackathon-stage build. No external funding raised to date.

Trưởng nhóm
KKingsley Ojilere
Liên kết dự án
Triển khai Hệ sinh thái
Near ProtocolNear Protocol
Ngành
RWAAI