File size: 3,466 Bytes
582bf6b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# config/settings.py
"""Enhanced configuration settings for TriviaVerse"""

# API Endpoints
WIKIPEDIA_API = "https://en.wikipedia.org/w/api.php"
WIKIDATA_API = "https://www.wikidata.org/w/api.php"
WIKIBOOKS_API = "https://en.wikibooks.org/w/api.php"
WIKI_REST_API = "https://en.wikipedia.org/api/rest_v1/page/summary/"

# App Settings
APP_NAME = "TriviaVerse"
APP_VERSION = "2.0.0"
APP_DESCRIPTION = "A Dynamic Quiz App Powered by Wikipedia, Wikidata & Wikibooks"

# Difficulty Levels with scoring multipliers
DIFFICULTY_LEVELS = {
    "Easy": {
        "description": "Direct Wikipedia summaries",
        "multiplier": 1.0,
        "time_limit": 45,
        "hints_allowed": 2,
    },
    "Medium": {
        "description": "Deeper Wikidata relationships",
        "multiplier": 1.5,
        "time_limit": 30,
        "hints_allowed": 1,
    },
    "Hard": {
        "description": "Conceptual flashcards requiring critical thought",
        "multiplier": 2.0,
        "time_limit": 20,
        "hints_allowed": 0,
    },
}

# Topic Generation
RANDOM_TOPICS = [
    "Artificial Intelligence",
    "Climate Change",
    "Space Exploration",
    "Quantum Computing",
    "Renaissance Art",
    "Human Brain",
    "Ocean Biodiversity",
    "Ancient Egypt",
    "Renewable Energy",
    "Blockchain Technology",
    "Sustainable Energy",
    "Modern Architecture",
    "CRISPR gene editing",
]

# Quiz Settings
QUESTIONS_PER_QUIZ = 10
BASE_POINTS = 100

# Badge System
BADGES = {
    "beginner": {"name": "Beginner", "threshold": 100, "icon": "🌱"},
    "learner": {"name": "Learner", "threshold": 500, "icon": "πŸ“š"},
    "scholar": {"name": "Scholar", "threshold": 1000, "icon": "πŸŽ“"},
    "expert": {"name": "Expert", "threshold": 2500, "icon": "πŸ†"},
    "master": {"name": "Master", "threshold": 5000, "icon": "πŸ‘‘"},
}

# Achievement System
ACHIEVEMENTS = {
    "first_quiz": {
        "name": "First Steps",
        "description": "Complete your first quiz",
        "points": 50,
    },
    "perfect_score": {
        "name": "Perfect!",
        "description": "Get 100% on a quiz",
        "points": 200,
    },
    "streak_5": {
        "name": "On Fire",
        "description": "Answer 5 questions correctly in a row",
        "points": 150,
    },
    "diverse_learner": {
        "name": "Diverse Learner",
        "description": "Play all 3 game modes",
        "points": 100,
    },
    "early_bird": {
        "name": "Early Bird",
        "description": "Play before 6 AM",
        "points": 75,
    },
    "night_owl": {
        "name": "Night Owl",
        "description": "Play after midnight",
        "points": 75,
    },
    "week_warrior": {
        "name": "Week Warrior",
        "description": "Play 7 days in a row",
        "points": 300,
    },
    "century": {
        "name": "Century",
        "description": "Answer 100 questions",
        "points": 500,
    },
}

# Leaderboard Settings
LEADERBOARD_SIZE = 10
LEADERBOARD_UPDATE_INTERVAL = 300  # 5 minutes in seconds

# Cache Settings
CACHE_TIMEOUT = 3600  # 1 hour in seconds
MAX_CACHE_SIZE = 1000  # Maximum number of cached items

# Rate Limiting
API_RATE_LIMIT = 100  # requests per minute
USER_RATE_LIMIT = 50  # actions per minute

# Session Settings
SESSION_TIMEOUT = 3600  # 1 hour in seconds
REMEMBER_ME_DURATION = 604800  # 7 days in seconds