Skip to content

PRIEYAN/FitFreak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FitFreak

Where Every Rep Counts

Transform your workouts into wins. Compete, earn rewards, and build the strongest version of yourself.

License React TypeScript Flask


Overview

FitFreak is a revolutionary blockchain-powered fitness platform that gamifies your workout journey. Earn rewards, compete in live contests, and transform your fitness routine into an engaging, rewarding experience. Built with cutting-edge AI motion tracking, smart contracts, and beautiful modern interface.

Core Philosophy

We believe fitness should be fun, rewarding, and social. FitFreak combines these features:

  • AI-Powered Tracking - Real-time motion detection with computer vision
  • Competitive Contests - Join live challenges and climb leaderboards
  • Crypto Rewards - Earn tokens for completing workouts and winning contests
  • Social Betting - Bet on live contests and win big
  • Progress Analytics - Track your journey with detailed insights

Screenshots

Main Dashboard

Main Dashboard

The main dashboard is where you'll see all your active contests, recent activity, and quick access to start workout session.

Live Contests

Live Contests

Join live contests in real-time and compete against other users. The live feed shows current standings and your position on leaderboard.

Challenges

Challenges

Browse through available challenges and see which ones you can participate in. Each challenge has different requirements and rewards, so make sure to read the details before joining.

Public Challenges

Public Challenges

View all public challenges that are open for everyone to join. You can filter by type, difficulty, or reward amount to find what you're looking for.

Betting Interface

Betting

Place bets on live contests and win rewards when your predictions come true. The betting system adds extra layer of excitement to competition.

Camera & Motion Tracking

Camera

The AI-powered camera tracks your movements in real-time using MediaPipe technology. You get instant feedback on your form and automatic rep counting which is pretty cool.

Squats & Pushups Tracking

Squats & Pushups

Specialized tracking for squats and pushups with detailed form analysis and rep counting. This feature works really well for these exercises.


Key Features

Gamified Fitness Experience

  • Personalized Challenges: AI-generated workout plans that are tailored to your fitness level
  • Live Contests: Real-time competitions with instant verification
  • Achievement System: Unlock badges, level up, and earn rewards
  • Leaderboards: Compete globally and track your ranking

Advanced AI Technology

  • Motion Detection: MediaPipe-powered real-time exercise tracking
  • Form Analysis: Get instant feedback on your technique
  • Rep Counting: Accurate automatic rep detection
  • Progress Tracking: Detailed analytics and performance metrics

Blockchain Integration

  • Smart Contracts: Transparent, trustless reward distribution
  • Crypto Rewards: Earn tokens for workouts and achievements
  • Stake-to-Win: Enter contests by staking crypto
  • Decentralized: Your data is yours, you have full control

Modern UI/UX

  • Light Blue Theme: Beautiful, professional design
  • Responsive: Works seamlessly on all devices
  • Smooth Animations: Polished interactions and transitions
  • Gen Z Ready: Modern, intuitive interface

Architecture

Frontend Stack

  • Framework: React 18 + TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS + Framer Motion
  • Web3: ethers.js v6
  • State Management: Custom React Hooks

Backend Stack

  • Framework: Flask (Python)
  • AI/ML: OpenCV + MediaPipe
  • API: RESTful endpoints
  • Video Processing: Real-time frame streaming

Blockchain

  • Network: Solana (Devnet/Mainnet)
  • Smart Contracts: Anchor Framework (Rust)
  • Web3 Provider: Solana Wallet Adapter (Phantom, Solflare, etc.)
  • Currency: SOL (Native Solana)

Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Python 3.10+
  • MetaMask browser extension (or Solana wallet for Solana features)
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/FitFreak.git
    cd FitFreak
  2. Install Frontend Dependencies

    cd frontend
    npm install
  3. Install Backend Dependencies

    cd backend/flask
    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    pip install -r requirements.txt
  4. Configure Environment

    # Frontend
    cp frontend/env.example frontend/.env
    
    # Backend
    cp backend/.env.example backend/.env
  5. Deploy Solana Program (See DEPLOY_SOLANA.md for detailed instructions)

    cd solana-program
    npm install
    ./scripts/deploy.sh devnet
  6. Run the Application

    # Use the provided startup script
    chmod +x FitFreak.sh
    ./FitFreak.sh

    Or manually:

    # Terminal 1 - Backend Flask Server
    cd backend/flask
    source venv/bin/activate
    python app.py
    
    # Terminal 2 - Backend API Server
    cd frontend
    node server.js
    
    # Terminal 3 - Frontend
    cd frontend
    npm run dev
  7. Access the Application


Documentation


Usage

For Users

  1. Connect Wallet: Click "Connect Wallet" and approve wallet connection
  2. Join Contest: Browse available contests and stake crypto to join
  3. Start Workout: Begin your exercise session with AI tracking
  4. Earn Rewards: Complete challenges and win prizes
  5. Track Progress: View analytics and achievements

For Developers

See the Integration Guide for detailed development instructions. The codebase is well-structured with clear separation between frontend, backend, and smart contracts.


Configuration

Environment Variables

Frontend (frontend/.env):

VITE_API_BASE_URL=http://localhost:3001/api
VITE_CONTRACT_ADDRESS=0xd43dc5f84320B34149Be4D0602F862DdD61A45CF
VITE_CHAIN_ID=0x1a1
VITE_RPC_URL=https://rpc.testnet.citrea.xyz

Backend (backend/.env):

RPC_URL=https://rpc.testnet.citrea.xyz
CONTRACT_ADDRESS=0xd43dc5f84320B34149Be4D0602F862DdD61A45CF
PORT=3001
FLASK_PORT=5000

Make sure to update these values with your actual contract addresses and RPC endpoints before running the application, otherwise things won't work properly.


Testing

# Frontend tests
cd frontend
npm test

# Backend tests
cd backend/flask
pytest

Currently the test suite is being expanded, so some tests might not be fully implemented yet. Contributions are welcome! We're always looking for help with testing.


Contributing

We welcome contributions! Please see our Contributing Guidelines for details if we have one, otherwise just follow these steps below:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Make sure your code follows the existing style and includes tests where applicable. Also try to keep commits focused on single feature or bug fix, it makes reviewing easier.


License

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


Acknowledgments

  • MediaPipe - For motion tracking technology
  • OpenCV - For computer vision capabilities
  • React Team - For the amazing framework
  • Citrea Network - For blockchain infrastructure
  • All Contributors - For making FitFreak better

Special thanks to everyone who's contributed code, reported bugs, or provided feedback. This project wouldn't be where it is without the community support.


Support

If you encounter any issues or have questions, feel free to open an issue on GitHub. We try to respond as quickly as possible but sometimes it might take a day or two depending on how busy we are.


Team Riz'ler

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors