muboboev commited on
Commit
5b1b4f3
·
verified ·
1 Parent(s): 949f474

🎓 ЭТАП 3. Learning Engine (Sprint 3–5)

Browse files

Подэтап 3.1 — Модель курсов и уроков

Реализовать API /courses, /lessons, /modules.

Настроить CRUD для администраторов.

Поддержка вложенности: курс → урок → задание.

Добавить поля для: speaking, listening, vocabulary, grammar, confidence.

Files changed (3) hide show
  1. data-architecture.html +2 -1
  2. index.html +4 -4
  3. learning-engine.html +205 -0
data-architecture.html CHANGED
@@ -52,9 +52,10 @@
52
  <a href="index.html#features" class="hover:text-indigo-400 transition-colors">Features</a>
53
  <a href="index.html#roadmap" class="hover:text-indigo-400 transition-colors">Roadmap</a>
54
  <a href="data-architecture.html" class="text-indigo-400">Data Architecture</a>
 
55
  <a href="auth.html" class="hover:text-indigo-400 transition-colors">Login</a>
56
  <a href="select-role.html" class="hover:text-indigo-400 transition-colors">Roles</a>
57
- </div>
58
  </nav>
59
 
60
  <main class="container mx-auto px-4 py-16">
 
52
  <a href="index.html#features" class="hover:text-indigo-400 transition-colors">Features</a>
53
  <a href="index.html#roadmap" class="hover:text-indigo-400 transition-colors">Roadmap</a>
54
  <a href="data-architecture.html" class="text-indigo-400">Data Architecture</a>
55
+ <a href="learning-engine.html" class="hover:text-indigo-400 transition-colors">Learning Engine</a>
56
  <a href="auth.html" class="hover:text-indigo-400 transition-colors">Login</a>
57
  <a href="select-role.html" class="hover:text-indigo-400 transition-colors">Roles</a>
58
+ </div>
59
  </nav>
60
 
61
  <main class="container mx-auto px-4 py-16">
index.html CHANGED
@@ -47,13 +47,13 @@
47
  </a>
48
  </div>
49
  <div class="hidden md:flex space-x-8">
50
- <a href="#" class="hover:text-indigo-400 transition-colors">Features</a>
51
- <a href="#" class="hover:text-indigo-400 transition-colors">Roadmap</a>
52
  <a href="data-architecture.html" class="hover:text-indigo-400 transition-colors">Data Architecture</a>
 
53
  <a href="auth.html" class="hover:text-indigo-400 transition-colors">Login</a>
54
  <a href="select-role.html" class="hover:text-indigo-400 transition-colors">Roles</a>
55
- <a href="#" class="hover:text-indigo-400 transition-colors">Docs</a>
56
- </div>
57
  <button class="md:hidden">
58
  <i data-feather="menu"></i>
59
  </button>
 
47
  </a>
48
  </div>
49
  <div class="hidden md:flex space-x-8">
50
+ <a href="#features" class="hover:text-indigo-400 transition-colors">Features</a>
51
+ <a href="#roadmap" class="hover:text-indigo-400 transition-colors">Roadmap</a>
52
  <a href="data-architecture.html" class="hover:text-indigo-400 transition-colors">Data Architecture</a>
53
+ <a href="learning-engine.html" class="hover:text-indigo-400 transition-colors">Learning Engine</a>
54
  <a href="auth.html" class="hover:text-indigo-400 transition-colors">Login</a>
55
  <a href="select-role.html" class="hover:text-indigo-400 transition-colors">Roles</a>
56
+ </div>
 
57
  <button class="md:hidden">
58
  <i data-feather="menu"></i>
59
  </button>
learning-engine.html ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Learning Engine API | QuantumCode</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <style>
11
+ @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
12
+
13
+ body {
14
+ font-family: 'Space Grotesk', sans-serif;
15
+ background-color: #0f172a;
16
+ color: #e2e8f0;
17
+ }
18
+
19
+ .gradient-text {
20
+ background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
21
+ -webkit-background-clip: text;
22
+ background-clip: text;
23
+ color: transparent;
24
+ }
25
+
26
+ .glass-card {
27
+ background: rgba(15, 23, 42, 0.7);
28
+ backdrop-filter: blur(10px);
29
+ border: 1px solid rgba(255, 255, 255, 0.1);
30
+ border-radius: 1rem;
31
+ }
32
+
33
+ .endpoint-card {
34
+ border-left: 4px solid #7c3aed;
35
+ }
36
+
37
+ code {
38
+ background: rgba(124, 58, 237, 0.2);
39
+ padding: 0.2rem 0.4rem;
40
+ border-radius: 0.25rem;
41
+ font-family: monospace;
42
+ }
43
+ </style>
44
+ </head>
45
+ <body class="min-h-screen">
46
+ <nav class="px-6 py-4 flex justify-between items-center">
47
+ <div class="flex items-center space-x-2">
48
+ <i data-feather="cpu" class="text-indigo-500"></i>
49
+ <span class="text-xl font-bold gradient-text">QuantumCode</span>
50
+ </div>
51
+ <div class="flex items-center space-x-2">
52
+ <a href="i18n-setup.html" class="flex items-center text-sm hover:text-indigo-400 transition-colors">
53
+ <i data-feather="globe" class="w-4 h-4 mr-1"></i>
54
+ <span id="currentLang">EN</span>
55
+ </a>
56
+ </div>
57
+ <div class="hidden md:flex space-x-8">
58
+ <a href="index.html" class="hover:text-indigo-400 transition-colors">Home</a>
59
+ <a href="index.html#features" class="hover:text-indigo-400 transition-colors">Features</a>
60
+ <a href="index.html#roadmap" class="hover:text-indigo-400 transition-colors">Roadmap</a>
61
+ <a href="data-architecture.html" class="hover:text-indigo-400 transition-colors">Data Architecture</a>
62
+ <a href="learning-engine.html" class="text-indigo-400">Learning Engine</a>
63
+ <a href="auth.html" class="hover:text-indigo-400 transition-colors">Login</a>
64
+ <a href="select-role.html" class="hover:text-indigo-400 transition-colors">Roles</a>
65
+ </div>
66
+ </nav>
67
+
68
+ <main class="container mx-auto px-4 py-16">
69
+ <section class="max-w-6xl mx-auto mb-20">
70
+ <h1 class="text-4xl md:text-5xl font-bold mb-6">
71
+ <span class="gradient-text">Learning Engine</span> API Documentation
72
+ </h1>
73
+ <p class="text-xl text-slate-300 mb-10">
74
+ RESTful API for managing courses, modules, lessons and tracking learning metrics.
75
+ </p>
76
+
77
+ <div class="glass-card endpoint-card p-8 mb-12">
78
+ <h2 class="text-2xl font-bold mb-6">Course Structure</h2>
79
+ <div class="mb-8">
80
+ <h3 class="text-xl font-bold mb-4">Courses → Modules → Lessons Hierarchy</h3>
81
+ <div class="bg-slate-800/50 p-6 rounded-lg mb-6">
82
+ <pre><code>
83
+ {
84
+ "course": {
85
+ "id": "string",
86
+ "title": "string",
87
+ "description": "string",
88
+ "modules": [
89
+ {
90
+ "id": "string",
91
+ "title": "string",
92
+ "lessons": [
93
+ {
94
+ "id": "string",
95
+ "title": "string",
96
+ "exercises": [
97
+ {
98
+ "id": "string",
99
+ "type": "speaking|listening|vocabulary|grammar"
100
+ }
101
+ ]
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ </code></pre>
109
+ </div>
110
+ </div>
111
+ </div>
112
+
113
+ <div class="glass-card endpoint-card p-8 mb-12">
114
+ <h2 class="text-2xl font-bold mb-6">API Endpoints</h2>
115
+
116
+ <div class="mb-8">
117
+ <h3 class="text-xl font-bold mb-4 flex items-center">
118
+ <span class="px-3 py-1 bg-indigo-900/30 text-indigo-400 rounded mr-3">GET</span>
119
+ <code>/api/courses</code>
120
+ </h3>
121
+ <p class="text-slate-300 mb-4">Retrieve all available courses</p>
122
+ <div class="bg-slate-800/50 p-6 rounded-lg">
123
+ <pre><code>// Response
124
+ [
125
+ {
126
+ "id": "course-123",
127
+ "title": "Beginner English",
128
+ "description": "Basic English for beginners",
129
+ "language": "en",
130
+ "difficulty": "beginner"
131
+ }
132
+ ]</code></pre>
133
+ </div>
134
+ </div>
135
+
136
+ <div class="mb-8">
137
+ <h3 class="text-xl font-bold mb-4 flex items-center">
138
+ <span class="px-3 py-1 bg-green-900/30 text-green-400 rounded mr-3">POST</span>
139
+ <code>/api/courses</code>
140
+ </h3>
141
+ <p class="text-slate-300 mb-4">Create a new course (Admin only)</p>
142
+ <div class="bg-slate-800/50 p-6 rounded-lg">
143
+ <pre><code>// Request Body
144
+ {
145
+ "title": "Advanced English",
146
+ "description": "Advanced English course",
147
+ "language": "en",
148
+ "difficulty": "advanced"
149
+ }
150
+
151
+ // Response
152
+ {
153
+ "id": "course-456",
154
+ "status": "created"
155
+ }</code></pre>
156
+ </div>
157
+ </div>
158
+ </div>
159
+
160
+ <div class="glass-card endpoint-card p-8 mb-12">
161
+ <h2 class="text-2xl font-bold mb-6">Progress Tracking</h2>
162
+
163
+ <div class="mb-4">
164
+ <h3 class="text-xl font-bold mb-4 flex items-center">
165
+ <span class="px-3 py-1 bg-purple-900/30 text-purple-400 rounded mr-3">PATCH</span>
166
+ <code>/api/lessons/{lessonId}/progress</code>
167
+ </h3>
168
+ <p class="text-slate-300 mb-4">Update lesson progress metrics</p>
169
+ <div class="bg-slate-800/50 p-6 rounded-lg">
170
+ <pre><code>// Request Body
171
+ {
172
+ "speaking": 75,
173
+ "listening": 80,
174
+ "vocabulary": 90,
175
+ "grammar": 70,
176
+ "confidence": 85
177
+ }
178
+
179
+ // Response
180
+ {
181
+ "lessonId": "lesson-789",
182
+ "updated": true
183
+ }</code></pre>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ </section>
188
+ </main>
189
+
190
+ <footer class="py-12 border-t border-slate-800">
191
+ <div class="container mx-auto px-4 text-center">
192
+ <p class="text-slate-500 text-sm">
193
+ © 2023 QuantumCode AI Architect. All rights reserved.
194
+ </p>
195
+ </div>
196
+ </footer>
197
+ <script>
198
+ // Set initial language
199
+ document.getElementById('currentLang').textContent =
200
+ document.cookie.match('(^|;)\\s*NEXT_LOCALE\\s*=\\s*([^;]+)')?.pop() || 'EN';
201
+
202
+ feather.replace();
203
+ </script>
204
+ </body>
205
+ </html>