๐ Celo Engage Hub - Social Engagement Platform
https://img.shields.io/badge/Celo-Mainnet-gold https://img.shields.io/badge/License-MIT-yellow.svg https://img.shields.io/github/stars/tebberen/celo-engage-hub https://img.shields.io/github/forks/tebberen/celo-engage-hub https://img.shields.io/github/issues/tebberen/celo-engage-hub https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Ftebberen%2Fcelo-engage-hub
Social TX - Where Every Interaction Builds Real Value A decentralized social engagement platform built on Celo blockchain that rewards meaningful community interactions through governance, badges, and social verification.
๐ Table of Contents
ยท ๐ Introduction ยท ๐ Features ยท ๐๏ธ Architecture ยท ๐ฆ Installation ยท ๐ฎ Quick Start ยท ๐ง Smart Contracts ยท ๐ ๏ธ Development ยท ๐งช Testing ยท ๐ API Documentation ยท ๐ Deployment ยท ๐ค Contributing ยท ๐ License ยท ๐ Acknowledgments Base
๐ Introduction
Celo Engage Hub is a groundbreaking social platform that leverages blockchain technology to create a trustless, community-driven ecosystem. Built on the Celo network, it combines social interactions with on-chain governance and reputation systems.
๐ฏ Problem Statement
Traditional social platforms suffer from:
ยท Centralized control and censorship ยท Lack of transparency in content moderation ยท No real ownership or rewards for users ยท Limited community governance
๐ก Our Solution
ยท Decentralized Governance: Community-driven proposal and voting system ยท Social Verification: Support-based content curation ยท Monetization & Rewards: Badge-based achievement system ยท Transparent Operations: Fully on-chain interactions
๐ Features
๐ก๏ธ Social Verification System
ยท Support-Based Submission: Users must support existing content before submitting their own ยท Community Curation: Content visibility determined by community engagement ยท Anti-Spam Mechanism: Limits and verification prevent platform abuse
๐๏ธ On-Chain Governance
ยท Proposal Creation: Any user can create governance proposals ยท Transparent Voting: Verifiable on-chain voting with Celo transactions ยท Community Decisions: Platform evolution driven by user votes
๐๏ธ Badge & Reputation System
ยท Achievement Tracking: Earn badges for platform participation ยท Reputation Scoring: Build reputation through quality contributions ยท Soulbound Tokens: Non-transferable achievement badges (future)
๐ฐ Gas Optimization
ยท Efficient Transactions: Optimized for Celo's low-gas environment ยท Batch Operations: Multiple actions in single transactions ยท Gas Estimation: Accurate gas prediction for better UX
๐ Multi-Platform Integration
ยท Social Media Links: Support for X, Farcaster, GitHub, and more ยท Cross-Platform Verification: Unified identity across platforms ยท Content Syndication: Share across multiple platforms seamlessly
๐ Advanced Wallet Integration
ยท MetaMask Support: Full MetaMask compatibility ยท Celo Native Wallets: Support for Valora, Celo Wallet ยท Network Switching: Automatic Celo network detection and switching
๐๏ธ Architecture
System Overview
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Frontend โ โ Smart Contract โ โ Celo Network โ
โ (Client) โ โ (Middleware) โ โ (Blockchain) โ
โโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโค
โ โข HTML/CSS/JS โโโโโบโ โข User Registry โโโโโบโ โข Transactions โ
โ โข Ethers.js โ โ โข Governance โ โ โข Smart Contractsโ
โ โข LocalStorage โ โ โข Badge System โ โ โข CELO/cUSD โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Technology Stack
ยท Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+) ยท Blockchain: Celo Network (Mainnet & Alfajores Testnet) ยท Web3 Library: Ethers.js v5.7.2 ยท Wallet Integration: MetaMask, Celo-Compatible Wallets ยท Storage: Browser LocalStorage + On-chain Storage ยท Styling: Custom CSS with Celo Brand Colors
Smart Contract Architecture
// Core Contract Structure
CeloEngageHub.sol
โโโ UserRegistry
โ โโโ registerUser()
โ โโโ updateProfile()
โ โโโ getUserProfile()
โโโ Governance
โ โโโ createProposal()
โ โโโ voteProposal()
โ โโโ getProposalDetails()
โโโ BadgeSystem
โ โโโ awardBadge()
โ โโโ getUserBadges()
โ โโโ checkEligibility()
โโโ Utilities
โโโ checkUserActive()
โโโ getPlatformStats()๐ฆ Installation
Prerequisites
ยท Node.js (v16 or higher) ยท npm or yarn ยท MetaMask or Celo-compatible wallet ยท Celo tokens for gas fees
Step-by-Step Installation
# 1. Clone the repository
git clone https://github.com/tebberen/celo-engage-hub.git
# 2. Navigate to project directory
cd celo-engage-hub
# 3. Install dependencies (if any added in future)
npm install
# 4. Start local development server
npm run dev
# 5. Open browser and navigate to
# http://localhost:3000Docker Installation (Optional)
# Build Docker image
docker build -t celo-engage-hub .
# Run container
docker run -p 3000:3000 celo-engage-hub๐ฎ Quick Start
For End Users
- Connect Your Wallet ยท Click "Connect MetaMask" button ยท Approve connection request ยท Switch to Celo Mainnet when prompted
- Support Community Content ยท Browse existing links in the support section ยท Click "Support This Content" on at least one item ยท This unlocks your submission privileges
- Submit Your Content ยท Enter your social media link (X, Farcaster, GitHub, etc.) ยท Confirm transaction in your wallet ยท Pay gas fee (typically < $0.01 on Celo)
- Participate in Governance ยท Create proposals for platform improvements ยท Vote on active proposals ยท Shape the future of the platform
- Earn Badges ยท Receive badges for active participation ยท Build your reputation score ยท Unlock special privileges
For Developers
// Quick integration example
const engageHub = {
connect: async () => {
if (typeof window.ethereum !== 'undefined') {
await window.ethereum.request({ method: 'eth_requestAccounts' });
const provider = new ethers.providers.Web3Provider(window.ethereum);
return provider.getSigner();
}
},
submitLink: async (link) => {
const contract = new ethers.Contract(CONTRACT_ADDRESS, ABI, signer);
const tx = await contract.registerUser("username", link);
return await tx.wait();
}
};๐ง Smart Contracts
Contract Addresses
ยท Mainnet: 0x22eA49c074098931a478F381f971C77486d185b2 ยท Alfajores Testnet: Deploying Soon
Core Functions
User Management
function registerUser(string memory _username, string memory _link) public
function updateProfile(string memory _username, string memory _link) public
function getUserProfile(address _user) public view returns (
string memory link,
string memory username,
uint256 supportCount,
uint256 reputation,
uint256 badgeCount,
bool isActive,
uint256 timestamp
)Governance
function createProposal(string memory _title, string memory _description) public
function voteProposal(uint256 _proposalId, bool _support) public
function getActiveProposals() public view returns (uint256[] memory)
function getProposalDetails(uint256 _proposalId) public view returns (
uint256 id,
string memory title,
string memory description,
address creator,
uint256 votesFor,
uint256 votesAgainst,
uint256 deadline,
bool executed
)Badge System
function awardBadge(address _user, string memory _badge) public
function getUserBadges(address _user) public view returns (string[] memory)
function revokeBadge(address _user, string memory _badge) publicEvents
event UserRegistered(address indexed user, string username);
event ProposalCreated(uint256 indexed proposalId, string title, address creator);
event Voted(uint256 indexed proposalId, address indexed voter, bool support);
event BadgeAwarded(address indexed user, string badge);๐ ๏ธ Development
Setting Up Development Environment
- Fork the Repository
# Fork on GitHub, then clone your fork git clone https://github.com/YOUR_USERNAME/celo-engage-hub.git cd celo-engage-hub
- Install Development Dependencies
npm install --save-dev live-server gh-pages
- Run Development Server
npm run dev
Building for Production
# Build optimized version
npm run build
# Deploy to GitHub Pages
npm run deployCode Structure
src/
โโโ index.html # Main application entry point
โโโ css/
โ โโโ style.css # All styles and responsive design
โโโ js/
โ โโโ app.js # Main application logic
โ โโโ wallet.js # Wallet connection and management
โ โโโ contract.js # Smart contract interactions
โ โโโ ui.js # User interface controls
โโโ contracts/
โ โโโ CeloEngage.sol # Smart contract source
โโโ tests/
โโโ test.js # Test suites
๐งช Testing
Smart Contract Testing
# Run contract tests
npx hardhat test
# Run tests with coverage
npx hardhat coverageFrontend Testing
// Example test case
describe('Celo Engage Hub', () => {
it('should connect wallet successfully', async () => {
const result = await connectWallet();
expect(result).toBe(true);
});
it('should submit link with proper validation', async () => {
const link = 'https://github.com/tebberen';
const result = await submitLink(link);
expect(result.status).toBe('success');
});
});Integration Testing
# Run full test suite
npm test
# Run specific test group
npm run test:contracts
npm run test:frontend๐ API Documentation
JavaScript SDK
Initialization
import CeloEngageHub from 'celo-engage-hub';
const hub = new CeloEngageHub({
network: 'mainnet', // or 'alfajores'
contractAddress: '0x22eA49c074098931a478F381f971C77486d185b2'
});Core Methods
connectWallet()
// Connect user's wallet
const userAddress = await hub.connectWallet();submitContent(link, platform)
// Submit new content
const result = await hub.submitContent(
'https://github.com/tebberen',
'github'
);getUserProfile(address)
// Get user profile
const profile = await hub.getUserProfile('0x...');REST API (Future)
# Get platform statistics
GET /api/stats
# Get user profile
GET /api/users/:address
# Get active proposals
GET /api/proposals/active๐ Deployment
GitHub Pages Deployment
The project is automatically deployed to GitHub Pages:
ยท Live URL: https://tebberen.github.io/celo-engage-hub/ ยท Branch: main ยท Auto-deploy: On every push to main
Manual Deployment
# Build project
npm run build
# Deploy to any static hosting
# Netlify, Vercel, AWS S3, etc.Smart Contract Deployment
# Deploy to Celo Mainnet
npx hardhat run scripts/deploy.js --network celo
# Deploy to Alfajores Testnet
npx hardhat run scripts/deploy.js --network alfajores๐ค Contributing
We love your input! We want to make contributing to Celo Engage Hub as easy and transparent as possible.
How to Contribute
- Fork the repo and create your branch from main
- Make your changes and test thoroughly
- Follow our code style and add tests if applicable
- Submit a pull request with clear description of changes
Development Workflow
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes and commit
git add .
git commit -m "feat: add amazing feature"
# Push and create PR
git push origin feature/amazing-featureReporting Bugs
ยท Use the GitHub Issues template ยท Describe the bug and steps to reproduce ยท Include browser/device information
Suggesting Enhancements
ยท Open an issue with enhancement label ยท Explain the proposed feature ยท Discuss implementation approach
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Permitted Use:
ยท โ Commercial use ยท โ Modification ยท โ Distribution ยท โ Private use
Requirements:
ยท โน๏ธ License and copyright notice preservation
๐ Acknowledgments
Core Team
ยท tebberen - Project Lead & Full-stack Development
Special Thanks
ยท Celo Foundation for ecosystem support and builder rewards ยท Celo Community for testing, feedback, and support ยท Builder Rewards Program for incentivizing quality development
Technologies & Tools
ยท Celo Blockchain - Green, mobile-first blockchain ยท Ethers.js - Complete Ethereum wallet implementation ยท MetaMask - Crypto wallet & gateway to blockchain apps ยท GitHub Pages - Static site hosting
Inspiration
This project draws inspiration from:
ยท Social media platforms with community governance ยท Blockchain-based reputation systems ยท DAO (Decentralized Autonomous Organization) models
https://img.shields.io/github/stars/tebberen/celo-engage-hub?style=social https://img.shields.io/github/forks/tebberen/celo-engage-hub?style=social
Built with โค๏ธ for the Celo Ecosystem