Skip to content

Alive24/CKBoost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

369 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CKBoost - Gamified Community Engagement Platform

Important

This project is currently under active development as part of the Nervos Community Catalyst initiative and is not yet ready for production use.

A purpose-built open-source gamified engagement platform for the CKB ecosystem, designed to transform community engagement from scattered, ad-hoc efforts into a structured, rewarding, and measurable system that drives participation, incentivizes real contributions, and encourages ecosystem growth.

๐ŸŽฏ Mission

CKBoost directly supports the goals of the Nervos Community Catalyst initiative by providing the technical backbone for:

  • Structured Engagement: Transform random community efforts into organized campaigns with clear goals
  • Verifiable Contributions: Implement "proof of participation" for all types of community activities
  • Fair Rewards: Distribute on-chain rewards transparently based on actual contributions
  • Ecosystem Growth: Drive both off-chain engagement and on-chain activity through gamification

๐ŸŒŸ Overview

CKBoost addresses key challenges in community management:

  • Inclusive Participation: Reward community members who don't have directly transferable skills for formal tracks
  • Synergized Effort: Coordinate community action across social media, off-chain, and on-chain platforms
  • Fun & Incentivized: Create enthusiasm for participation through gamification and rewards
  • On-Chain Activity: Leverage CKB features and encourage more blockchain interaction

Key Features

  • Campaign & Quest Management: Multi-quest campaigns with on-chain configuration, Nostr-backed submission storage, and admin/staff dashboard for review/approval/reward distribution flows
  • On-Chain Points & Badges: Points UDT and achievement scripts with reward history/leaderboard services tracing mint transactions for transparent payouts;
  • Gamification Elements: Streak bonus and achievement validators in serverless functions, and leaderboard;
  • Anti-Sybil Verification: Telegram login + on-chain binding live in the identity flow, with DID/KYC and other methods on the roadmap
  • Community Tipping: Peer recognition system with democratic approval flow and automated payouts from both community treasury and personal tippers;
  • Comprehensive Dashboards: Platform admin (protocol + approvals), campaign admin (staff + quest reviews), contributor dashboard/leaderboard/profile/tipping views

๐Ÿ—๏ธ Project Structure

CKBoost/
โ”œโ”€โ”€ dapp/                    # Next.js frontend application
โ”‚   โ”œโ”€โ”€ app/                 # App Router pages and layouts
โ”‚   โ”œโ”€โ”€ components/          # Reusable UI components
โ”‚   โ”œโ”€โ”€ lib/                 # Business logic and data management
โ”‚   โ”‚   โ”œโ”€โ”€ types/           # TypeScript type definitions
โ”‚   โ”‚   โ”œโ”€โ”€ mock/            # Development mock data
โ”‚   โ”‚   โ”œโ”€โ”€ ckb/             # Blockchain integration layer
โ”‚   โ”‚   โ”œโ”€โ”€ providers/       # React context providers
โ”‚   โ”‚   โ””โ”€โ”€ services/        # Data service abstraction
โ”‚   โ”œโ”€โ”€ netlify/functions/   # Serverless APIs (social interactions, achievements, streaks, staff approvals, Telegram auth)
โ”‚   โ””โ”€โ”€ ...                  # Standard Next.js structure
โ”œโ”€โ”€ contracts/               # Smart contracts
โ”‚   โ”œโ”€โ”€ contracts/           # Individual contract implementations
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-achievement-type/    # Achievement management logic
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-campaign-type/    # Campaign management logic
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-funding-lock/    # Secure fund vaults
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-protocol-type/    # Governance
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-protocol-lock/    # Protocol governance
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-user-type/        # Submission, verification, and social bindings
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-points-udt/       # Points UDT for rewards
โ”‚   โ”‚   โ”œโ”€โ”€ ckboost-tipping-type/       # tipping management
โ”‚   โ”‚   โ””โ”€โ”€ ckboost-shared/           # Common utilities
โ”‚   โ””โ”€โ”€ tests/               # Integration tests
โ”œโ”€โ”€ docs/                    # Documentation and specifications
โ”‚   โ”œโ”€โ”€ recipes/             # Transaction skeleton definitions
โ”‚   โ””โ”€โ”€ *.prd.txt           # Product requirements documents
โ””โ”€โ”€ schemas/                 # Molecule schema definitions

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+ with pnpm
  • Rust toolchain for contract development
  • CKB Node for blockchain interaction (development/testnet)

Quick Start

  1. Clone the repository

    git clone https://github.com/Alive24/CKBoost.git
    cd CKBoost
  2. Start the application (dApp and serverless functions)

    Set dapp/.env.local (RPC/indexer URLs, NEXT_PUBLIC_SSRI_EXECUTOR_URL, NEXT_PUBLIC_PROTOCOL_TYPE_ARGS from deployment-summary.md or deployments.json, NEXT_PUBLIC_TELEGRAM_BOT_USERNAME, etc.) using dapp/DEPLOYMENT.md as a reference.

    cd dapp
    netlify dev

    The application will be available at http://localhost:9003 (depending on the port you set in dapp/netlify.toml)

  3. Build smart contracts (optional for frontend development)

    cd contracts
    make build

๐Ÿ› ๏ธ Technical Architecture

Decentralized Design Philosophy

CKBoost implements a new pattern of decentralization for dApps:

  • Serverless Functions Backend: Serverless functions in-repo shipped alongside the dApp; no need to host them on private servers.
  • Transparent Infrastructure: All modules and code are open-sourced, and complete for anyone to deploy its own instance;deployment records/logs publicly available for transparency and auditability.
  • Decentralized Data Storage: CKB Cell data for all on-chain states; Nostr relays for metadata and content; local cache in serverless functions for performance optimization.

Technology Stack

Frontend (dApp)

  • Framework: Next.js 15 with App Router
  • Styling: Tailwind CSS with shadcn/ui components
  • State Management: React Context with CKB CCC integration
  • Wallet Integration: @ckb-ccc/connector-react for universal wallet support
  • Data Layer: Abstracted service layer supporting mock and blockchain data with Nostr-backed off-chain submissions and social interactions

Smart Contracts

  • ckboost-protocol-type: Governance & Points UDT minting
  • ckboost-protocol-lock: Protocol governance and treasury management
  • ckboost-campaign-type: Campaign logic and quest management
  • ckboost-funding-lock: Secure vaults for campaign funds
  • ckboost-user-type: Submission, verification, and social bindings
  • ckboost-points-udt: Points UDT for rewards
  • ckboost-tipping-type: Tipping management

Decentralized API Services

  • Infrastructure: Netlify Functions in this repo (social interactions, streak/achievement validators, Telegram auth, staff approvals, reward history) with optional Cloudflare Worker deployment
  • Hosting: By campaign sponsors and community members
  • Purpose: Indexing, proof validation, staff approvals, and coordination

Data Storage Strategy

  • Critical State: CKB Cell data for all on-chain states and reference to off-chain data;
  • Non-Critical Data: Nostr relays for metadata and content;
  • Performance: local cache in serverless functions for performance optimization.

๐Ÿ“‹ Core User Flows

Campaign Creation Flow

Define quests โ†’ Fund campaign (CKB/UDT) โ†’ Assign staff reviewers โ†’ Get admin approval via protocol dashboard โ†’ Launch with Connected Type IDs โ†’ Monitor submissions/approvals โ†’ Distribute rewards

Contributor Flow

Connect wallet โ†’ Complete Telegram verification โ†’ Browse campaigns โ†’ Complete tasks โ†’ Submit proof (stored via Nostr) โ†’ Pass staff approval โ†’ Claim rewards/points โ†’ Earn badges & ranking

Tipping Flow

Propose tip with event link โ†’ Receive peer approvals โ†’ On-chain funding + explorer link โ†’ Permanent profile record with Nostr comments/likes

Admin Flow

Identity verification โ†’ Campaign sponsor verification โ†’ Protocol/campaign approval โ†’ Staff approvals + quest reviews โ†’ Base campaign creation

๐ŸŽฎ Example Campaign Types

  • AMA Boost: Points for questions, shares, and Nervos discussion amplification
  • Knowledge Boost: Share and summarize Knowledge Base articles
  • On-Chain Quests: Lock CKB for iCKB, add DEX liquidity, interact with DeFi
  • Community Governance: Engage with proposals and provide feedback

๐Ÿ” Security & Risk Management

Security Measures

  • Escrow Protection: Funding lock scripts protect all escrowed assets
  • Multi-Signature: Support for high-value campaign management
  • Time Locks: Campaign duration enforcement and deadline management
  • Gradual Rollout: Small initial contract funds with progressive scaling and stricter transaction input validation across core scripts

Anti-Sybil Protection

  • Locked Rewards: Rewards remain locked until verification passes
  • Multi-Method Verification: Telegram, DID, KYC, and manual review options
  • Reputation System: Build trust through consistent participation

๐Ÿ“ˆ Development Roadmap

Milestone 1: Foundation & Core MVP (~Month 1)

  • โœ… Next.js scaffold with CCC wallet integration
  • โœ… Visual and interaction prototyping
  • โœ… Smart contract development for core scripts (campaign, user, protocol, funding, points, tipping, achievement all implemented and testnet-deployed)
  • โœ… Campaign & quest creation flows (platform/campaign admin dashboards, Nostr-backed submissions, staff approvals)
  • ๐Ÿ”„ Points UDT and reward distribution (UDT deployed with reward history + leaderboard services; automated distribution in tuning)

Milestone 2: Advanced Features (~Month 2)

  • ๐Ÿ”„ Expanded verification methods (Telegram bot + on-chain binding live; DID/KYC next)
  • โœ… Leaderboards and user profiles (dashboard/profile pages wired to chain data and reward history)
  • ๐Ÿ”„ Gamification features (streaks, multipliers, badges) with streak bonus + achievement validators shipped
  • โœ… Tipping system with peer approvals (tipping proposals, approvals, Nostr comments/likes, explorer links)
  • โœ… Admin dashboard and analytics (protocol + campaign admin consoles, staff review queues, tipping stats)

Milestone 3: Launch Preparation (~Month 3)

  • ๐Ÿ“… Deploy test campaigns with real users
  • ๐Ÿ”„ Automated on-chain verification (transaction validation and proxy handling added; end-to-end automation pending)
  • ๐Ÿ”„ Documentation and onboarding guides (deployment summary + Netlify/Telegram setup in place; broader docs in progress)
  • ๐Ÿ“… Final testing and optimization
  • ๐Ÿ“… Community feedback integration

๐Ÿ’ฐ Funding

This project is funded by the CKB Community Fund DAO:

  • Total Grant: $20,000 USD
  • Payment Structure: 10% upfront, 90% across 3 milestones
  • Timeline: 3 months from commencement
  • Purpose: Support design, development, and deployment of CKBoost

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following the coding standards
  4. Add tests for new functionality
  5. Submit a pull request with clear description

Development Standards

  • TypeScript: Strict type checking enabled
  • Code Quality: ESLint/Prettier for formatting
  • Commits: Conventional commit format
  • Testing: High coverage for critical paths

๐Ÿ“š Documentation

For Users

  • Campaign Creation Guide: How to launch engaging campaigns
  • Quest Participation: How to complete quests and earn rewards
  • Verification Guide: Understanding identity requirements
  • Tipping System: How to recognize exceptional contributions

For Developers

  • Architecture Overview: Understanding the decentralized design
  • Contract Interface: Smart contract specifications
  • API Documentation: Decentralized service APIs
  • Integration Guide: Adding CKBoost to your project

Key Resources

Utilities

Size Analysis

cargo bloat --release --target riscv64imac-unknown-none-elf --crates --package ckboost-campaign-type

๐ŸŒ Deployment

Netlify Frontend

# Automatic deployment on push to main branch
git push origin main

Netlify Functions (Telegram auth, staff approvals, streak/achievement validators, social interactions, reward history) deploy alongside the frontend build; use netlify dev to run them locally.

Decentralized Services

# Serverless APIs (Netlify Functions) shipped in this repo
cd dapp
netlify dev --functions netlify/functions

# Optional: deploy Cloudflare Worker variant
# cd services
# wrangler deploy

Smart Contracts

cd contracts
make deploy-testnet    # Deploy to CKB testnet
make deploy-mainnet    # Deploy to CKB mainnet

Type IDs and code hashes are tracked in deployments.json; copy the protocol type args into NEXT_PUBLIC_PROTOCOL_TYPE_ARGS for the dApp.

๐Ÿ†˜ Support & Community

๐Ÿ™ Acknowledgments

  • Nervos Community Catalyst for sponsoring this initiative
  • CKB Community Fund DAO for funding support
  • Nervos Foundation for the innovative CKB blockchain
  • Community Contributors who make this project possible

๐Ÿ“„ License

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


Built with โค๏ธ by Alive24 for the Nervos Community

About

Gamified Community Engagement Platform built proudly with CKB and other decentralized technology

Resources

Stars

2 stars

Watchers

2 watching

Forks

Contributors