File size: 8,039 Bytes
5b1b4f3 3c7fdc7 5b1b4f3 80f35e8 5b1b4f3 3c7fdc7 80f35e8 3c7fdc7 80f35e8 3c7fdc7 5b1b4f3 3c7fdc7 5b1b4f3 |
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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Learning Engine API | QuantumCode</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Space Grotesk', sans-serif;
background-color: #0f172a;
color: #e2e8f0;
}
.gradient-text {
background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.glass-card {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 1rem;
}
.endpoint-card {
border-left: 4px solid #7c3aed;
}
code {
background: rgba(124, 58, 237, 0.2);
padding: 0.2rem 0.4rem;
border-radius: 0.25rem;
font-family: monospace;
}
</style>
</head>
<body class="min-h-screen">
<nav class="px-6 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="cpu" class="text-indigo-500"></i>
<span class="text-xl font-bold gradient-text">QuantumCode</span>
</div>
<div class="flex items-center space-x-2">
<a href="i18n-setup.html" class="flex items-center text-sm hover:text-indigo-400 transition-colors">
<i data-feather="globe" class="w-4 h-4 mr-1"></i>
<span id="currentLang">EN</span>
</a>
</div>
<div class="hidden md:flex space-x-8">
<a href="index.html" class="hover:text-indigo-400 transition-colors">Home</a>
<a href="index.html#features" class="hover:text-indigo-400 transition-colors">Features</a>
<a href="index.html#roadmap" class="hover:text-indigo-400 transition-colors">Roadmap</a>
<a href="data-architecture.html" class="hover:text-indigo-400 transition-colors">Data Architecture</a>
<a href="learning-engine.html" class="text-indigo-400">Learning Engine</a>
<a href="auth.html" class="hover:text-indigo-400 transition-colors">Login</a>
<a href="select-role.html" class="hover:text-indigo-400 transition-colors">Roles</a>
<a href="progress-report.html" class="hover:text-indigo-400 transition-colors">Progress</a>
</div>
</nav>
<main class="container mx-auto px-4 py-16">
<section class="max-w-6xl mx-auto mb-20">
<h1 class="text-4xl md:text-5xl font-bold mb-6">
<span class="gradient-text">Learning Engine</span> API Documentation
</h1>
<p class="text-xl text-slate-300 mb-10">
RESTful API for managing courses, modules, lessons and tracking learning metrics.
</p>
<div class="glass-card endpoint-card p-8 mb-12">
<h2 class="text-2xl font-bold mb-6">Course Structure</h2>
<div class="mb-8">
<h3 class="text-xl font-bold mb-4">Courses → Modules → Lessons Hierarchy</h3>
<div class="bg-slate-800/50 p-6 rounded-lg mb-6">
<pre><code>
{
"course": {
"id": "string",
"title": "string",
"description": "string",
"modules": [
{
"id": "string",
"title": "string",
"lessons": [
{
"id": "string",
"title": "string",
"exercises": [
{
"id": "string",
"type": "speaking|listening|vocabulary|grammar|speak-brave"
}
]
}
]
}
]
}
}
</code></pre>
</div>
</div>
</div>
<div class="glass-card endpoint-card p-8 mb-12">
<h2 class="text-2xl font-bold mb-6">API Endpoints</h2>
<div class="mb-8">
<h3 class="text-xl font-bold mb-4 flex items-center">
<span class="px-3 py-1 bg-indigo-900/30 text-indigo-400 rounded mr-3">GET</span>
<code>/api/courses</code>
</h3>
<p class="text-slate-300 mb-4">Retrieve all available courses</p>
<div class="bg-slate-800/50 p-6 rounded-lg">
<pre><code>// Response
[
{
"id": "course-123",
"title": "Beginner English",
"description": "Basic English for beginners",
"language": "en",
"difficulty": "beginner"
}
]</code></pre>
</div>
</div>
<div class="mb-8">
<h3 class="text-xl font-bold mb-4 flex items-center">
<span class="px-3 py-1 bg-green-900/30 text-green-400 rounded mr-3">POST</span>
<code>/api/courses</code>
</h3>
<p class="text-slate-300 mb-4">Create a new course (Admin only)</p>
<div class="bg-slate-800/50 p-6 rounded-lg">
<pre><code>// Request Body
{
"title": "Advanced English",
"description": "Advanced English course",
"language": "en",
"difficulty": "advanced"
}
// Response
{
"id": "course-456",
"status": "created"
}</code></pre>
</div>
</div>
</div>
<div class="glass-card endpoint-card p-8 mb-12">
<h2 class="text-2xl font-bold mb-6">Progress Tracking</h2>
<div class="mb-4">
<h3 class="text-xl font-bold mb-4 flex items-center">
<span class="px-3 py-1 bg-purple-900/30 text-purple-400 rounded mr-3">PATCH</span>
<code>/api/lessons/{lessonId}/progress</code>
</h3>
<p class="text-slate-300 mb-4">Update lesson progress metrics</p>
<div class="bg-slate-800/50 p-6 rounded-lg">
<pre><code>// Request Body
{
"speaking": {
"score": 75,
"timeSpent": 120,
"attempts": 3
},
"listening": {
"score": 80,
"timeSpent": 90,
"attempts": 2
},
"vocabulary": {
"score": 90,
"timeSpent": 60,
"attempts": 1
},
"grammar": {
"score": 70,
"timeSpent": 150,
"attempts": 4
},
"speakBraveScore": {
"confidence": 85,
"clarity": 80,
"fluency": 75,
"emotionalImpact": 90
},
"confidence": 85,
"completionStatus": "completed",
"masteryPercentage": 78.75
}
// Response
{
"lessonId": "lesson-789",
"updated": true,
"report": {
"totalTime": 420,
"totalAttempts": 10,
"weakestArea": "grammar",
"nextSteps": [
"Review past tense exercises",
"Practice with audio drills",
"Complete bonus vocabulary quiz"
]
}
}</code></pre>
</div>
</div>
</div>
</section>
</main>
<footer class="py-12 border-t border-slate-800">
<div class="container mx-auto px-4 text-center">
<p class="text-slate-500 text-sm">
© 2023 QuantumCode AI Architect. All rights reserved.
</p>
</div>
</footer>
<script>
// Set initial language
document.getElementById('currentLang').textContent =
document.cookie.match('(^|;)\\s*NEXT_LOCALE\\s*=\\s*([^;]+)')?.pop() || 'EN';
feather.replace();
</script>
</body>
</html> |