Skip to content

lucastey/Stream

Repository files navigation

100.Stream - AI-Powered Social Platform for Truthful Content

Demo Backend License

🎯 Problem Statement

Social media platforms struggle with misinformation, biased moderation, and lack of user accountability. Traditional platforms rely on human moderators (slow, inconsistent) or basic AI (limited context understanding), while users have no recourse when content is unfairly removed.

💡 Solution Overview

100.Stream is a community-driven social platform powered by multi-agent AI system that prioritizes content truthfulness, transparent moderation, and reputation-based incentives. Our platform creates a self-regulating ecosystem where quality content is rewarded and harmful behavior is naturally discouraged.

Key Innovation: Multi-Agent AI Architecture

  • Truthness Evaluation Agent: Real-time fact-checking using Tavily API
  • Moderation Agent: Context-aware content policy enforcement
  • Reputation Management Agent: Dynamic scoring based on user behavior
  • Dispute Resolution Agent: AI-assisted community jury system

🏗️ Architecture

Frontend (Next.js + TypeScript)

src/
├── components/
│   ├── auth/           # Google OAuth integration
│   ├── posts/          # Post creation, feed, truthness display
│   ├── court/          # Dispute resolution interface
│   └── ui/             # shadcn/ui components
├── hooks/              # Custom React hooks (useAuth)
├── lib/                # API client, Supabase config
└── app/                # Next.js 13+ app router

Backend (Python + FastAPI)

backend/
├── agents/
│   ├── truthness_agent.py      # Fact-checking with Tavily API
│   ├── moderation_agent.py     # Content policy enforcement
│   ├── reputation_agent.py     # Points calculation & permissions
│   └── dispute_agent.py        # Jury selection & voting
├── models/             # Pydantic data models
└── main.py            # FastAPI application with CORS

Database (Supabase PostgreSQL)

-- Core tables
profiles (id, username, reputation_points, is_jailed)
posts (id, content, truthness_score, truthness_label, is_taken_down)
disputes (id, post_id, disputer_id, status, outcome)
jury_votes (id, dispute_id, jury_member_id, vote, reasoning)

Infrastructure

  • Frontend: Vercel (HTTPS, global CDN)
  • Backend: Docker containerization + ngrok tunnel
  • Database: Supabase (managed PostgreSQL + real-time)
  • AI Models: Google Gemini via CrewAI framework
  • External APIs: Tavily for web search and fact-checking

🚀 Key Features

1. AI-Powered Truthness Evaluation

  • Real-time fact-checking of posts containing factual claims
  • Confidence scoring based on source credibility and consistency
  • Transparent sourcing showing which websites were checked
  • Automatic reputation adjustments for high/low truthfulness

2. Intelligent Content Moderation

  • Context-aware analysis understanding nuance and intent
  • Graduated responses: warnings → review → takedown
  • Automatic reputation penalties scaled by violation severity
  • Appeals process through Post Court system

3. Post Court - Community Dispute Resolution

  • Stake-based disputes: Users risk reputation points to challenge decisions
  • Random jury selection from high-reputation community members
  • AI-generated guidance to help juries make informed decisions
  • Economic incentives: Winners gain points, losers forfeit stakes

4. Dynamic Reputation System

  • Starting balance: 100 points for new users
  • Earning mechanisms: Quality posts (+5), high truthfulness (+3), jury service (+2)
  • Penalty system: Policy violations (-2 to -10), low truthfulness (-2)
  • Privilege gates: Posting (10+ points), jury service (50+ points)
  • Jail mechanism: Negative reputation users lose posting privileges

🛠️ Installation & Setup

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • Docker Desktop
  • ngrok account

Frontend Setup

# Clone repository
git clone https://github.com/your-username/100-stream.git
cd 100-stream

# Install dependencies
npm install

# Configure environment variables
cp .env.example .env.local
# Add your Supabase and Google OAuth credentials

# Run development server
npm run dev

Backend Setup

cd backend

# Install Python dependencies
pip install -r requirements.txt

# Configure environment variables
cp .env.example .env
# Add your API keys: GOOGLE_AI_API_KEY, TAVILY_API_KEY, SUPABASE_URL, SUPABASE_SERVICE_KEY

# Build and run Docker container
docker build -t stream-backend .
docker run -p 8000:8000 stream-backend

# Set up ngrok tunnel (separate terminal)
ngrok http 8000
# Copy the HTTPS URL to your frontend environment variables

Database Setup

  1. Create a Supabase project
  2. Run the SQL migrations in database/migrations/
  3. Configure Row Level Security (RLS) policies
  4. Update environment variables with your Supabase credentials

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Tavily for real-time web search API
  • Supabase for backend-as-a-service platform
  • Vercel for seamless frontend deployment

Built with ❤️ for the AI Agents Hackathon

Empowering truth through AI and community governance

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published