PredictMeBro

A decentralized, real-time sentiment prediction market made for everyone.

Visit Repo
PredictMeBro banner

About

A decentralized sentiment prediction market platform where users can vote "Yes" or "No" on various predictions and market outcomes. Built with Vite + React, TanStack Router for routing, and Wagmi for Ethereum wallet integration.

## The Problem We Solve

๐Ÿ” **Lack of Accessible Prediction Markets** - Traditional prediction markets are complex and intimidating for everyday users - High barriers to entry with complicated interfaces and processes - Limited real-time engagement and community interaction

๐Ÿ“Š **Unreliable Sentiment Data**

- Current sentiment analysis tools lack human intuition and context - Centralized platforms can manipulate or bias prediction outcomes - No transparent way to track collective market sentiment over time

๐Ÿ’ฐ **Missed Opportunities for Crowd Intelligence** - Individual predictions are often less accurate than collective wisdom - No easy way to monetize prediction skills and market knowledge - Limited platforms that combine social sentiment with financial incentives

## Our Solution

โœ… **Simple Yes/No Voting Interface**

- Intuitive binary choice system that anyone can understand and use - Real-time voting results with live updates across all connected devices - Seamless wallet integration for secure, blockchain-based participation

๐ŸŒ **Decentralized & Transparent**

- Blockchain-based voting ensures transparency and immutability - Real-time synchronization across multiple devices and users - Community-driven predictions with verifiable on-chain results

โšก **Gamified Prediction Experience**

- Earn rewards for accurate predictions and active participation - Social features with live user counts and community engagement - Beautiful, responsive interface with instant feedback and notifications

## Features

  • ๐Ÿž **Sonner Toast**: Beautiful toast notifications with multiple variants
  • ๐Ÿ”— **TanStack Router**: File-based routing with full TypeScript support
  • ๐Ÿฆ **Wagmi Integration**: Connect to Ethereum wallets and interact with blockchain
  • โšก **Vite + React**: Lightning-fast development with React 19
  • ๐ŸŽจ **Tailwind CSS**: Utility-first CSS framework
  • ๐Ÿ“ **TypeScript**: Full type safety throughout the application

How it's made

## How It's Made

### ๐Ÿ—๏ธ **Technical Architecture**

PredictMeBro is built using a modern, scalable tech stack designed for performance, developer experience, and user accessibility:

#### **Frontend Stack**

- **โšก Vite + React 19**: Lightning-fast development with the latest React features - **๐ŸŽฏ TypeScript**: Full type safety throughout the application for robust development - **๐ŸŽจ Tailwind CSS**: Utility-first CSS framework for rapid, responsive UI development - **๐Ÿงญ TanStack Router**: File-based routing with full TypeScript support and type-safe navigation - **๐Ÿ“ฑ Responsive Design**: Mobile-first approach with glass-morphism UI effects

#### **Blockchain Integration**

- **๐Ÿ”— Wagmi v2**: React hooks for Ethereum wallet connection and smart contract interaction - **โš™๏ธ Viem**: Low-level Ethereum utilities for type-safe blockchain operations - **๐ŸŒŠ Flow Blockchain**: Primary blockchain for low-cost, fast transactions - **๐Ÿ›ก๏ธ Ronin Blockchain**: Secondary blockchain support for broader ecosystem reach - **๐Ÿ‘› Privy Authentication**: Seamless wallet connection with multiple provider support

#### **Real-time Infrastructure**

- **๐Ÿ“ก Supabase Realtime**: PostgreSQL-based real-time data synchronization - **๐Ÿ”„ Live Notifications**: Cross-device toast notifications for pool creation and voting - **๐Ÿ“Š Live Updates**: Real-time vote counts and pool status updates - **๐ŸŽฏ Event Broadcasting**: Custom event system for user actions and notifications

#### **Smart Contract Architecture**

```solidity // Multi-network deployment strategy Flow Testnet: 0x903F029e949b090216799AC53fdE6AaE343151b1 Ronin Testnet: 0x2b86c3b937a37Bc14c6556a59CF388180081BB95 ```

### ๐ŸŽฏ **Key Design Decisions**

#### **1. Simplified UX Approach**

- **Binary Voting**: Reduced cognitive load with simple Yes/No choices - **Visual Feedback**: Immediate visual confirmation for all user actions - **Progressive Enhancement**: Works without wallet connection, enhanced with it

#### **2. Multi-Chain Strategy**

- **Flow**: Primary chain for fast, low-cost transactions and better UX - **Ronin**: Gaming-focused blockchain for broader ecosystem integration - **Dynamic Contract Loading**: Automatic contract selection based on route

#### **3. Real-time First Architecture** ```typescript // Realtime notification system usePoolNotifications() // Listen for pool creation events useBroadcastPoolCreation() // Broadcast pool creation to other users useVoteNotifications() // Live vote updates across devices ```

#### **4. State Management Strategy**

- **TanStack Query**: Server state management with caching and synchronization - **Wagmi State**: Blockchain state management with automatic updates - **Local State**: React hooks for component-level state management - **Supabase**: Real-time data synchronization across users

### ๐Ÿ› ๏ธ **Development Approach**

#### **Type-Safe Development**

```typescript // Complete type safety from contracts to UI interface Pool { id: string question: string totalAmount: number yesVotes: number noVotes: number endsAt: string claimableAmount?: number isResolved?: boolean } ```

#### **Component Architecture**

- **Atomic Design**: Reusable UI components with consistent styling - **Custom Hooks**: Business logic separation with reusable hooks - **Provider Pattern**: Context providers for global state management

#### **Real-time Event System**

```typescript // Event-driven architecture for live updates export const EVENT_TYPES = { VOTE: 'vote', POOL_CREATED: 'pool_created', POOL_RESOLVED: 'pool_resolved', REWARD_CLAIMED: 'reward_claimed' } ```

### ๐ŸŽจ **UI/UX Philosophy**

#### **Glass-morphism Design**

- **Backdrop Blur Effects**: Modern, elegant visual hierarchy - **Gradient Overlays**: Beautiful color transitions and depth - **Card-based Layout**: Consistent, scannable information architecture

#### **Accessibility First**

- **Keyboard Navigation**: Full keyboard accessibility support - **Screen Reader Support**: Semantic HTML and ARIA labels - **Color Contrast**: WCAG compliant color schemes - **Responsive Design**: Mobile-first approach with touch-friendly interactions

#### **Performance Optimization**

- **Code Splitting**: Dynamic imports for optimal bundle sizes - **Image Optimization**: Optimized assets with proper loading strategies - **Caching Strategy**: Aggressive caching for static assets and API responses

### ๐Ÿ” **Security & Best Practices**

#### **Smart Contract Security**

- **Multi-signature Wallets**: Admin functions require multiple signatures - **Reentrancy Guards**: Protection against reentrancy attacks - **Access Control**: Role-based permissions for contract functions

#### **Frontend Security**

- **Input Validation**: Client and server-side validation - **XSS Protection**: Sanitized user inputs and CSP headers - **Wallet Security**: Non-custodial approach with user-controlled private keys

### ๐Ÿ“ˆ **Scalability Strategy**

#### **Database Design**

- **Supabase PostgreSQL**: Scalable relational database with real-time capabilities - **Row Level Security**: User-based data access control - **Connection Pooling**: Efficient database connection management

#### **Caching Layer**

- **TanStack Query**: Intelligent client-side caching - **CDN Distribution**: Global content delivery for static assets - **Edge Functions**: Serverless functions for real-time processing

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

XPredict

Turn posts into actionable insights with PredictX! Create prediction markets directly from an X (Twitter) post, enabling real-time, cost-effective betting, opinion sharing, and crowd-sourced forecasting. Transform discussions into predictions and tap into the wisdom of the crowd!