Skip to content

cryptoflops/POW

Repository files navigation

πŸ”₯ POW - ProofOfWork Challenge Platform

A Farcaster Mini App for fitness, productivity, and accountability challenges with on-chain NFT achievements.

Farcaster Solidity Next.js License

Overview

POW is a decentralized challenge platform where users can create, join, and compete in daily challenges. Complete challenges, maintain streaks, and earn permanent on-chain achievements as Soulbound NFTs.

Key Features

  • 🎯 Create Challenges - Start daily, weekly, or monthly challenges
  • πŸ”₯ Streak Tracking - 18 streak milestones from 3 days to 365 days
  • πŸ… On-Chain Achievements - 27 Soulbound NFT types across 4 chains
  • πŸ“Š Leaderboards - Compete with friends and the community
  • πŸ“± Farcaster Native - Built as a Farcaster Mini App

Deployed Contracts

POWAchievementsV2 is deployed and verified on:

Network Address Explorer
Celo 0xaa8f5E784317a354C8Ec554Dca7720661b1A537B View
Base 0x946AAC558cfF7EF0657afa35aC33CB4c54bF5590 View
Optimism 0xaa8f5E784317a354C8Ec554Dca7720661b1A537B View
Arbitrum 0xbb656f760AA5B5f2610614EAA394513D872cca9C View

Achievement System

Streak Milestones (18 levels)

3 β†’ 5 β†’ 7 β†’ 14 β†’ 21 β†’ 30 β†’ 42 β†’ 50 β†’ 69 β†’ 100 β†’ 111 β†’ 132 β†’ 150 β†’ 200 β†’ 222 β†’ 250 β†’ 300 β†’ 365

Medal Tiers

πŸ₯‰ Bronze β†’ πŸ₯ˆ Silver β†’ πŸ₯‡ Gold β†’ πŸ’  Platinum β†’ πŸ’Ž Diamond β†’ πŸ‘‘ Legendary

Special Achievements

  • 🎯 First Challenge
  • 🌱 Early Adopter
  • 🦧 Degen (minted on all 4 chains)

Tech Stack

  • Frontend: Next.js 15, React, TypeScript, Tailwind CSS
  • Blockchain: Solidity 0.8.20, Hardhat, OpenZeppelin
  • Farcaster: @farcaster/miniapp-sdk, @neynar/react
  • Wallet: wagmi, viem

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Farcaster account (for testing)

Installation

# Clone the repository
git clone https://github.com/cryptoflops/POW.git
cd POW

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your values

# Run development server
npm run dev

Environment Variables

# Neynar API Key (get from neynar.com)
NEYNAR_API_KEY=your_neynar_api_key

# App URL (for production)
NEXT_PUBLIC_URL=https://your-domain.com

Development

Running Locally

npm run dev

Open http://localhost:3000 to view in browser.

Testing in Farcaster

  1. Install ngrok for tunneling
  2. Run ngrok http 3000
  3. Go to Farcaster Mini App Preview
  4. Enter your ngrok URL

Smart Contract Development

cd contracts

# Install dependencies
npm install

# Compile
npm run compile

# Deploy (set DEPLOYER_PRIVATE_KEY in .env)
npm run deploy:celo
npm run deploy:base
npm run deploy:optimism
npm run deploy:arbitrum

Project Structure

POW/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/           # Next.js App Router pages
β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”œβ”€β”€ hooks/         # Custom React hooks
β”‚   β”œβ”€β”€ lib/           # Utilities and configs
β”‚   └── types/         # TypeScript types
β”œβ”€β”€ contracts/
β”‚   β”œβ”€β”€ src/           # Solidity contracts
β”‚   β”œβ”€β”€ deploy-v2.js   # Deployment script
β”‚   └── hardhat.config.ts
└── public/            # Static assets

Minting Fees

Achievement minting requires a small fee:

Network Fee
Celo 1 CELO
Base 0.0001 ETH
Optimism 0.0001 ETH
Arbitrum 0.0001 ETH

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

License

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

Links

About

A gamified challenge platform for Farcaster where users create, join, and compete in fitness/productivity challenges with streak tracking, proof uploads, and social interactions

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors