Skip to content

these docs include game design, user experience strategy, technical architecture, and business planning.

Notifications You must be signed in to change notification settings

dhaniverse/dhaniverse-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Dhaniverse: Gamified Financial Education Platform

Dhaniverse Logo

๐ŸŒŸ Overview

Dhaniverse is a revolutionary 2D RPG that transforms financial education through gamification and blockchain technology. Built on the Internet Computer Protocol (ICP), it makes Web3 finance accessible, engaging, and educational for everyone.

"The First 2D RPG That Teaches Real Financial Literacy While Using Actual Blockchain Technology"


๐Ÿ—๏ธ Architecture

Dual Storage Strategy

  • Traditional Backend: Deno servers for REST API and WebSocket services
  • Blockchain Integration: ICP canister for decentralized financial operations
  • Progressive Enhancement: All features work without blockchain, enhanced with ICP

Tech Stack

  • Frontend: React + TypeScript + Phaser 3 game engine
  • Backend Services:
    • REST API Server (server/game/) - Port 8000
    • WebSocket Server (server/ws/) - Port 8001
  • Blockchain: ICP canister in Rust (packages/icp-canister/)
  • Database: MongoDB for traditional data storage
  • Map System: Custom chunked loading with AES-256 encryption

๐Ÿš€ Core Features

๐ŸŽฎ Game Engine (Phaser 3)

  • Real-time Multiplayer: WebSocket-based player synchronization
  • 2D RPG World: Complete with NPCs, buildings, collision detection
  • Dynamic Systems: Zoom management, chunked map loading
  • Character System: Multiple skins and avatar customization
  • Chat System: Real-time communication with skin/avatar display

๐ŸŽ“ Educational Systems

Tutorial & Onboarding

  • Maya NPC Guide: Interactive tutorial system
  • Progressive Learning: Step-by-step financial literacy journey
  • Configurable Onboarding: Toggle different tutorial modules
  • Achievement Tracking: Gamified learning milestones

Financial Simulation

  • Banking System: Dual currency (Rupees โ†” Tokens) with real-time exchange
  • ATM Integration: Realistic deposit/withdrawal mechanics
  • Fixed Deposits: Time-based investment simulation
  • Transaction History: Complete audit trail with balance tracking

๐Ÿ“ˆ Stock Market Simulator

  • Real Market Data: Live integration with actual stock prices
  • Portfolio Management: Buy/sell stocks, track holdings and performance
  • Market Analysis: P/E ratios, volatility, debt-equity ratios, market cap
  • News Integration: Stock-specific news feeds and market updates
  • Market Status: Bull/bear trends, market hours simulation
  • Advanced Metrics: EPS, outstanding shares, industry comparisons

๐Ÿ† Achievement & Gamification

  • Multi-Category Achievements: Trading, Saving, Learning
  • Reward System: Earn rupees/tokens for milestones
  • Rarity Levels: Common, Rare, Epic, Legendary achievements
  • Progress Tracking: Detailed analytics and progression metrics

๐Ÿ”— ICP Blockchain Integration

Smart Contract Features (Canister: 2v55c-vaaaa-aaaas-qbrpq-cai)

๐Ÿ” Authentication & Wallet Management

// Wallet-based authentication
authenticate_with_signature(address: String, signature: String) -> Result<AuthResult, String>

// Session management  
create_session(wallet_connection: WalletConnection) -> Result<Web3Session, String>
clear_session(wallet_address: String) -> Result<(), String>

// Multi-wallet support (MetaMask, Phantom, Coinbase, WalletConnect)
connect_wallet(wallet_type: WalletType, address: String, chain_id: String) -> Result<WalletConnection, String>

๐Ÿ’ฐ Banking & Financial Operations

// Balance management
get_dual_balance(wallet_address: String) -> Result<DualBalance, String>

// Currency exchange
exchange_currency(wallet_address: String, from_currency: String, to_currency: String, amount: f64) -> Result<ExchangeResult, String>

// Transaction recording
create_transaction(wallet_address: String, transaction_type: TransactionType, amount: f64, to_address: Option<String>) -> Result<Web3Transaction, String>

๐ŸŒพ DeFi Simulations

// Liquidity pool simulation
simulate_liquidity_pool(wallet_address: String, amount: f64) -> Result<f64, String>

// Yield farming simulation  
simulate_yield_farming(wallet_address: String, amount: f64) -> Result<f64, String>

๐ŸŽฏ Achievement System

// Achievement tracking
get_achievements(wallet_address: String) -> Vec<Achievement>

// Reward claiming
claim_achievement_reward(wallet_address: String, achievement_id: String) -> Result<AchievementReward, String>

๐Ÿ“ก Real-time Features (Server-Sent Events)

// Stock market broadcasts
broadcast_stock_update(symbol: String) -> Result<u64, String>
broadcast_market_summary() -> Result<u64, String>

// Multiplayer communication  
sse_broadcast_peer_joined(room_id: String, user_id: String, metadata: Vec<(String, String)>) -> Result<u64, String>

๐Ÿค– AI-Powered Features

๐Ÿง  Current AI Integration

  • Market Prediction Game: Users compete against AI predictions
  • Real-time Stock Analysis: AI-driven market trend analysis

๐Ÿš€ Planned AI Enhancements

1. AI Financial Advisor ๐ŸŽฏ

  • Personalized Recommendations: AI analyzes user behavior and risk tolerance
  • Portfolio Optimization: Automated suggestions for better diversification
  • Risk Assessment: Real-time risk analysis with actionable insights
  • Goal-Based Planning: AI helps users set and achieve financial goals
// ICP Canister AI Functions
#[ic_cdk::update]
async fn get_ai_recommendation(wallet_address: String, portfolio_data: PortfolioData) -> Result<AIRecommendation, String>

#[ic_cdk::query]
fn calculate_risk_score(wallet_address: String) -> Result<RiskScore, String>

2. Intelligent Tutoring System ๐ŸŽ“

  • Adaptive Learning: AI adjusts difficulty based on user progress
  • Personalized Curriculum: Custom learning paths for different user types
  • Concept Reinforcement: AI identifies weak areas and provides targeted practice
  • Learning Analytics: Detailed insights into learning patterns and effectiveness
// Frontend AI Integration
class AITutor {
  async getNextLesson(userId: string, progress: LearningProgress): Promise<Lesson>
  async identifyWeakAreas(userId: string): Promise<ConceptArea[])
  async generatePracticeQuestions(concept: string, difficulty: number): Promise<Question[]>
}

3. Advanced Market Intelligence ๐Ÿ“Š

  • Sentiment Analysis: AI analyzes news and social media for market sentiment
  • Pattern Recognition: AI identifies trading patterns and opportunities
  • Anomaly Detection: Unusual market movements flagged by AI
  • Predictive Modeling: Advanced forecasting models for educational purposes
// Market AI Functions
#[ic_cdk::update]
async fn analyze_market_sentiment(symbol: String) -> Result<SentimentAnalysis, String>

#[ic_cdk::query] 
fn detect_trading_patterns(wallet_address: String) -> Result<Vec<TradingPattern>, String>

#[ic_cdk::update]
async fn predict_price_movement(symbol: String, timeframe: u64) -> Result<PricePrediction, String>

4. Natural Language Financial Assistant ๐Ÿ’ฌ

  • Chat-based Queries: Ask questions about stocks, finances in plain English
  • Document Analysis: AI explains financial terms and concepts
  • News Summarization: AI creates digestible summaries of complex financial news
  • Voice Commands: Voice-activated trading and account management
// AI Chat System
interface AIAssistant {
  processNaturalLanguageQuery(query: string): Promise<AssistantResponse>
  explainFinancialConcept(concept: string): Promise<ConceptExplanation>
  summarizeMarketNews(articles: NewsArticle[]): Promise<NewsSummary>
  executeVoiceCommand(audio: AudioData): Promise<CommandResult>
}

5. AI-Driven Gamification ๐ŸŽฎ

  • Dynamic Difficulty: AI adjusts game difficulty to maintain engagement
  • Personalized Challenges: Custom quests based on user interests and skill level
  • Behavioral Nudges: AI-powered prompts to encourage good financial habits
  • Social Matching: AI pairs users with similar learning goals
// Gamification AI
#[ic_cdk::update]
async fn generate_personalized_quest(wallet_address: String, user_profile: UserProfile) -> Result<Quest, String>

#[ic_cdk::query]
fn calculate_optimal_difficulty(wallet_address: String, skill_metrics: SkillMetrics) -> Result<DifficultyLevel, String>

#[ic_cdk::update]
async fn suggest_behavioral_nudge(wallet_address: String, recent_activity: Vec<UserAction>) -> Result<BehavioralNudge, String>

6. Fraud Detection & Security ๐Ÿ”’

  • Transaction Monitoring: AI detects suspicious trading patterns
  • Account Security: Behavioral biometrics for enhanced security
  • Risk Alerts: Proactive warnings about potentially risky investments
  • Compliance Monitoring: AI ensures educational content meets regulations
// Security AI Functions
#[ic_cdk::query]
fn analyze_transaction_risk(transaction: TransactionData) -> Result<RiskLevel, String>

#[ic_cdk::update]
async fn detect_anomalous_behavior(wallet_address: String, user_actions: Vec<UserAction>) -> Result<AnomalyReport, String>

7. Predictive Learning Analytics ๐Ÿ“ˆ

  • Dropout Prediction: AI identifies users at risk of abandoning the platform
  • Success Forecasting: Predict which users will achieve learning goals
  • Engagement Optimization: AI optimizes content delivery timing
  • Retention Modeling: AI-driven strategies to improve user retention
// Learning Analytics AI
interface PredictiveAnalytics {
  predictUserDropout(userId: string): Promise<DropoutProbability>
  forecastLearningSuccess(userId: string, goal: LearningGoal): Promise<SuccessPrediction>
  optimizeContentDelivery(userId: string): Promise<OptimalSchedule>
  generateRetentionStrategy(userSegment: UserSegment): Promise<RetentionPlan>
}

8. AI Market Maker for Educational Trading ๐Ÿฆ

  • Simulated Liquidity: AI provides realistic trading conditions
  • Educational Price Discovery: AI creates realistic market scenarios
  • Fair Pricing: AI ensures educational trades reflect real market conditions
  • Market Making: AI acts as counterparty for educational trades
// AI Market Maker
#[ic_cdk::update]
async fn get_ai_quote(symbol: String, quantity: f64, order_type: OrderType) -> Result<TradingQuote, String>

#[ic_cdk::update]
async fn execute_educational_trade(wallet_address: String, trade_request: TradeRequest) -> Result<TradeExecution, String>

๐ŸŽฏ WCHL 2025 Competitive Advantages

โœ… Technical Excellence

  • Production-Ready: Live deployment on IC mainnet
  • Clean Architecture: 9/10 code quality in Rust canister
  • Scalable Design: Modular systems with proper separation of concerns
  • Security Focus: Comprehensive error handling and input validation

โœ… Educational Impact

  • Real-World Problem: Addresses financial literacy crisis
  • Gamified Learning: Makes complex financial concepts accessible
  • Progressive System: Guides users from beginner to advanced
  • Measurable Outcomes: Track learning progress and financial knowledge gains

โœ… Innovation Factor

  • Unique Positioning: First 2D RPG focused on financial education
  • Blockchain Native: Deep ICP integration, not just a wrapper
  • Real Market Data: Actual stock prices and market conditions
  • Cross-Chain Support: Ethereum and Solana wallet integration

โœ… User Experience

  • Intuitive Interface: Gaming interface makes finance approachable
  • Multiplayer Social: Learn with friends and community
  • Mobile Ready: Progressive web app with mobile optimization
  • Accessibility: Designed for users with no crypto experience

๐Ÿ“š Documentation Structure

๐ŸŽฎ Game Design

Strategic game design, user experience, and retention mechanics.

๐Ÿ—๏ธ Technical Architecture

System design, API documentation, and implementation guides.

Market analysis, competitive positioning, and growth strategy.

User behavior analysis and performance tracking.

๐ŸŽจ Assets & Brand

Visual design, brand guidelines, and media resources.


๐Ÿš€ Quick Navigation

For Developers

For Investors & Stakeholders

For Game Designers


๐ŸŽฏ Key Differentiators

๐ŸŽ“ Educational Impact

  • Progressive Learning: Traditional finance โ†’ Web3 concepts
  • Real-world Skills: Practical money management and investing
  • Gamified Experience: Learning through engaging gameplay

๐Ÿ”— Blockchain Innovation

  • Internet Computer Integration: True decentralization with ICP
  • Reverse Gas Model: Platform pays transaction fees for users
  • Progressive Web3: Optional blockchain features that enhance gameplay

๐Ÿ“ˆ Traction Focus

  • Retention Mechanics: Daily engagement and habit formation
  • Social Features: Friend challenges and leaderboards
  • Viral Growth: Built-in sharing and referral systems

๐Ÿ“Š Current Status

Development Progress

  • โœ… Core Game Engine: Phaser.js-based 2D RPG complete
  • โœ… Multiplayer System: Real-time WebSocket implementation
  • โœ… ICP Canister: Rust-based blockchain backend
  • โœ… Web3 Integration: Multi-wallet support and authentication
  • ๐Ÿ”„ User Onboarding: Progressive tutorial system in development
  • ๐Ÿ”„ Analytics System: User behavior tracking implementation

๐Ÿ”— Related Repositories


Community

Business Inquiries

  • Partnerships: Contact via GitHub or Discord
  • Investment: See Business Strategy documentation
  • Licensing: All rights reserved - see individual repositories for terms

๐Ÿ“„ License & Usage

This documentation is proprietary and confidential. All rights reserved by the Dhaniverse team.

  • Internal Use: Team members and authorized stakeholders only
  • External Sharing: Requires explicit permission
  • Competition Use: Authorized for WCHL 2025 submission and judging

For licensing inquiries, contact @Gursimrxn.


Last Updated: October 2025 | Version: 2.0.0

About

these docs include game design, user experience strategy, technical architecture, and business planning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published