Skip to content

MarvyNwaokobia/Proov

Repository files navigation

Proov — Your discipline. Onchain.

Prove it. Every day.
Habits. Streaks. Accountability. All onchain.

Proov is a habit-tracking and personal accountability dApp built on Celo. Users create habits, run focus timers, log activities with AI verification, write journal entries, and build daily streaks. Friends connect to form accountability circles. Every action fires an onchain transaction — the proof is permanent and publicly verifiable.


Live Demo

https://proov-one.vercel.app

Analytics

Dashboard Link
Dune (onchain) dune.com/marvyy/proov
Goldsky subgraph API v4.0.0
Admin panel (owner only) /admin

Smart Contracts (Celo Mainnet)

Lightweight event-log contracts — every user action emits an onchain event at ~0.005–0.009 CELO per transaction. Data is stored in Supabase; the chain is the immutable proof layer indexed by Dune and Goldsky.

All contracts follow the UUPS upgradeable proxy pattern (OpenZeppelin v5) — logic can be upgraded without changing the proxy address users interact with.

Contract Proxy Address Celoscan
ProovCore 0x6f379efDb10aFD85b233aE35Ad01164c7bc54eE2 view
SessionManager 0xea7d4608e9e2798D826d0DD698A7637EC83EA8d2 view
CircleManager 0x5366DB5a7aB63ceDE7229d15179633CA69ad076D view
FuelFaucet 0x500e1c72aB3c5C5be17255fe6f66bA8f3c37E988 view

Deployed at block 68,295,054 · May 31 2026


Features

Habit Tracking

  • Create habits across 6 categories: Focus, Fitness, Reading, Hydration, Sleep, Custom
  • Every creation, completion, and archive fires an onchain transaction
  • AI verification (Claude Sonnet 4.6) for fitness habits — proof hash stored in the tx
  • Deactivate and reactivate habits at any time

Streak System

  • Consecutive daily completions build your streak — miss a day and it resets
  • Milestones at 7, 21, 30, 50, 100, 200 days emit MilestoneReached onchain events
  • Streak data kept in Supabase; milestone proof lives onchain

Focus Timer

  • Start/end sessions recorded onchain via SessionManager
  • Timer reconstructs elapsed time from local state — survives tab switches and refreshes

AI Verification (Fitness Habits)

  • Powered by Claude Sonnet 4.6
  • Users describe their workout before submitting a completion
  • Claude judges the description — vague claims rejected, specific effort accepted
  • Verification hash stored in the transaction

Accountability Circle

  • Add friends by wallet address or username
  • Accepting a circle request emits MemberAdded onchain (proof of the bond)
  • Cheers and nudges sent onchain

Leaderboard

  • Top 50 users globally, sorted by current streak
  • Gold/silver/bronze podium for top 3
  • Tap any user to view their public profile

Journal

  • Log daily entries — content stored as a keccak256 hash onchain (private, verifiable)
  • Counts as daily activity and keeps your streak alive

Tech Stack

Layer Technology
Blockchain Celo (L2, post-March 2025 migration)
Smart contracts Solidity 0.8.28, Hardhat, OpenZeppelin UUPS v5
Frontend Next.js 14, TypeScript
Wallet auth Web3Auth (social login — Google, Email OTP)
Onchain reads/writes wagmi v2 + viem v2
Database Supabase (Postgres — app state)
Indexing Goldsky subgraph v4.0.0
Analytics Dune
AI verification Claude Sonnet 4.6 via Anthropic API
AI reports Google Gemini 2.5 Flash via @google/generative-ai
Animations Framer Motion

Architecture

proov-app/
├── apps/contracts/              ← Hardhat workspace
│   ├── contracts/
│   │   ├── ProovCore.sol        ← habits + streaks + journal (UUPS upgradeable)
│   │   ├── SessionManager.sol   ← focus timer sessions (UUPS upgradeable)
│   │   ├── CircleManager.sol    ← accountability circles (UUPS upgradeable)
│   │   └── FuelFaucet.sol       ← daily CELO drip for users (UUPS upgradeable)
│   ├── goldsky/                 ← Goldsky subgraph (v4.0.0)
│   └── scripts/
│       ├── deploy-upgradeable.ts ← mainnet deploy (UUPS proxies)
│       ├── upgrade.ts            ← push new implementation to existing proxies
│       └── register-agent.ts    ← ERC-8004 AI agent registration
│
└── apps/web/                   ← Next.js 14 frontend
    ├── app/
    │   ├── page.tsx             ← Landing page
    │   ├── signup/ signin/      ← Web3Auth social login
    │   ├── dashboard/           ← Streak hero + today's habits
    │   ├── habits/              ← Habit manager
    │   ├── timer/               ← Focus timer with live ring
    │   ├── circle/              ← Accountability circle
    │   ├── leaderboard/         ← Global leaderboard
    │   └── api/
    │       ├── faucet/          ← Server-side CELO drip for new users
    │       └── verify-habit/    ← Claude AI verification
    ├── hooks/                  ← useProovTx, useBackgroundTx, useSession
    └── lib/                    ← wagmi-config, transactions ABIs, auth, fuel

Smart Contract Design

All four contracts are event-log only — no complex storage, just events. This keeps gas at ~0.005–0.009 CELO per transaction (~17–20 txs per 0.1 CELO at current Celo mainnet gas prices).

All contracts use the UUPS proxy pattern: the proxy address is permanent; only the implementation behind it can be swapped by the owner via upgrade.ts.

ProovCore.sol

  • createHabit(name, type, duration, frequency) → emits HabitCreated
  • selfCompleteHabit(habitId, hash) → emits HabitCompleted
  • deactivateHabit(habitId) → emits HabitDeactivated
  • reactivateHabit(habitId) → emits HabitReactivated
  • recordStreakIncrement(count) → emits StreakUpdated + MilestoneReached on milestone days
  • setUsername / editUsername → emits UsernameSet
  • logJournalEntry(hash) → emits JournalLogged

SessionManager.sol

  • startSession(habitId) → emits SessionStarted
  • endSession(habitId, durationSeconds) → emits SessionCompleted
  • abandonSession(habitId, durationSeconds) → emits SessionAbandoned

CircleManager.sol

  • acceptRequest(from) → emits MemberAdded (proof of circle bond)
  • sendCheer(to) → emits CheerSent
  • removeFromCircle(member) → emits RemovedFromCircle

FuelFaucet.sol

  • claimFuel() → sends 0.2 CELO to caller (once per 24h, owner-funded)
  • canClaim(user) → view: returns true if user can claim now
  • secondsUntilClaim(user) → view: seconds until next eligible claim

Getting Started

Prerequisites

node >= 18
pnpm >= 8

1. Clone & install

git clone https://github.com/MarvyNwaokobia/Proov.git
cd Proov/proov-app
pnpm install

2. Configure environment

cp apps/web/.env.template apps/web/.env.local

Fill in apps/web/.env.local:

NEXT_PUBLIC_WEB3AUTH_CLIENT_ID=your_client_id
NEXT_PUBLIC_CELO_RPC_URL=https://forno.celo.org
NEXT_PUBLIC_PROOV_CORE_ADDRESS=0x6f379efDb10aFD85b233aE35Ad01164c7bc54eE2
NEXT_PUBLIC_SESSION_MANAGER_ADDRESS=0xea7d4608e9e2798D826d0DD698A7637EC83EA8d2
NEXT_PUBLIC_CIRCLE_MANAGER_ADDRESS=0x5366DB5a7aB63ceDE7229d15179633CA69ad076D
NEXT_PUBLIC_FUEL_FAUCET_ADDRESS=0x500e1c72aB3c5C5be17255fe6f66bA8f3c37E988
NEXT_PUBLIC_GOLDSKY_URL=https://api.goldsky.com/api/public/project_cmpdqb2n5s8s801x0h45a2npf/subgraphs/proov/4.0.0/gn
ANTHROPIC_API_KEY=your_key
GEMINI_API_KEY=your_key
FAUCET_PRIVATE_KEY=0x_your_faucet_wallet_key

3. Run dev server

cd apps/web && pnpm dev
# → http://localhost:3000

Deploying Contracts

cd apps/contracts

# Deploy fresh UUPS proxies (first time or after a breaking change)
pnpm deploy:celo

# Upgrade existing proxies to new implementation (no address change)
pnpm upgrade:celo

The deploy script prints all proxy addresses and saves them to deployed-mainnet.json. Update them in Vercel and apps/web/.env.local.


AI Agent (ERC-8004)

Key Value
Agent Address 0xc8BF2144e4742230c8Fd692d940032E6277883e2
Metadata URI https://raw.githubusercontent.com/MarvyNwaokobia/Proov/main/agent-metadata.json
  1. Fitness verification — Claude Sonnet 4.6 judges workout descriptions before accepting a habit completion.
  2. Sunday circle reports — Gemini generates weekly plain-text summaries for each accountability circle.

KarmaGAP Submission

  • Track: AI Agents
  • Contracts: Deployed and verified on Celo Mainnet
  • Agent: Registered via ERC-8004
  • Onchain activity: 20+ real transactions on mainnet

License

MIT

About

Proov is a habit-tracking and personal accountability dApp built on Celo. Users create habits, run focus timers, log activities with AI verification, and build daily streaks. Friends connect to form accountability circles. Every action fires an onchain transaction — the proof is permanent and verifiable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors