Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Obiajulu-gif/QuestHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

29 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

QuestHub: Interactive Learning Platform with Sensay AI Integration

โœจ Overview

QuestHub is an innovative and gamified learning platform designed to transform educational experiences. By seamlessly integrating Sensay AI's Replica technology and the QuestBot API, QuestHub offers a truly immersive and personalized journey through quizzes, riddles, and creative challenges. At its heart is "Winks", a dynamic AI-powered blockchain educator and game guide, leveraging Sensay's capabilities to provide adaptive learning and engaging interactions.

๐Ÿ“บ Click here to watch the QuestHub demo video on Google Drive


๐Ÿง  Sensay AI Integration & Replica Technology

QuestHubโ€™s intelligence is powered by Sensay AI's Replica engine, enabling the creation of โ€œWinksโ€ โ€” your personal AI quest copilot.

Core Components

  • AI-Powered Copilot (Winks): A sophisticated Replica instance acting as a blockchain expert, game host, and educator.
  • Contextual Awareness: Maintains conversation history and game state for coherent, continuous learning.
  • Adaptive Learning: Dynamically adjusts challenge difficulty and feedback based on user performance.

Replica Configuration (PowerShell)

$replicaPayload = @{
    name = "QuestBot Host"
    shortDescription = "Knowledgeable host for QuestBot games"
    greeting = "Welcome to QuestBot! Your guide for exciting challenges."
    slug = "winks_v1"
    ownerID = $userId
    type = "character"
    tags = @("Education", "Web3", "Blockchain", "Games")
    llm = @{
        model = "claude-3-5-haiku-latest"
        memoryMode = "prompt-caching"
        systemMessage = "As Winks, provide engaging blockchain guidance, ask questions, and offer encouraging feedback. Maintain a friendly, helpful, and slightly playful tone. Never reveal answers directly; always guide the user to discover them."
    }
}

๐ŸŽฎ Game Modules

API Endpoint: QuestHub Games

Module API Endpoint Key Features
Quiz Engine /api/quiz/question Adaptive questions, progress tracking, MCQ and fill-in-the-blank formats
Riddle System /api/riddle Multi-attempt logic puzzles, wordplay hints, escalating difficulty
Creative Challenges /api/prompt Open-ended tasks, PDF submissions, detailed AI feedback
Knowledge Boost /api/fun-fact Quick blockchain trivia and "Did you know?" facts in context

๐Ÿ› ๏ธ Technical Stack

  • Frontend: React.js (Next.js Framework)
  • Styling: Tailwind CSS
  • State Management: React Context API
  • AI Integration: Sensay SDK + QuestBot API
  • Deployment: Vercel

Project Structure

QuestHub/
โ”œโ”€โ”€ app/                  # Next.js routes and pages
โ”œโ”€โ”€ components/           # UI components
โ”œโ”€โ”€ contexts/             # Global state management
โ”œโ”€โ”€ utils/                # Utility functions and API handlers
โ””โ”€โ”€ sensay-sdk/           # Sensay API integration layer

๐Ÿš€ Quick Start

Prerequisites

  • Node.js (v18+)
  • npm (v9+)
  • Git

Installation

git clone https://github.com/Obiajulu-gif/QuestHub.git
cd QuestHub
npm install --legacy-peer-deps

Configuration

Create .env.local and add:

SENSAY_API_KEY=your_api_key_here
NEXT_PUBLIC_SENSAY_API_KEY_SECRET=your_secret_key_here

Initialize Replica

powershell -ExecutionPolicy Bypass -File .\create-sensay-replica.ps1

Run Locally

npm run dev
# Navigate to http://localhost:3000

๐ŸŒ Deployment Architecture

graph TD
    A["User Interface<br/>(Next.js Frontend)"] --> B["Game Services<br/>(Next.js API Routes)"]
    B --> C["Sensay AI<br/>(Winks Replica)"]
    C --> D["Blockchain Network<br/>(Data & Transactions)"]
    C --> E["Knowledge Base<br/>(Sensay AI Data)"]
    B --> F["User Progress Tracking<br/>(Database)"]
    F --> A
Loading

๐Ÿ” AI Copilot Features

Beyond just guiding, Winks acts as an intelligent AI Copilot, providing dynamic assistance and feedback.

Contextual Assistance:

Winks offers tailored guidance based on the active game module, ensuring relevant and helpful prompts:

  • Quiz: "Think carefully โ€” sometimes the best answer isnโ€™t obvious."
  • Riddles: "Look for double meanings or clever wordplay!"
  • Creative: "Structure your response clearly: intro, main idea, conclusion."

Feedback System

function generateFeedback(attempt) {
    const accuracy = calculateAccuracy(attempt);
    const complexity = assessComplexity(attempt);

    let feedbackMessage = `Great effort! Your solution shows **${accuracy}% alignment** with core concepts. `;

    if (accuracy < 50) {
        feedbackMessage += "Let's review the basics together. What part felt most challenging?";
    } else if (accuracy < 80) {
        feedbackMessage += `You're almost there! Try ${complexity > 0.7 ? 'simplifying' : 'expanding on'} key areas to refine your understanding.`;
    } else {
        feedbackMessage += "Excellent work! You've grasped the concept beautifully. Ready for the next challenge?";
    }
    return feedbackMessage;
}

๐Ÿ“Œ Key Integration Points

Seamless integration with Sensay AI and other services is achieved through carefully designed interaction points.

  1. Context Propagation: Enriching API requests with user-specific metadata allows Winks to provide highly personalized interactions.
function enhanceContext(request) {
    const userLevel = getLevel(request.userId);
    const lastActivity = getLastSession(request.userId);
    const currentStreak = getStreak(request.userId);

    return {
        ...request,
        metadata: {
            userLevel,
            lastActivity,
            currentStreak
        }
    };
}

๐Ÿšง Future Roadmap

  • User-Generated Replica Templates
  • Cross-Platform Progress Sync
  • AI Challenge Creator Toolkit
  • Multi-Language Support (35+ languages)

Upcoming Features

  • Personal replica branding
  • Custom knowledge domain uploads
  • Leaderboard integration
  • Multi-AI replica collaboration

๐Ÿค Contributing

  1. Fork the repo
  2. Create a branch: git checkout -b feature/your-feature-name
  3. Commit: git commit -m 'feat: Add feature'
  4. Push: git push origin feature/your-feature-name
  5. Open a Pull Request ๐ŸŽ‰

๐Ÿ“„ License & Attribution

Licensed under MIT. Uses Sensay AI.


๐Ÿ“ง Contact

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •