Skip to content

Stoobyy/pact

Repository files navigation

Pact 🤝

Hold your friends accountable. Pact is a group accountability app where friends commit to daily challenges, submit photo proof verified by AI, and face public shame when they fail.

How It Works

  1. Create a group — Set a challenge, invite friends with a code, put money on the line
  2. Complete daily tasks — Take a photo, AI verifies your proof in seconds
  3. Miss a deadline? — Choose a penalty: pay up, or survive an AI-generated dare
  4. Hall of Shame — Failures get auto-roasted and displayed for the whole group to see

Tech Stack

Layer Tech
Frontend Flutter (Dart), Riverpod, GoRouter, flutter_animate
Backend Supabase (Auth, Postgres, Storage, Realtime, Edge Functions)
AI Gemini 2.5 Flash via Edge Functions (proof verification, challenge generation, auto-roasts)
Rate Limiting Upstash Redis

Project Structure

lib/
├── core/               # Theme, services, constants, utilities
│   ├── services/       # Supabase, Gemini, AI verification, payments
│   ├── theme/          # Dark neon UI (AppColors, AppTextStyles)
│   └── constants/      # Supabase & Gemini config
├── features/
│   ├── auth/           # Login, register, onboarding, splash
│   ├── home/           # Dashboard, task checklist, providers
│   ├── challenges/     # Daily tasks, proof submission
│   ├── groups/         # Create/join groups, group chat
│   ├── leaderboard/    # Rankings and points
│   ├── shame/          # Hall of Shame, reactions, comments
│   ├── penalty/        # Penalty choice, AI dare challenges
│   ├── streaks/        # Streak tracking
│   └── profile/        # User profile
└── shared/             # Reusable widgets (GlassCard, GlowButton, BottomNav)

supabase/
├── functions/
│   ├── verify-proof/           # AI image verification via Gemini
│   ├── generate-challenges/    # AI daily challenge generation
│   └── generate-penalty-challenge/  # AI dare generation for failures
└── migrations/                 # SQL schema & RLS policies

Setup

Prerequisites

  • Flutter SDK ^3.8.0
  • Supabase project (with Edge Functions enabled)
  • Gemini API key
  • Upstash Redis (optional, for rate limiting)

1. Clone & Install

git clone https://github.com/Stoobyy/pact.git
cd pact
flutter pub get

2. Configure Supabase

Set your local secrets in environment variables (do not commit real values):

cp .env.example .env

Then run Flutter with required --dart-define values:

flutter run \
  --dart-define=SUPABASE_URL=https://your-project.supabase.co \
  --dart-define=SUPABASE_ANON_KEY=your-anon-key

For Python demo scripts:

set SUPABASE_URL=https://your-project.supabase.co
set SUPABASE_ANON_KEY=your-anon-key
python scripts/demo_punishment.py

3. Deploy Edge Functions

# Set secrets
supabase secrets set GEMINI_API_KEY=your-gemini-key
supabase secrets set UPSTASH_REDIS_REST_URL=your-redis-url
supabase secrets set UPSTASH_REDIS_REST_TOKEN=your-redis-token

# Deploy
supabase functions deploy verify-proof --no-verify-jwt
supabase functions deploy generate-challenges --no-verify-jwt
supabase functions deploy generate-penalty-challenge --no-verify-jwt

4. Run

flutter run

Features

  • 🤖 AI Proof Verification — Gemini Vision checks if your photo actually matches the task
  • 🔥 Hall of Shame — Auto-generated roasts for people who miss their tasks
  • AI Challenges — Miss a task? Survive a dare generated by AI instead of paying
  • 📊 Leaderboards — Points, streaks, and rankings within your group
  • 💬 Group Chat — Banter with your accountability partners
  • 💸 Stakes — Real money on the line with configurable daily penalties
  • 🎯 Daily Deadlines — Countdown timers with push notification reminders

License

Private — not open source.

About

An AI-powered social accountability platform where friends complete challenges, avoid penalties, and compete for the prize pool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors