Skip to content

Repository files navigation

Hydro

Hydro

Flowing data, shaping physical intelligence.

Crowdsourcing real-world human demonstrations to train embodied AI — verified by AI, rewarded in $HYDRO.

License: MIT Platform Built with Expo Backend: Supabase PRs welcome


Overview

Hydro turns everyday human actions into high-quality training data for embodied AI. Contributors open the app, pick a real-world task (pour water, fold a shirt, plug in a cable…), and record a short first-person clip. Every clip is run through an AI quality gate — a vision model checks that the video genuinely performs the task — and only verified contributions are credited with $HYDRO rewards.

The goal is a fair, spam-resistant data marketplace: humans get paid for useful demonstrations, and robotics teams get clean, labeled, task-specific video.

MVP1 status: rewards are accounted off-chain (an in-app balance, claimable to your wallet at token launch). No token contract is deployed yet — this keeps early testing safe and gas-free.


How it works

┌─────────────┐    record + extract frames    ┌──────────────────┐
│  Expo app   │ ─────────────────────────────▶ │ Supabase Storage  │
│ (iOS / RN)  │                                │  (private bucket) │
└─────┬───────┘                                └─────────┬────────┘
      │ create contribution + request reward             │
      ▼                                                   ▼
┌───────────────────────────┐   frames    ┌───────────────────────────┐
│ Supabase Edge Function     │ ──────────▶ │ OpenAI vision (gpt-4o-mini)│
│ `reward` (Deno)            │ ◀────────── │  {approved, score, reason} │
└─────┬─────────────────────┘   verdict    └───────────────────────────┘
      │ only credits $HYDRO if the clip passes AI review
      ▼
┌───────────────────────────┐
│ Postgres `contributions`   │  status: rewarded | rejected | pending_review
└───────────────────────────┘

Tech stack

  • App: Expo (React Native), expo-router, expo-camera, expo-video-thumbnails
  • Auth / wallet: Privy embedded wallets (email OTP login)
  • Backend: Supabase — Postgres, Row-Level Security, Storage, Edge Functions
  • AI review: OpenAI gpt-4o-mini vision, called from the reward Edge Function
  • Build / deploy: EAS (Expo Application Services)

Features

  • Bottom-tab navigation: Home (intro + industry updates), Task (record & upload), My (wallet, balance, per-upload AI score)
  • Real device video recording (60s cap) with front/back camera
  • On-device frame extraction + private upload to Supabase
  • AI quality gate: a vision model scores every clip against the task instructions; only passing clips are rewarded
  • Off-chain $HYDRO accounting with a clear "claimable at launch" model

Getting started

You will need your own Supabase project, Privy app, and OpenAI API key. The app gracefully falls back to a local demo mode when Supabase isn't configured.

1. Prerequisites

  • Node 20+ and Bun (or npm)
  • Expo tooling (npx expo)
  • A Supabase project
  • A Privy app (for email login + embedded wallets)
  • An OpenAI API key (for the AI reviewer)

2. Install

bun install        # or: npm install

3. Configure environment

cp .env.example .env
# then fill in your own values (see .env.example for the full list)

EXPO_PUBLIC_* values are bundled into the client and are safe to expose (Supabase anon key, Privy app id). Server-side secrets (OpenAI key, service role, treasury) are never put in the app — see below.

4. Set up the database

Run supabase/schema.sql in the Supabase SQL editor. It creates the profiles, tasks, contributions tables + RLS policies + the private recordings storage bucket, and seeds the task list. Also enable Anonymous sign-ins (Authentication → Providers).

5. Deploy the reward function

# set the server-side secret (never commit this)
supabase secrets set OPENAI_API_KEY=sk-...

# deploy
supabase functions deploy reward --project-ref <your-project-ref>

6. Run the app

npx expo start          # dev
# or a device build:
eas build --profile development --platform ios

Project structure

src/
  app/               expo-router routes
    index.tsx        login / welcome gate
    (tabs)/          Home · Task · My  (bottom tabs)
    record.tsx       camera recording (full screen)
    upload.tsx       review + AI verdict
  data/              task list + home content
  lib/               Supabase client + API layer
  wallet/            Privy integration (platform-split)
  store.tsx          app state (session, contributions, balance)
  theme.ts / ui.tsx  design system
supabase/
  schema.sql         database schema + RLS + seed
  functions/reward/  Edge Function: AI review + reward

Contributing

Contributions are welcome! Please read CONTRIBUTING.md. The short version: fork, branch, keep secrets out of commits, open a PR.

License

See LICENSE.

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages