Revolutionizing hackathon prize distribution with blockchain technology. 99% cost reduction and instant processing for platforms like Devfolio, MLH, and more.
- Overview
- Key Features
- Architecture
- Tech Stack
- Project Structure
- Getting Started
- Smart Contracts
- Frontend Application
- API Documentation
- Deployment
- Contributing
- License
AlgoHack is a comprehensive blockchain-based prize distribution platform designed specifically for hackathon organizers and participants. Built on the Algorand blockchain, it provides instant, secure, and cost-effective prize distribution solutions that eliminate traditional banking delays and high transaction fees.
- Traditional Methods: $2,500+ cost, weeks to process
- AlgoHack Solution: $12 cost, instant processing
- Result: 99% cost reduction with immediate payouts
- Instant Prize Distribution: Deploy smart contracts and distribute prizes in real-time
- Multi-Platform Integration: Seamless integration with Devfolio, MLH, and other platforms
- White-label Solutions: Customizable branding for different platforms
- API-First Architecture: Easy integration with existing systems
- Smart Contract Escrow: Secure and transparent prize management
- Batch Processing: Handle multiple winners efficiently
- Instant Prize Claims: No waiting weeks for processing
- Transparent Transactions: All transactions visible on blockchain
- Global Accessibility: Works worldwide with instant transfers
- Secure Blockchain: Military-grade security protection
- No Waiting Periods: Immediate access to winnings
- Multi-Wallet Support: Connect with Pera, Defly, and other Algorand wallets
- Real-time Verification: Live transaction verification and status updates
- Responsive Design: Modern, professional UI that works on all devices
- Type Safety: Full TypeScript implementation for reliability
- Comprehensive Testing: Unit tests, integration tests, and E2E testing
The platform consists of three main layers:
- Frontend Layer: React-based user interface with wallet integration
- Smart Contract Layer: 8 core smart contracts handling different aspects
- Blockchain Layer: Algorand testnet and mainnet integration
- React 18 - Modern UI library
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- DaisyUI - Component library
- Vite - Fast build tool
- @txnlab/use-wallet - Algorand wallet integration
- AlgoKit - Algorand development framework
- Puya - TypeScript smart contract language
- Algorand TypeScript SDK - Blockchain interaction
- ESLint - Code linting
- Prettier - Code formatting
- Jest - Unit testing
- Playwright - E2E testing
- Vitest - Fast testing framework
algohack/
βββ projects/
β βββ algohack-frontend/ # React frontend application
β β βββ src/
β β β βββ components/ # React components
β β β βββ contracts/ # Generated smart contract clients
β β β βββ contexts/ # React contexts
β β β βββ utils/ # Utility functions
β β β βββ styles/ # CSS styles
β β βββ public/ # Static assets
β β βββ tests/ # Test files
β β
β βββ algohack-contracts/ # Smart contracts
β β βββ smart_contracts/
β β βββ simple_prize_distribution/
β β βββ batch_distribution/
β β βββ compliance_oracle/
β β βββ emergency_recovery/
β β βββ multisig_wallet/
β β βββ platform_fee_manager/
β β βββ reputation_system/
β β βββ tax_compliance/
β β
β βββ algohack-api/ # Backend API (if applicable)
β
βββ .github/workflows/ # CI/CD workflows
βββ docs/ # Documentation
βββ README.md # This file
- Node.js >= 20.0
- npm >= 9.0
- Docker (for local development)
- AlgoKit CLI (install from here)
-
Clone the repository
git clone https://github.com/harsh-a-parihar/AlgoHack.git cd AlgoHack -
Bootstrap the project
algokit project bootstrap all
-
Generate environment files
cd projects/algohack-contracts algokit generate env-file -a target_network localnet -
Build the project
algokit project run build
-
Start the frontend development server
cd projects/algohack-frontend npm run dev -
Deploy smart contracts to localnet
cd projects/algohack-contracts npm run deploy -
Run tests
# Frontend tests cd projects/algohack-frontend npm test # Smart contract tests cd projects/algohack-contracts npm test
- Purpose: Basic prize distribution functionality
- Features: Create distributions, fund contracts, claim prizes
- File:
simple_prize_distribution/contract.algo.ts
- Purpose: Handle multiple prize distributions efficiently
- Features: Batch processing, gas optimization
- File:
batch_distribution/contract.algo.ts
- Purpose: Ensure regulatory compliance
- Features: KYC verification, AML checks
- File:
compliance_oracle/contract.algo.ts
- Purpose: Emergency fund recovery mechanisms
- Features: Multi-sig recovery, time-locked recovery
- File:
emergency_recovery/contract.algo.ts
- Purpose: Secure fund management
- Features: Multi-signature transactions, threshold management
- File:
multisig_wallet/contract.algo.ts
- Purpose: Handle platform fees and revenue sharing
- Features: Fee calculation, automatic distribution
- File:
platform_fee_manager/contract.algo.ts
- Purpose: Track organizer and participant reputation
- Features: Reputation scoring, trust metrics
- File:
reputation_system/contract.algo.ts
- Purpose: Handle tax reporting and compliance
- Features: Tax calculation, reporting generation
- File:
tax_compliance/contract.algo.ts
# Deploy to localnet
cd projects/algohack-contracts
npm run deploy
# Deploy to testnet
algokit deploy --target-network testnet
# Deploy to mainnet
algokit deploy --target-network mainnet- Hero Section: Main landing page with statistics
- Feature Cards: Role-based access (Organizer, Winner, Platform)
- Demo Section: Interactive demonstrations
- Professional UI: Modern, responsive design
- Create Distribution: Set up new prize distributions
- Fund Contract: Add funds to distribution contracts
- Manage Events: Handle event details and winners
- Claim Prizes: Secure prize claiming interface
- Status Checking: Real-time claim status
- Transaction Verification: Blockchain transaction verification
- Devfolio Integration: Seamless Devfolio platform integration
- MLH Integration: Major League Hacking integration
- Custom Platforms: Support for custom platform integrations
- Multi-Wallet Support: Pera, Defly, and other wallets
- Connection Management: Secure wallet connection handling
- Account Management: User account and address management
# Start development server
npm run dev
# Build for production
npm run build
# Run tests
npm test
# Run E2E tests
npm run playwright:test
# Lint code
npm run lint
# Fix linting issues
npm run lint:fix// Create a new distribution
const createDistribution = async (eventName: string, prizeAmount: number, winners: string[]) => {
const response = await appClient.send.createDistribution({
args: {
eventName,
prizeAmount: BigInt(prizeAmount * 1000000), // Convert to microAlgos
winners
}
});
return response;
};
// Fund the distribution
const fundDistribution = async (distributionId: number, amount: number) => {
const response = await appClient.send.fundDistribution({
args: {
distributionId: BigInt(distributionId),
amount: BigInt(amount * 1000000)
}
});
return response;
};
// Claim prize
const claimPrize = async (distributionId: number, amount: number) => {
const response = await appClient.send.claimPrize({
args: {
distributionId: BigInt(distributionId),
amount: BigInt(amount * 1000000)
}
});
return response;
};import { useWallet } from '@txnlab/use-wallet-react';
const { activeAddress, signer, providers } = useWallet();
// Connect wallet
const connectWallet = async () => {
await providers[0].connect();
};
// Sign transaction
const signTransaction = async (transaction: Transaction) => {
return await signer(transaction);
};# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod# Build the project
npm run build
# Deploy to Netlify
# Upload dist/ folder to Netlifycd projects/algohack-contracts
algokit deploy --target-network testnetcd projects/algohack-contracts
algokit deploy --target-network mainnetCreate .env.localnet, .env.testnet, and .env.mainnet files:
# Algorand Configuration
ALGOD_TOKEN=your_algod_token
ALGOD_SERVER=https://testnet-api.algonode.cloud
ALGOD_PORT=443
INDEXER_TOKEN=your_indexer_token
INDEXER_SERVER=https://testnet-idx.algonode.cloud
INDEXER_PORT=443
# Wallet Configuration
WALLET_CONNECT_PROJECT_ID=your_project_id# Unit tests
npm test
# E2E tests
npm run playwright:test
# Coverage report
npm test -- --coverage# Run all tests
npm test
# Watch mode
npm run test:watch
# Coverage
npm test -- --coverageWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Write comprehensive tests
- Update documentation
- Follow the existing code style
- Ensure all tests pass
This project is licensed under the MIT License - see the LICENSE file for details.
- Algorand Foundation for the amazing blockchain platform
- AlgoKit Team for the development framework
- React Team for the frontend library
- Tailwind CSS for the styling framework
- All Contributors who help make this project better
- Documentation: Project Wiki
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: nextmachenic@gmail.com
- Live Demo: https://algohack.vercel.app
- Smart Contracts: Algorand Explorer
- Documentation: Project Wiki
Built with β€οΈ on Algorand
Revolutionizing hackathon prize distribution, one transaction at a time.