Bharath370 commited on
Commit
5af4179
·
verified ·
1 Parent(s): 26919f0

Upload 78 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. src/.gitignore +64 -0
  2. src/README.md +101 -0
  3. src/assets/style.css +491 -0
  4. src/data/.gitkeep +0 -0
  5. src/data/challenges.json +0 -0
  6. src/data/leaderboard.json +9 -0
  7. src/data/performance_demo_user.json +23 -0
  8. src/data/performance_guest_1751358180.json +23 -0
  9. src/data/performance_guest_1751358886.json +23 -0
  10. src/data/performance_guest_1751359351.json +23 -0
  11. src/data/performance_guest_1751359606.json +40 -0
  12. src/data/performance_guest_1751864420.json +67 -0
  13. src/data/performance_guest_1751865336.json +67 -0
  14. src/data/performance_guest_1751867508.json +46 -0
  15. src/data/performance_guest_1751949545.json +129 -0
  16. src/data/performance_guest_1751952184.json +25 -0
  17. src/data/performance_user_1751958071.json +32 -0
  18. src/data/scores_demo_user.json +40 -0
  19. src/data/scores_guest_1751358767.json +23 -0
  20. src/data/scores_guest_1751358886.json +50 -0
  21. src/data/scores_guest_1751359351.json +23 -0
  22. src/data/scores_guest_1751359606.json +41 -0
  23. src/data/scores_guest_1751862336.json +23 -0
  24. src/data/scores_guest_1751864420.json +50 -0
  25. src/data/scores_guest_1751865336.json +41 -0
  26. src/data/scores_guest_1751867508.json +50 -0
  27. src/data/scores_guest_1751869587.json +21 -0
  28. src/data/scores_guest_1751949545.json +106 -0
  29. src/data/scores_guest_1751950590.json +23 -0
  30. src/data/scores_guest_1751952184.json +32 -0
  31. src/data/scores_user_1751958071.json +23 -0
  32. src/data/user_scores.json +42 -0
  33. src/data/users.json +14 -0
  34. src/modules/__pycache__/adaptive_engine.cpython-311.pyc +0 -0
  35. src/modules/__pycache__/adaptive_engine.cpython-312.pyc +0 -0
  36. src/modules/__pycache__/adaptive_engine.cpython-313.pyc +0 -0
  37. src/modules/__pycache__/api_utils.cpython-311.pyc +0 -0
  38. src/modules/__pycache__/api_utils.cpython-312.pyc +0 -0
  39. src/modules/__pycache__/api_utils.cpython-313.pyc +0 -0
  40. src/modules/__pycache__/fact_game.cpython-311.pyc +0 -0
  41. src/modules/__pycache__/fact_game.cpython-312.pyc +0 -0
  42. src/modules/__pycache__/fact_game.cpython-313.pyc +0 -0
  43. src/modules/__pycache__/flashcard_generator.cpython-311.pyc +0 -0
  44. src/modules/__pycache__/flashcard_generator.cpython-312.pyc +0 -0
  45. src/modules/__pycache__/flashcard_generator.cpython-313.pyc +0 -0
  46. src/modules/__pycache__/hf_llm_generator.cpython-312.pyc +0 -0
  47. src/modules/__pycache__/info_page.cpython-312.pyc +0 -0
  48. src/modules/__pycache__/mcq_generator.cpython-311.pyc +0 -0
  49. src/modules/__pycache__/mcq_generator.cpython-312.pyc +0 -0
  50. src/modules/__pycache__/mcq_generator.cpython-313.pyc +0 -0
src/.gitignore ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## 4. .gitignore
2
+
3
+ ```gitignore
4
+ # Virtual environment
5
+ venv/
6
+ env/
7
+ ENV/
8
+ .venv/
9
+
10
+ # Python cache
11
+ __pycache__/
12
+ *.py[cod]
13
+ *$py.class
14
+ *.so
15
+ .Python
16
+
17
+ # IDE
18
+ .vscode/
19
+ .idea/
20
+ *.swp
21
+ *.swo
22
+ *.sublime-project
23
+ *.sublime-workspace
24
+
25
+ # OS files
26
+ .DS_Store
27
+ .DS_Store?
28
+ ._*
29
+ .Spotlight-V100
30
+ .Trashes
31
+ ehthumbs.db
32
+ Thumbs.db
33
+
34
+ # Environment variables
35
+ .env
36
+ .env.local
37
+ .env.production
38
+ secrets.toml
39
+
40
+ # Logs
41
+ logs/
42
+ *.log
43
+ npm-debug.log*
44
+ yarn-debug.log*
45
+ yarn-error.log*
46
+
47
+ # Data files
48
+ data/
49
+ *.json
50
+ *.csv
51
+ *.xlsx
52
+
53
+ # Streamlit
54
+ .streamlit/secrets.toml
55
+
56
+ # Testing
57
+ .coverage
58
+ .pytest_cache/
59
+ htmlcov/
60
+
61
+ # Build
62
+ build/
63
+ dist/
64
+ *.egg-info/
src/README.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # 🧠 TriviaVerse – Wikipedia-Powered Quiz Generator
3
+
4
+ **TriviaVerse** is a smart quiz generator that creates questions from **Wikipedia**, **Wikidata**, and **Wikibooks**. It transforms open-access knowledge into fun and educational MCQs and flashcards using **open-source AI models**.
5
+
6
+ ---
7
+
8
+ ## 🌍 Live App
9
+
10
+ Access the live version on Hugging Face Spaces:
11
+ 🔗 https://huggingface.co/spaces/Bharath370/Trivia1
12
+
13
+
14
+ ---
15
+
16
+
17
+
18
+ ## 🎯 Project Objective
19
+
20
+ Build an AI-powered educational quiz platform that:
21
+ - Pulls structured data from Wikimedia APIs
22
+ - Uses LLMs to convert text into multiple-choice questions
23
+ - Lets users play trivia by topic, difficulty, or random mode
24
+
25
+ ---
26
+
27
+ ## 🌐 APIs Used
28
+
29
+ - 📚 Wikipedia API
30
+ - 🧠 Wikidata API
31
+ - 📘 Wikibooks API
32
+
33
+ ---
34
+
35
+ ## 🤖 AI Integration
36
+
37
+ Utilizes Hugging Face models like `google/flan-t5-base` or `mistral-7b-instruct` to:
38
+ - Generate multiple-choice questions
39
+ - Summarize answers or provide hints
40
+ - Work offline with local model caching
41
+
42
+ ---
43
+
44
+ ## 🛠️ Tech Stack
45
+
46
+ | Component | Tool |
47
+ |-----------|-----------------------------|
48
+ | Backend | Python + FastAPI |
49
+ | Frontend | Python + Streamlit |
50
+ | AI Model | Hugging Face Transformers |
51
+ | Hosting | Local / Hugging Face Spaces |
52
+
53
+ ---
54
+
55
+ ## 👥 Team
56
+
57
+ - **Bharath Linga Reddy Palem** – Backend
58
+ - **Raghavender Reddy P** – AI Prompt Design + Integration
59
+ - **C Vamshidhar Reddy** – Frontend UI/UX
60
+ - **Bandi Bala Sai Manikanta** – Testing, Docs, Demo Video
61
+ - **D Prem Kowshik** – API Integration & Debugging
62
+
63
+ ---
64
+
65
+ ## 🚀 How to Run Locally
66
+
67
+ ```bash
68
+ git clone <your-repo-url>
69
+ cd TriviaVerse
70
+ python -m venv .venv
71
+ source .venv/bin/activate
72
+ pip install -r requirements.txt
73
+ streamlit run app.py
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 📺 Demo Video
79
+
80
+ ▶️
81
+
82
+
83
+ ---
84
+
85
+ ## 🔮 Future Features
86
+
87
+ - 🏆 Leaderboards and scoring
88
+ - 💾 Save or export quizzes
89
+ - 🌐 Multilingual support (Indian languages coming soon)
90
+
91
+ ---
92
+
93
+ ## 🤝 Contributions
94
+
95
+ Feel free to fork this project, open issues, or submit PRs. Let’s make learning smarter and more accessible — together!
96
+
97
+ ---
98
+
99
+ ## 📄 License
100
+
101
+ This project is licensed under the MIT License.
src/assets/style.css ADDED
@@ -0,0 +1,491 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* assets/style.css */
2
+ /* Custom CSS for TriviaVerse Enhanced */
3
+
4
+ /* Import Google Fonts */
5
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
6
+
7
+ /* Global Variables */
8
+ :root {
9
+ --primary-color: #6A057F;
10
+ /* Deeper purple */
11
+ --secondary-color: #8C1C8C;
12
+ /* Lighter purple */
13
+ --background-color: #F8F8F8;
14
+ /* Light gray background */
15
+ --text-color: #333333;
16
+ /* Darker text for contrast */
17
+ --border-radius: 12px;
18
+ --transition: all 0.3s ease;
19
+ --card-background: #FFFFFF;
20
+ /* White card background */
21
+ --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
22
+ --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.1);
23
+ }
24
+
25
+ /* Dark mode variables */
26
+ [data-theme="dark"] {
27
+ --primary-color: #BB86FC;
28
+ /* Lighter purple for dark mode */
29
+ --secondary-color: #3700B3;
30
+ /* Darker purple for dark mode */
31
+ --background-color: #121212;
32
+ /* Dark background */
33
+ --text-color: #E0E0E0;
34
+ /* Light text */
35
+ --card-background: #1E1E1E;
36
+ /* Dark card background */
37
+ --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.3);
38
+ --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.4);
39
+ }
40
+
41
+ /* Global Styles */
42
+ * {
43
+ box-sizing: border-box;
44
+ }
45
+
46
+ body {
47
+ font-family: 'Poppins', sans-serif;
48
+ line-height: 1.6;
49
+ color: var(--text-color);
50
+ background-color: var(--background-color);
51
+ margin: 0;
52
+ padding: 0;
53
+ }
54
+
55
+ /* Smooth scrolling */
56
+ html {
57
+ scroll-behavior: smooth;
58
+ }
59
+
60
+ /* Custom scrollbar */
61
+ ::-webkit-scrollbar {
62
+ width: 10px;
63
+ height: 10px;
64
+ }
65
+
66
+ ::-webkit-scrollbar-track {
67
+ background: var(--background-color);
68
+ border-radius: 10px;
69
+ }
70
+
71
+ ::-webkit-scrollbar-thumb {
72
+ background: var(--primary-color);
73
+ border-radius: 10px;
74
+ }
75
+
76
+ ::-webkit-scrollbar-thumb:hover {
77
+ background: var(--secondary-color);
78
+ }
79
+
80
+ /* Animations */
81
+ @keyframes fadeIn {
82
+ from {
83
+ opacity: 0;
84
+ transform: translateY(20px);
85
+ }
86
+
87
+ to {
88
+ opacity: 1;
89
+ transform: translateY(0);
90
+ }
91
+ }
92
+
93
+ @keyframes slideInLeft {
94
+ from {
95
+ opacity: 0;
96
+ transform: translateX(-50px);
97
+ }
98
+
99
+ to {
100
+ opacity: 1;
101
+ transform: translateX(0);
102
+ }
103
+ }
104
+
105
+ @keyframes pulse {
106
+ 0% {
107
+ transform: scale(1);
108
+ }
109
+
110
+ 50% {
111
+ transform: scale(1.02);
112
+ /* Slightly less aggressive pulse */
113
+ }
114
+
115
+ 100% {
116
+ transform: scale(1);
117
+ }
118
+ }
119
+
120
+ @keyframes shimmer {
121
+ 0% {
122
+ background-position: -200px 0;
123
+ }
124
+
125
+ 100% {
126
+ background-position: calc(200px + 100%) 0;
127
+ }
128
+ }
129
+
130
+ @keyframes popIn {
131
+ 0% {
132
+ opacity: 0;
133
+ transform: scale(0.8);
134
+ }
135
+
136
+ 100% {
137
+ opacity: 1;
138
+ transform: scale(1);
139
+ }
140
+ }
141
+
142
+ /* Utility Classes */
143
+ .fade-in {
144
+ animation: fadeIn 0.5s ease-out forwards;
145
+ }
146
+
147
+ .slide-in-left {
148
+ animation: slideInLeft 0.5s ease-out forwards;
149
+ }
150
+
151
+ .pulse {
152
+ animation: pulse 2s ease-in-out infinite;
153
+ }
154
+
155
+ .pop-in {
156
+ animation: popIn 0.4s ease-out forwards;
157
+ }
158
+
159
+ /* Loading skeleton */
160
+ .skeleton {
161
+ background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
162
+ background-size: 200px 100%;
163
+ animation: shimmer 1.5s ease-in-out infinite;
164
+ }
165
+
166
+ /* Card hover effects */
167
+ .hover-lift {
168
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
169
+ }
170
+
171
+ .hover-lift:hover {
172
+ transform: translateY(-5px);
173
+ box-shadow: var(--shadow-medium);
174
+ }
175
+
176
+ /* Flashcard Component */
177
+ .flashcard-container {
178
+ perspective: 1000px;
179
+ min-height: 300px;
180
+ cursor: pointer;
181
+ box-shadow: var(--shadow-medium);
182
+ /* Apply consistent shadow */
183
+ border-radius: var(--border-radius);
184
+ overflow: hidden;
185
+ /* Ensure rounded corners for internal faces */
186
+ }
187
+
188
+ .flashcard {
189
+ width: 100%;
190
+ min-height: 300px;
191
+ border-radius: var(--border-radius);
192
+ padding: 20px;
193
+ display: flex;
194
+ flex-direction: column;
195
+ align-items: center;
196
+ justify-content: center;
197
+ text-align: center;
198
+ color: white;
199
+ transition: transform 0.6s;
200
+ transform-style: preserve-3d;
201
+ }
202
+
203
+ .flashcard.front {
204
+ background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
205
+ }
206
+
207
+ .flashcard.back {
208
+ background: var(--card-background);
209
+ /* Use card background variable */
210
+ color: var(--text-color);
211
+ /* Use text color variable */
212
+ }
213
+
214
+ .flashcard p {
215
+ font-size: 1.2rem;
216
+ }
217
+
218
+ .flip-instruction {
219
+ margin-top: 30px;
220
+ opacity: 0.8;
221
+ font-style: italic;
222
+ color: var(--text-color);
223
+ /* Ensure visibility in dark mode */
224
+ }
225
+
226
+ /* Streamlit specific overrides and enhancements */
227
+ .stButton>button {
228
+ border-radius: var(--border-radius);
229
+ padding: 10px 20px;
230
+ font-weight: 600;
231
+ transition: var(--transition);
232
+ border: none;
233
+ background-color: var(--primary-color);
234
+ color: white;
235
+ box-shadow: var(--shadow-light);
236
+ }
237
+
238
+ .stButton>button:hover {
239
+ background-color: var(--secondary-color);
240
+ box-shadow: var(--shadow-medium);
241
+ transform: translateY(-2px);
242
+ }
243
+
244
+ .stRadio>div>label {
245
+ padding: 10px;
246
+ border-radius: var(--border-radius);
247
+ background-color: var(--card-background);
248
+ border: 1px solid #e0e0e0;
249
+ /* Light border for options */
250
+ margin-bottom: 8px;
251
+ transition: var(--transition);
252
+ box-shadow: var(--shadow-light);
253
+ }
254
+
255
+ .stRadio>div>label:hover {
256
+ border-color: var(--primary-color);
257
+ box-shadow: var(--shadow-medium);
258
+ }
259
+
260
+ /* Metric cards */
261
+ [data-testid="stMetric"] {
262
+ background-color: var(--card-background);
263
+ border-radius: var(--border-radius);
264
+ padding: 20px;
265
+ box-shadow: var(--shadow-light);
266
+ transition: var(--transition);
267
+ animation: popIn 0.5s ease-out forwards;
268
+ /* Initial pop-in animation */
269
+ }
270
+
271
+ [data-testid="stMetric"]:hover {
272
+ transform: translateY(-3px);
273
+ box-shadow: var(--shadow-medium);
274
+ }
275
+
276
+ /* Expander styling */
277
+ [data-testid="stExpander"] {
278
+ background-color: var(--card-background);
279
+ border-radius: var(--border-radius);
280
+ padding: 15px;
281
+ box-shadow: var(--shadow-light);
282
+ transition: var(--transition);
283
+ }
284
+
285
+ [data-testid="stExpander"]:hover {
286
+ box-shadow: var(--shadow-medium);
287
+ }
288
+
289
+ /* Text input styling */
290
+ .stTextInput>div>div>input {
291
+ border-radius: var(--border-radius);
292
+ border: 1px solid #e0e0e0;
293
+ padding: 10px;
294
+ transition: var(--transition);
295
+ }
296
+
297
+ .stTextInput>div>div>input:focus {
298
+ border-color: var(--primary-color);
299
+ box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
300
+ /* Needs RGB conversion */
301
+ }
302
+
303
+ /* Selectbox styling */
304
+ .stSelectbox>div>div {
305
+ border-radius: var(--border-radius);
306
+ border: 1px solid #e0e0e0;
307
+ transition: var(--transition);
308
+ }
309
+
310
+ .stSelectbox>div>div:hover {
311
+ border-color: var(--primary-color);
312
+ }
313
+
314
+
315
+ /* Responsive Typography */
316
+ h1 {
317
+ font-size: clamp(1.8rem, 4vw, 3rem);
318
+ /* Larger headings */
319
+ font-weight: 700;
320
+ color: var(--primary-color);
321
+ /* Headings in primary color */
322
+ text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
323
+ }
324
+
325
+ h2 {
326
+ font-size: clamp(1.5rem, 3.5vw, 2.5rem);
327
+ font-weight: 600;
328
+ color: var(--primary-color);
329
+ }
330
+
331
+ h3 {
332
+ font-size: clamp(1.2rem, 3vw, 2rem);
333
+ font-weight: 600;
334
+ color: var(--text-color);
335
+ }
336
+
337
+ p {
338
+ font-size: clamp(0.9rem, 2vw, 1.1rem);
339
+ }
340
+
341
+ /* Mobile-first responsive design */
342
+ @media (max-width: 768px) {
343
+
344
+ /* Mobile styles */
345
+ .main .block-container {
346
+ padding: 1rem 0.5rem !important;
347
+ max-width: 100% !important;
348
+ }
349
+
350
+ /* Stack columns on mobile */
351
+ .row-widget.stHorizontal {
352
+ flex-direction: column !important;
353
+ }
354
+
355
+ .row-widget.stHorizontal>div {
356
+ width: 100% !important;
357
+ margin-bottom: 1rem;
358
+ }
359
+
360
+ /* Full-width buttons on mobile */
361
+ .stButton>button {
362
+ width: 100% !important;
363
+ min-height: 50px;
364
+ font-size: 16px !important;
365
+ }
366
+
367
+ /* Larger touch targets */
368
+ .stRadio>div>label {
369
+ padding: 15px !important;
370
+ margin: 5px 0 !important;
371
+ }
372
+
373
+ /* Responsive cards */
374
+ .card {
375
+ padding: 15px !important;
376
+ margin: 10px 0 !important;
377
+ }
378
+
379
+ /* Hide sidebar by default on mobile */
380
+ section[data-testid="stSidebar"] {
381
+ transform: translateX(-100%);
382
+ transition: transform 0.3s ease;
383
+ }
384
+
385
+ section[data-testid="stSidebar"][aria-expanded="true"] {
386
+ transform: translateX(0);
387
+ }
388
+
389
+ /* Adjust font sizes for mobile */
390
+ .score-display {
391
+ font-size: 24px !important;
392
+ }
393
+
394
+ /* Responsive quiz container */
395
+ .quiz-container {
396
+ padding: 20px !important;
397
+ margin: 15px 0 !important;
398
+ }
399
+ }
400
+
401
+ /* Tablet styles */
402
+ @media (min-width: 769px) and (max-width: 1024px) {
403
+ .main .block-container {
404
+ max-width: 95%;
405
+ padding: 2rem 1rem;
406
+ }
407
+
408
+ .row-widget.stHorizontal>div {
409
+ flex: 1;
410
+ }
411
+ }
412
+
413
+ /* Desktop styles */
414
+ @media (min-width: 1025px) {
415
+ .main .block-container {
416
+ max-width: 1200px;
417
+ padding: 3rem 2rem;
418
+ }
419
+ }
420
+
421
+ /* Print styles */
422
+ @media print {
423
+
424
+ .stButton,
425
+ section[data-testid="stSidebar"],
426
+ .stRadio {
427
+ display: none !important;
428
+ }
429
+
430
+ .main {
431
+ padding: 0 !important;
432
+ }
433
+
434
+ .card {
435
+ break-inside: avoid;
436
+ page-break-inside: avoid;
437
+ }
438
+ }
439
+
440
+ /* Accessibility improvements */
441
+ .stButton>button:focus,
442
+ .stRadio>div>label:focus {
443
+ outline: 3px solid var(--primary-color);
444
+ outline-offset: 2px;
445
+ }
446
+
447
+ /* High contrast mode support */
448
+ @media (prefers-contrast: high) {
449
+ :root {
450
+ --primary-color: #00AA00;
451
+ --background-color: #000000;
452
+ --text-color: #FFFFFF;
453
+ }
454
+ }
455
+
456
+ /* Reduced motion support */
457
+ @media (prefers-reduced-motion: reduce) {
458
+ * {
459
+ animation-duration: 0.01ms !important;
460
+ animation-iteration-count: 1 !important;
461
+ transition-duration: 0.01ms !important;
462
+ }
463
+ }
464
+
465
+ /* Custom tooltip */
466
+ .tooltip {
467
+ position: relative;
468
+ display: inline-block;
469
+ }
470
+
471
+ .tooltip .tooltiptext {
472
+ visibility: hidden;
473
+ width: 200px;
474
+ background-color: #555;
475
+ color: #fff;
476
+ text-align: center;
477
+ border-radius: 6px;
478
+ padding: 5px;
479
+ position: absolute;
480
+ z-index: 1;
481
+ bottom: 125%;
482
+ left: 50%;
483
+ margin-left: -100px;
484
+ opacity: 0;
485
+ transition: opacity 0.3s;
486
+ }
487
+
488
+ .tooltip:hover .tooltiptext {
489
+ visibility: visible;
490
+ opacity: 1;
491
+ }
src/data/.gitkeep ADDED
File without changes
src/data/challenges.json ADDED
The diff for this file is too large to render. See raw diff
 
src/data/leaderboard.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "rank": 1,
4
+ "username": "demo_user",
5
+ "score": 1500,
6
+ "badges": 2,
7
+ "quizzes": 15
8
+ }
9
+ ]
src/data/performance_demo_user.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2024-01-01T10:00:00",
5
+ "correct": true,
6
+ "difficulty": "Medium",
7
+ "topic": "Python programming"
8
+ }
9
+ ],
10
+ "difficulty_scores": {
11
+ "Easy": 0.85,
12
+ "Medium": 0.65,
13
+ "Hard": 0.45
14
+ },
15
+ "topic_performance": {
16
+ "Python programming": {
17
+ "attempts": 10,
18
+ "correct": 8,
19
+ "last_seen": "2024-01-01T10:00:00"
20
+ }
21
+ },
22
+ "last_updated": "2024-01-01T10:00:00"
23
+ }
src/data/performance_guest_1751358180.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-01T13:53:39.067299",
5
+ "correct": false,
6
+ "difficulty": "Easy",
7
+ "topic": "Python (programming language)"
8
+ }
9
+ ],
10
+ "difficulty_scores": {
11
+ "Easy": 0.6400000000000001,
12
+ "Medium": 0.5,
13
+ "Hard": 0.2
14
+ },
15
+ "topic_performance": {
16
+ "Python (programming language)": {
17
+ "attempts": 1,
18
+ "correct": 0,
19
+ "last_seen": "2025-07-01T13:53:39.067315"
20
+ }
21
+ },
22
+ "last_updated": "2025-07-01T13:53:39.068069"
23
+ }
src/data/performance_guest_1751358886.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-01T14:05:37.790250",
5
+ "correct": false,
6
+ "difficulty": "Hard",
7
+ "topic": "Python (programming language)"
8
+ }
9
+ ],
10
+ "difficulty_scores": {
11
+ "Easy": 0.8,
12
+ "Medium": 0.5,
13
+ "Hard": 0.16000000000000003
14
+ },
15
+ "topic_performance": {
16
+ "Python (programming language)": {
17
+ "attempts": 1,
18
+ "correct": 0,
19
+ "last_seen": "2025-07-01T14:05:37.790267"
20
+ }
21
+ },
22
+ "last_updated": "2025-07-01T14:05:37.790994"
23
+ }
src/data/performance_guest_1751359351.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-01T14:13:13.633788",
5
+ "correct": true,
6
+ "difficulty": "Easy",
7
+ "topic": "Python (programming language)"
8
+ }
9
+ ],
10
+ "difficulty_scores": {
11
+ "Easy": 0.8400000000000001,
12
+ "Medium": 0.5,
13
+ "Hard": 0.2
14
+ },
15
+ "topic_performance": {
16
+ "Python (programming language)": {
17
+ "attempts": 1,
18
+ "correct": 1,
19
+ "last_seen": "2025-07-01T14:13:13.633810"
20
+ }
21
+ },
22
+ "last_updated": "2025-07-01T14:13:13.634544"
23
+ }
src/data/performance_guest_1751359606.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-01T14:17:07.443097",
5
+ "correct": true,
6
+ "difficulty": "Easy",
7
+ "topic": "Python (programming language)"
8
+ },
9
+ {
10
+ "timestamp": "2025-07-01T14:18:01.477018",
11
+ "correct": true,
12
+ "difficulty": "Medium",
13
+ "topic": "Python (programming language)"
14
+ },
15
+ {
16
+ "timestamp": "2025-07-01T14:18:39.296459",
17
+ "correct": true,
18
+ "difficulty": "Medium",
19
+ "topic": "Renewable energy"
20
+ }
21
+ ],
22
+ "difficulty_scores": {
23
+ "Easy": 0.8400000000000001,
24
+ "Medium": 0.6800000000000002,
25
+ "Hard": 0.2
26
+ },
27
+ "topic_performance": {
28
+ "Python (programming language)": {
29
+ "attempts": 2,
30
+ "correct": 2,
31
+ "last_seen": "2025-07-01T14:18:01.477037"
32
+ },
33
+ "Renewable energy": {
34
+ "attempts": 1,
35
+ "correct": 1,
36
+ "last_seen": "2025-07-01T14:18:39.296482"
37
+ }
38
+ },
39
+ "last_updated": "2025-07-01T14:18:39.297398"
40
+ }
src/data/performance_guest_1751864420.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-07T10:31:04.971495",
5
+ "correct": false,
6
+ "difficulty": "Easy",
7
+ "topic": "Zen of Python"
8
+ },
9
+ {
10
+ "timestamp": "2025-07-07T10:31:13.317178",
11
+ "correct": true,
12
+ "difficulty": "Easy",
13
+ "topic": "Human brain"
14
+ },
15
+ {
16
+ "timestamp": "2025-07-07T10:31:27.939617",
17
+ "correct": true,
18
+ "difficulty": "Easy",
19
+ "topic": "Glob (programming)"
20
+ },
21
+ {
22
+ "timestamp": "2025-07-07T10:31:37.437026",
23
+ "correct": true,
24
+ "difficulty": "Easy",
25
+ "topic": "Space exploration"
26
+ },
27
+ {
28
+ "timestamp": "2025-07-07T10:31:51.393366",
29
+ "correct": true,
30
+ "difficulty": "Easy",
31
+ "topic": "Guido van Rossum"
32
+ }
33
+ ],
34
+ "difficulty_scores": {
35
+ "Easy": 0.8525440000000002,
36
+ "Medium": 0.5,
37
+ "Hard": 0.2
38
+ },
39
+ "topic_performance": {
40
+ "Zen of Python": {
41
+ "attempts": 1,
42
+ "correct": 0,
43
+ "last_seen": "2025-07-07T10:31:04.971495"
44
+ },
45
+ "Human brain": {
46
+ "attempts": 1,
47
+ "correct": 1,
48
+ "last_seen": "2025-07-07T10:31:13.317178"
49
+ },
50
+ "Glob (programming)": {
51
+ "attempts": 1,
52
+ "correct": 1,
53
+ "last_seen": "2025-07-07T10:31:27.939617"
54
+ },
55
+ "Space exploration": {
56
+ "attempts": 1,
57
+ "correct": 1,
58
+ "last_seen": "2025-07-07T10:31:37.437026"
59
+ },
60
+ "Guido van Rossum": {
61
+ "attempts": 1,
62
+ "correct": 1,
63
+ "last_seen": "2025-07-07T10:31:51.393366"
64
+ }
65
+ },
66
+ "last_updated": "2025-07-07T10:31:51.394368"
67
+ }
src/data/performance_guest_1751865336.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-07T10:46:08.751598",
5
+ "correct": true,
6
+ "difficulty": "Easy",
7
+ "topic": "History of Python"
8
+ },
9
+ {
10
+ "timestamp": "2025-07-07T10:46:16.632408",
11
+ "correct": true,
12
+ "difficulty": "Medium",
13
+ "topic": "Guido van Rossum"
14
+ },
15
+ {
16
+ "timestamp": "2025-07-07T10:46:24.902809",
17
+ "correct": false,
18
+ "difficulty": "Medium",
19
+ "topic": "Mojo (programming language)"
20
+ },
21
+ {
22
+ "timestamp": "2025-07-07T10:46:36.561459",
23
+ "correct": false,
24
+ "difficulty": "Easy",
25
+ "topic": "Quantum computing"
26
+ },
27
+ {
28
+ "timestamp": "2025-07-07T10:46:43.855576",
29
+ "correct": true,
30
+ "difficulty": "Easy",
31
+ "topic": "Python (programming language)"
32
+ }
33
+ ],
34
+ "difficulty_scores": {
35
+ "Easy": 0.7376000000000003,
36
+ "Medium": 0.4800000000000001,
37
+ "Hard": 0.2
38
+ },
39
+ "topic_performance": {
40
+ "History of Python": {
41
+ "attempts": 1,
42
+ "correct": 1,
43
+ "last_seen": "2025-07-07T10:46:08.751598"
44
+ },
45
+ "Guido van Rossum": {
46
+ "attempts": 1,
47
+ "correct": 1,
48
+ "last_seen": "2025-07-07T10:46:16.632408"
49
+ },
50
+ "Mojo (programming language)": {
51
+ "attempts": 1,
52
+ "correct": 0,
53
+ "last_seen": "2025-07-07T10:46:24.903806"
54
+ },
55
+ "Quantum computing": {
56
+ "attempts": 1,
57
+ "correct": 0,
58
+ "last_seen": "2025-07-07T10:46:36.561459"
59
+ },
60
+ "Python (programming language)": {
61
+ "attempts": 1,
62
+ "correct": 1,
63
+ "last_seen": "2025-07-07T10:46:43.855576"
64
+ }
65
+ },
66
+ "last_updated": "2025-07-07T10:46:43.855576"
67
+ }
src/data/performance_guest_1751867508.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-07T11:22:33.318823",
5
+ "correct": true,
6
+ "difficulty": "Easy",
7
+ "item_id": null,
8
+ "topic": "Core Python Programming"
9
+ },
10
+ {
11
+ "timestamp": "2025-07-07T11:22:46.150026",
12
+ "correct": true,
13
+ "difficulty": "Medium",
14
+ "item_id": null,
15
+ "topic": "Guido van Rossum"
16
+ },
17
+ {
18
+ "timestamp": "2025-07-07T11:22:52.924391",
19
+ "correct": false,
20
+ "difficulty": "Medium",
21
+ "item_id": null,
22
+ "topic": "Renewable energy"
23
+ },
24
+ {
25
+ "timestamp": "2025-07-07T11:22:59.213802",
26
+ "correct": true,
27
+ "difficulty": "Easy",
28
+ "item_id": null,
29
+ "topic": "Zen of Python"
30
+ },
31
+ {
32
+ "timestamp": "2025-07-07T11:23:07.453206",
33
+ "correct": true,
34
+ "difficulty": "Easy",
35
+ "item_id": null,
36
+ "topic": "Blockchain"
37
+ }
38
+ ],
39
+ "difficulty_scores": {
40
+ "Easy": 0.8976000000000002,
41
+ "Medium": 0.4800000000000001,
42
+ "Hard": 0.2
43
+ },
44
+ "item_performance": {},
45
+ "last_updated": "2025-07-07T11:23:07.454207"
46
+ }
src/data/performance_guest_1751949545.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-08T10:12:44.268613",
5
+ "correct": true,
6
+ "difficulty": "Easy",
7
+ "item_id": "a8c17e63f951b03dc37f51167b6834f935da971039228cce1b1fdc0338aa8cfd",
8
+ "topic": "Mojo (programming language)"
9
+ },
10
+ {
11
+ "timestamp": "2025-07-08T10:12:53.405545",
12
+ "correct": false,
13
+ "difficulty": "Easy",
14
+ "item_id": "d70d242047ce32e010fc69695a8a1a944ecbe37de887a28da0ec09c853fb9cba",
15
+ "topic": "Python (programming language)"
16
+ },
17
+ {
18
+ "timestamp": "2025-07-08T10:13:03.254231",
19
+ "correct": true,
20
+ "difficulty": "Easy",
21
+ "item_id": "96d6388dd0b05ec08f25b6df12fa9438bf2791174e94b6a6bc231e46a780d12f",
22
+ "topic": "Zen of Python"
23
+ },
24
+ {
25
+ "timestamp": "2025-07-08T10:13:08.799010",
26
+ "correct": true,
27
+ "difficulty": "Easy",
28
+ "item_id": "46224de2915050b40ef08ffe55cf8cd7145b6917407c850d287cca93f36718b7",
29
+ "topic": "Python syntax and semantics"
30
+ },
31
+ {
32
+ "timestamp": "2025-07-08T10:13:13.564332",
33
+ "correct": true,
34
+ "difficulty": "Easy",
35
+ "item_id": "d54d8b588cb7d9f3d713aeffe9e5bdf94af1b7718e46c147ace02e14c2d9e6e8",
36
+ "topic": "Core Python Programming"
37
+ },
38
+ {
39
+ "timestamp": "2025-07-08T10:13:16.999577",
40
+ "correct": true,
41
+ "difficulty": "Easy",
42
+ "item_id": "deb77e36e422754f340189496401a09733fac8e893686d01600ef8a1f317d529",
43
+ "topic": "Glob (programming)"
44
+ },
45
+ {
46
+ "timestamp": "2025-07-08T10:13:23.685631",
47
+ "correct": true,
48
+ "difficulty": "Easy",
49
+ "item_id": "554b5e322c6e6fc0dcc564182341a0b1f556d62c9a36d73e51e9529bbb7f44f4",
50
+ "topic": "General-purpose programming language"
51
+ },
52
+ {
53
+ "timestamp": "2025-07-08T10:13:29.510469",
54
+ "correct": true,
55
+ "difficulty": "Easy",
56
+ "item_id": "5972464fe47cd83d10ab958e37fcaae51e78ac43993c807700150d1b6c19d037",
57
+ "topic": "History of Python"
58
+ },
59
+ {
60
+ "timestamp": "2025-07-08T10:13:33.643100",
61
+ "correct": true,
62
+ "difficulty": "Easy",
63
+ "item_id": "c863af37208ca4545207697f5358bdfbc65c8ec4c02ca7d3bb7597fb665cb63b",
64
+ "topic": "Guido van Rossum"
65
+ }
66
+ ],
67
+ "difficulty_scores": {
68
+ "Easy": 0.9312134144000004,
69
+ "Medium": 0.5,
70
+ "Hard": 0.2
71
+ },
72
+ "item_performance": {
73
+ "a8c17e63f951b03dc37f51167b6834f935da971039228cce1b1fdc0338aa8cfd": {
74
+ "attempts": 1,
75
+ "correct": 1,
76
+ "last_seen": "2025-07-08T10:12:44.268613",
77
+ "topic": "Mojo (programming language)"
78
+ },
79
+ "d70d242047ce32e010fc69695a8a1a944ecbe37de887a28da0ec09c853fb9cba": {
80
+ "attempts": 1,
81
+ "correct": 0,
82
+ "last_seen": "2025-07-08T10:12:53.405545",
83
+ "topic": "Python (programming language)"
84
+ },
85
+ "96d6388dd0b05ec08f25b6df12fa9438bf2791174e94b6a6bc231e46a780d12f": {
86
+ "attempts": 1,
87
+ "correct": 1,
88
+ "last_seen": "2025-07-08T10:13:03.254231",
89
+ "topic": "Zen of Python"
90
+ },
91
+ "46224de2915050b40ef08ffe55cf8cd7145b6917407c850d287cca93f36718b7": {
92
+ "attempts": 1,
93
+ "correct": 1,
94
+ "last_seen": "2025-07-08T10:13:08.799010",
95
+ "topic": "Python syntax and semantics"
96
+ },
97
+ "d54d8b588cb7d9f3d713aeffe9e5bdf94af1b7718e46c147ace02e14c2d9e6e8": {
98
+ "attempts": 1,
99
+ "correct": 1,
100
+ "last_seen": "2025-07-08T10:13:13.564332",
101
+ "topic": "Core Python Programming"
102
+ },
103
+ "deb77e36e422754f340189496401a09733fac8e893686d01600ef8a1f317d529": {
104
+ "attempts": 1,
105
+ "correct": 1,
106
+ "last_seen": "2025-07-08T10:13:16.999577",
107
+ "topic": "Glob (programming)"
108
+ },
109
+ "554b5e322c6e6fc0dcc564182341a0b1f556d62c9a36d73e51e9529bbb7f44f4": {
110
+ "attempts": 1,
111
+ "correct": 1,
112
+ "last_seen": "2025-07-08T10:13:23.685631",
113
+ "topic": "General-purpose programming language"
114
+ },
115
+ "5972464fe47cd83d10ab958e37fcaae51e78ac43993c807700150d1b6c19d037": {
116
+ "attempts": 1,
117
+ "correct": 1,
118
+ "last_seen": "2025-07-08T10:13:29.510469",
119
+ "topic": "History of Python"
120
+ },
121
+ "c863af37208ca4545207697f5358bdfbc65c8ec4c02ca7d3bb7597fb665cb63b": {
122
+ "attempts": 1,
123
+ "correct": 1,
124
+ "last_seen": "2025-07-08T10:13:33.643100",
125
+ "topic": "Guido van Rossum"
126
+ }
127
+ },
128
+ "last_updated": "2025-07-08T10:13:33.643100"
129
+ }
src/data/performance_guest_1751952184.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-08T10:58:04.510269",
5
+ "correct": true,
6
+ "difficulty": "Easy",
7
+ "item_id": "5972464fe47cd83d10ab958e37fcaae51e78ac43993c807700150d1b6c19d037",
8
+ "topic": "History of Python"
9
+ }
10
+ ],
11
+ "difficulty_scores": {
12
+ "Easy": 0.8400000000000001,
13
+ "Medium": 0.5,
14
+ "Hard": 0.2
15
+ },
16
+ "item_performance": {
17
+ "5972464fe47cd83d10ab958e37fcaae51e78ac43993c807700150d1b6c19d037": {
18
+ "attempts": 1,
19
+ "correct": 1,
20
+ "last_seen": "2025-07-08T10:58:04.510269",
21
+ "topic": "History of Python"
22
+ }
23
+ },
24
+ "last_updated": "2025-07-08T10:58:04.511270"
25
+ }
src/data/performance_user_1751958071.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "performance_history": [
3
+ {
4
+ "timestamp": "2025-07-08T12:32:19.564013",
5
+ "correct": false,
6
+ "difficulty": "Easy",
7
+ "item_id": null,
8
+ "topic": "Core Python Programming"
9
+ },
10
+ {
11
+ "timestamp": "2025-07-08T12:33:24.683614",
12
+ "correct": true,
13
+ "difficulty": "Easy",
14
+ "item_id": "5972464fe47cd83d10ab958e37fcaae51e78ac43993c807700150d1b6c19d037",
15
+ "topic": "History of Python"
16
+ }
17
+ ],
18
+ "difficulty_scores": {
19
+ "Easy": 0.7120000000000002,
20
+ "Medium": 0.5,
21
+ "Hard": 0.2
22
+ },
23
+ "item_performance": {
24
+ "5972464fe47cd83d10ab958e37fcaae51e78ac43993c807700150d1b6c19d037": {
25
+ "attempts": 1,
26
+ "correct": 1,
27
+ "last_seen": "2025-07-08T12:33:24.683614",
28
+ "topic": "History of Python"
29
+ }
30
+ },
31
+ "last_updated": "2025-07-08T12:33:24.685604"
32
+ }
src/data/scores_demo_user.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 1500,
3
+ "quizzes_completed": 15,
4
+ "badges": [
5
+ "beginner",
6
+ "learner"
7
+ ],
8
+ "achievements": [
9
+ "first_quiz",
10
+ "streak_5"
11
+ ],
12
+ "quiz_history": [
13
+ {
14
+ "timestamp": "2024-01-01T10:00:00",
15
+ "mode": "MCQ Quiz",
16
+ "score": 8,
17
+ "total": 10,
18
+ "difficulty": "Medium",
19
+ "percentage": 80.0
20
+ }
21
+ ],
22
+ "stats": {
23
+ "mcq": {
24
+ "played": 50,
25
+ "correct": 40
26
+ },
27
+ "flashcards": {
28
+ "played": 30,
29
+ "completed": 25
30
+ },
31
+ "facts": {
32
+ "played": 20,
33
+ "score": 18
34
+ }
35
+ },
36
+ "streaks": {
37
+ "current": 3,
38
+ "best": 7
39
+ }
40
+ }
src/data/scores_guest_1751358767.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 100,
3
+ "quizzes_completed": 1,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-01T14:03:02.285184",
7
+ "mode": "Flashcards",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ }
14
+ ],
15
+ "badges": [
16
+ "beginner"
17
+ ],
18
+ "achievements": [
19
+ "first_quiz"
20
+ ],
21
+ "current_streak": 1,
22
+ "best_streak": 1
23
+ }
src/data/scores_guest_1751358886.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 200,
3
+ "quizzes_completed": 4,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-01T14:05:27.187628",
7
+ "mode": "MCQ Quiz",
8
+ "score": 0,
9
+ "total": 1,
10
+ "difficulty": "Hard",
11
+ "percentage": 0.0,
12
+ "points_earned": 0
13
+ },
14
+ {
15
+ "timestamp": "2025-07-01T14:06:10.710859",
16
+ "mode": "MCQ Quiz",
17
+ "score": 0,
18
+ "total": 1,
19
+ "difficulty": "Hard",
20
+ "percentage": 0.0,
21
+ "points_earned": 0
22
+ },
23
+ {
24
+ "timestamp": "2025-07-01T14:09:25.649410",
25
+ "mode": "Fact Game",
26
+ "score": 1,
27
+ "total": 1,
28
+ "difficulty": "Hard",
29
+ "percentage": 100.0,
30
+ "points_earned": 200
31
+ },
32
+ {
33
+ "timestamp": "2025-07-01T14:09:32.804563",
34
+ "mode": "MCQ Quiz",
35
+ "score": 0,
36
+ "total": 1,
37
+ "difficulty": "Hard",
38
+ "percentage": 0.0,
39
+ "points_earned": 0
40
+ }
41
+ ],
42
+ "badges": [
43
+ "beginner"
44
+ ],
45
+ "achievements": [
46
+ "first_quiz"
47
+ ],
48
+ "current_streak": 0,
49
+ "best_streak": 1
50
+ }
src/data/scores_guest_1751359351.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 100,
3
+ "quizzes_completed": 1,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-01T14:13:13.638678",
7
+ "mode": "MCQ Quiz",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ }
14
+ ],
15
+ "badges": [
16
+ "beginner"
17
+ ],
18
+ "achievements": [
19
+ "first_quiz"
20
+ ],
21
+ "current_streak": 1,
22
+ "best_streak": 1
23
+ }
src/data/scores_guest_1751359606.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 400,
3
+ "quizzes_completed": 3,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-01T14:17:07.447968",
7
+ "mode": "MCQ Quiz",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ },
14
+ {
15
+ "timestamp": "2025-07-01T14:18:01.482211",
16
+ "mode": "MCQ Quiz",
17
+ "score": 1,
18
+ "total": 1,
19
+ "difficulty": "Medium",
20
+ "percentage": 100.0,
21
+ "points_earned": 150
22
+ },
23
+ {
24
+ "timestamp": "2025-07-01T14:18:39.301469",
25
+ "mode": "MCQ Quiz",
26
+ "score": 1,
27
+ "total": 1,
28
+ "difficulty": "Medium",
29
+ "percentage": 100.0,
30
+ "points_earned": 150
31
+ }
32
+ ],
33
+ "badges": [
34
+ "beginner"
35
+ ],
36
+ "achievements": [
37
+ "first_quiz"
38
+ ],
39
+ "current_streak": 3,
40
+ "best_streak": 3
41
+ }
src/data/scores_guest_1751862336.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 100,
3
+ "quizzes_completed": 1,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-07T09:55:57.590604",
7
+ "mode": "Fact Game",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ }
14
+ ],
15
+ "badges": [
16
+ "beginner"
17
+ ],
18
+ "achievements": [
19
+ "first_quiz"
20
+ ],
21
+ "current_streak": 1,
22
+ "best_streak": 1
23
+ }
src/data/scores_guest_1751864420.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 400,
3
+ "quizzes_completed": 4,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-07T10:31:13.321178",
7
+ "mode": "MCQ Quiz",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ },
14
+ {
15
+ "timestamp": "2025-07-07T10:31:27.943620",
16
+ "mode": "MCQ Quiz",
17
+ "score": 1,
18
+ "total": 1,
19
+ "difficulty": "Easy",
20
+ "percentage": 100.0,
21
+ "points_earned": 100
22
+ },
23
+ {
24
+ "timestamp": "2025-07-07T10:31:37.441030",
25
+ "mode": "MCQ Quiz",
26
+ "score": 1,
27
+ "total": 1,
28
+ "difficulty": "Easy",
29
+ "percentage": 100.0,
30
+ "points_earned": 100
31
+ },
32
+ {
33
+ "timestamp": "2025-07-07T10:31:51.398366",
34
+ "mode": "MCQ Quiz",
35
+ "score": 1,
36
+ "total": 1,
37
+ "difficulty": "Easy",
38
+ "percentage": 100.0,
39
+ "points_earned": 100
40
+ }
41
+ ],
42
+ "badges": [
43
+ "beginner"
44
+ ],
45
+ "achievements": [
46
+ "first_quiz"
47
+ ],
48
+ "current_streak": 4,
49
+ "best_streak": 4
50
+ }
src/data/scores_guest_1751865336.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 350,
3
+ "quizzes_completed": 3,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-07T10:46:08.756593",
7
+ "mode": "MCQ Quiz",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ },
14
+ {
15
+ "timestamp": "2025-07-07T10:46:16.636408",
16
+ "mode": "MCQ Quiz",
17
+ "score": 1,
18
+ "total": 1,
19
+ "difficulty": "Medium",
20
+ "percentage": 100.0,
21
+ "points_earned": 150
22
+ },
23
+ {
24
+ "timestamp": "2025-07-07T10:46:43.859575",
25
+ "mode": "MCQ Quiz",
26
+ "score": 1,
27
+ "total": 1,
28
+ "difficulty": "Easy",
29
+ "percentage": 100.0,
30
+ "points_earned": 100
31
+ }
32
+ ],
33
+ "badges": [
34
+ "beginner"
35
+ ],
36
+ "achievements": [
37
+ "first_quiz"
38
+ ],
39
+ "current_streak": 3,
40
+ "best_streak": 3
41
+ }
src/data/scores_guest_1751867508.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 450,
3
+ "quizzes_completed": 4,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-07T11:22:33.323825",
7
+ "mode": "MCQ Quiz",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ },
14
+ {
15
+ "timestamp": "2025-07-07T11:22:46.155025",
16
+ "mode": "MCQ Quiz",
17
+ "score": 1,
18
+ "total": 1,
19
+ "difficulty": "Medium",
20
+ "percentage": 100.0,
21
+ "points_earned": 150
22
+ },
23
+ {
24
+ "timestamp": "2025-07-07T11:22:59.217803",
25
+ "mode": "MCQ Quiz",
26
+ "score": 1,
27
+ "total": 1,
28
+ "difficulty": "Easy",
29
+ "percentage": 100.0,
30
+ "points_earned": 100
31
+ },
32
+ {
33
+ "timestamp": "2025-07-07T11:23:07.458208",
34
+ "mode": "MCQ Quiz",
35
+ "score": 1,
36
+ "total": 1,
37
+ "difficulty": "Easy",
38
+ "percentage": 100.0,
39
+ "points_earned": 100
40
+ }
41
+ ],
42
+ "badges": [
43
+ "beginner"
44
+ ],
45
+ "achievements": [
46
+ "first_quiz"
47
+ ],
48
+ "current_streak": 4,
49
+ "best_streak": 4
50
+ }
src/data/scores_guest_1751869587.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 0,
3
+ "quizzes_completed": 1,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-07T11:58:38.071821",
7
+ "mode": "MCQ Quiz",
8
+ "score": 0,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 0.0,
12
+ "points_earned": 0
13
+ }
14
+ ],
15
+ "badges": [],
16
+ "achievements": [
17
+ "first_quiz"
18
+ ],
19
+ "current_streak": 0,
20
+ "best_streak": 0
21
+ }
src/data/scores_guest_1751949545.json ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 800,
3
+ "quizzes_completed": 10,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-08T10:12:25.289869",
7
+ "mode": "Challenge Mode",
8
+ "score": 0,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 0.0,
12
+ "points_earned": 0
13
+ },
14
+ {
15
+ "timestamp": "2025-07-08T10:12:44.273605",
16
+ "mode": "Flashcards",
17
+ "score": 1,
18
+ "total": 1,
19
+ "difficulty": "Easy",
20
+ "percentage": 100.0,
21
+ "points_earned": 100
22
+ },
23
+ {
24
+ "timestamp": "2025-07-08T10:12:53.409539",
25
+ "mode": "Flashcards",
26
+ "score": 0,
27
+ "total": 1,
28
+ "difficulty": "Easy",
29
+ "percentage": 0.0,
30
+ "points_earned": 0
31
+ },
32
+ {
33
+ "timestamp": "2025-07-08T10:13:03.259232",
34
+ "mode": "Flashcards",
35
+ "score": 1,
36
+ "total": 1,
37
+ "difficulty": "Easy",
38
+ "percentage": 100.0,
39
+ "points_earned": 100
40
+ },
41
+ {
42
+ "timestamp": "2025-07-08T10:13:08.804007",
43
+ "mode": "Flashcards",
44
+ "score": 1,
45
+ "total": 1,
46
+ "difficulty": "Easy",
47
+ "percentage": 100.0,
48
+ "points_earned": 100
49
+ },
50
+ {
51
+ "timestamp": "2025-07-08T10:13:13.568333",
52
+ "mode": "Flashcards",
53
+ "score": 1,
54
+ "total": 1,
55
+ "difficulty": "Easy",
56
+ "percentage": 100.0,
57
+ "points_earned": 100
58
+ },
59
+ {
60
+ "timestamp": "2025-07-08T10:13:17.004575",
61
+ "mode": "Flashcards",
62
+ "score": 1,
63
+ "total": 1,
64
+ "difficulty": "Easy",
65
+ "percentage": 100.0,
66
+ "points_earned": 100
67
+ },
68
+ {
69
+ "timestamp": "2025-07-08T10:13:23.690623",
70
+ "mode": "Flashcards",
71
+ "score": 1,
72
+ "total": 1,
73
+ "difficulty": "Easy",
74
+ "percentage": 100.0,
75
+ "points_earned": 100
76
+ },
77
+ {
78
+ "timestamp": "2025-07-08T10:13:29.516462",
79
+ "mode": "Flashcards",
80
+ "score": 1,
81
+ "total": 1,
82
+ "difficulty": "Easy",
83
+ "percentage": 100.0,
84
+ "points_earned": 100
85
+ },
86
+ {
87
+ "timestamp": "2025-07-08T10:13:33.648094",
88
+ "mode": "Flashcards",
89
+ "score": 1,
90
+ "total": 1,
91
+ "difficulty": "Easy",
92
+ "percentage": 100.0,
93
+ "points_earned": 100
94
+ }
95
+ ],
96
+ "badges": [
97
+ "beginner",
98
+ "learner"
99
+ ],
100
+ "achievements": [
101
+ "first_quiz",
102
+ "streak_5"
103
+ ],
104
+ "current_streak": 7,
105
+ "best_streak": 7
106
+ }
src/data/scores_guest_1751950590.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 100,
3
+ "quizzes_completed": 1,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-08T10:26:43.623700",
7
+ "mode": "Fact Game",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ }
14
+ ],
15
+ "badges": [
16
+ "beginner"
17
+ ],
18
+ "achievements": [
19
+ "first_quiz"
20
+ ],
21
+ "current_streak": 1,
22
+ "best_streak": 1
23
+ }
src/data/scores_guest_1751952184.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 200,
3
+ "quizzes_completed": 2,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-08T10:57:46.096912",
7
+ "mode": "Fact Game",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ },
14
+ {
15
+ "timestamp": "2025-07-08T10:58:04.514264",
16
+ "mode": "Flashcards",
17
+ "score": 1,
18
+ "total": 1,
19
+ "difficulty": "Easy",
20
+ "percentage": 100.0,
21
+ "points_earned": 100
22
+ }
23
+ ],
24
+ "badges": [
25
+ "beginner"
26
+ ],
27
+ "achievements": [
28
+ "first_quiz"
29
+ ],
30
+ "current_streak": 2,
31
+ "best_streak": 2
32
+ }
src/data/scores_user_1751958071.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_score": 100,
3
+ "quizzes_completed": 1,
4
+ "quiz_history": [
5
+ {
6
+ "timestamp": "2025-07-08T12:33:24.688611",
7
+ "mode": "Flashcards",
8
+ "score": 1,
9
+ "total": 1,
10
+ "difficulty": "Easy",
11
+ "percentage": 100.0,
12
+ "points_earned": 100
13
+ }
14
+ ],
15
+ "badges": [
16
+ "beginner"
17
+ ],
18
+ "achievements": [
19
+ "first_quiz"
20
+ ],
21
+ "current_streak": 1,
22
+ "best_streak": 1
23
+ }
src/data/user_scores.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "demo_user": {
3
+ "total_score": 1500,
4
+ "quizzes_completed": 15,
5
+ "badges": [
6
+ "beginner",
7
+ "learner"
8
+ ],
9
+ "achievements": [
10
+ "first_quiz",
11
+ "streak_5"
12
+ ],
13
+ "quiz_history": [
14
+ {
15
+ "timestamp": "2024-01-01T10:00:00",
16
+ "mode": "MCQ Quiz",
17
+ "score": 8,
18
+ "total": 10,
19
+ "difficulty": "Medium",
20
+ "percentage": 80.0
21
+ }
22
+ ],
23
+ "stats": {
24
+ "mcq": {
25
+ "played": 50,
26
+ "correct": 40
27
+ },
28
+ "flashcards": {
29
+ "played": 30,
30
+ "completed": 25
31
+ },
32
+ "facts": {
33
+ "played": 20,
34
+ "score": 18
35
+ }
36
+ },
37
+ "streaks": {
38
+ "current": 3,
39
+ "best": 7
40
+ }
41
+ }
42
+ }
src/data/users.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "demo_user": {
3
+ "password": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5",
4
+ "email": "demo@example.com",
5
+ "created": "2024-01-01T00:00:00",
6
+ "last_login": "2024-01-01T00:00:00"
7
+ },
8
+ "bharath": {
9
+ "password": "5dbbc18c570062345ef8a30609d9a110d4a6736981f3600e39bf3f96400fc529",
10
+ "email": "",
11
+ "created": "2025-07-01T14:23:16.969698",
12
+ "last_login": "2025-07-01T14:23:16.969713"
13
+ }
14
+ }
src/modules/__pycache__/adaptive_engine.cpython-311.pyc ADDED
Binary file (10.1 kB). View file
 
src/modules/__pycache__/adaptive_engine.cpython-312.pyc ADDED
Binary file (11.2 kB). View file
 
src/modules/__pycache__/adaptive_engine.cpython-313.pyc ADDED
Binary file (9.32 kB). View file
 
src/modules/__pycache__/api_utils.cpython-311.pyc ADDED
Binary file (5.45 kB). View file
 
src/modules/__pycache__/api_utils.cpython-312.pyc ADDED
Binary file (8.42 kB). View file
 
src/modules/__pycache__/api_utils.cpython-313.pyc ADDED
Binary file (4.74 kB). View file
 
src/modules/__pycache__/fact_game.cpython-311.pyc ADDED
Binary file (9.24 kB). View file
 
src/modules/__pycache__/fact_game.cpython-312.pyc ADDED
Binary file (8 kB). View file
 
src/modules/__pycache__/fact_game.cpython-313.pyc ADDED
Binary file (8.19 kB). View file
 
src/modules/__pycache__/flashcard_generator.cpython-311.pyc ADDED
Binary file (5.01 kB). View file
 
src/modules/__pycache__/flashcard_generator.cpython-312.pyc ADDED
Binary file (5.8 kB). View file
 
src/modules/__pycache__/flashcard_generator.cpython-313.pyc ADDED
Binary file (4.43 kB). View file
 
src/modules/__pycache__/hf_llm_generator.cpython-312.pyc ADDED
Binary file (4.43 kB). View file
 
src/modules/__pycache__/info_page.cpython-312.pyc ADDED
Binary file (4.35 kB). View file
 
src/modules/__pycache__/mcq_generator.cpython-311.pyc ADDED
Binary file (6.15 kB). View file
 
src/modules/__pycache__/mcq_generator.cpython-312.pyc ADDED
Binary file (7.78 kB). View file
 
src/modules/__pycache__/mcq_generator.cpython-313.pyc ADDED
Binary file (5.47 kB). View file