muthuk1 commited on
Commit
3eafcdd
·
verified ·
1 Parent(s): ed07c96

Add comprehensive SETUP.md — beginner guide with cost-effective model recommendations, free tier options, step-by-step install, feature-by-feature config, Docker deployment, troubleshooting, FAQ

Browse files
Files changed (1) hide show
  1. SETUP.md +584 -0
SETUP.md ADDED
@@ -0,0 +1,584 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🚀 SETUP.md — MultiMind Classroom Setup Guide
2
+
3
+ > Complete beginner-friendly guide to install, configure, run, and use MultiMind Classroom.
4
+ > Includes cost-effective AI model recommendations for every feature.
5
+
6
+ ---
7
+
8
+ ## 📋 Table of Contents
9
+
10
+ 1. [Prerequisites](#1-prerequisites)
11
+ 2. [Installation (Step by Step)](#2-installation-step-by-step)
12
+ 3. [Running the App](#3-running-the-app)
13
+ 4. [Configuration — Which API Keys Do I Need?](#4-configuration--which-api-keys-do-i-need)
14
+ 5. [Best & Most Cost-Effective AI Models](#5-best--most-cost-effective-ai-models)
15
+ 6. [Feature-by-Feature Setup](#6-feature-by-feature-setup)
16
+ 7. [Free Tier & Zero-Cost Options](#7-free-tier--zero-cost-options)
17
+ 8. [Recommended Starter Configurations](#8-recommended-starter-configurations)
18
+ 9. [Docker Deployment](#9-docker-deployment)
19
+ 10. [Troubleshooting](#10-troubleshooting)
20
+ 11. [FAQ](#11-faq)
21
+
22
+ ---
23
+
24
+ ## 1. Prerequisites
25
+
26
+ | Requirement | Minimum | Recommended |
27
+ |-------------|---------|-------------|
28
+ | **Node.js** | 20.9.0+ | 22.x LTS |
29
+ | **npm** or **pnpm** | npm 10+ or pnpm 10+ | pnpm (faster) |
30
+ | **OS** | Windows 10+, macOS 12+, Linux | Any modern OS |
31
+ | **RAM** | 4 GB | 8 GB+ |
32
+ | **Browser** | Chrome 100+, Firefox 100+, Edge 100+, Safari 16+ | Chrome or Edge (best WebRTC/TTS support) |
33
+
34
+ ### Check your environment
35
+
36
+ ```bash
37
+ node --version # Should show v20.x or v22.x
38
+ npm --version # Should show 10.x+
39
+ ```
40
+
41
+ **Don't have Node.js?** Download from [nodejs.org](https://nodejs.org/) — pick the **LTS** version.
42
+
43
+ ---
44
+
45
+ ## 2. Installation (Step by Step)
46
+
47
+ ### Step 1: Clone the repository
48
+
49
+ ```bash
50
+ git clone https://huggingface.co/muthuk1/OpenMAIC-React
51
+ cd OpenMAIC-React
52
+ ```
53
+
54
+ ### Step 2: Install dependencies
55
+
56
+ ```bash
57
+ npm install --legacy-peer-deps
58
+ ```
59
+
60
+ > **Why `--legacy-peer-deps`?** Some packages have peer dependency version mismatches. This flag tells npm to install them anyway. It's safe.
61
+
62
+ ### Step 3: Build workspace packages
63
+
64
+ The app uses two local packages that need to be built first:
65
+
66
+ ```bash
67
+ # Build mathml2omml (MathML → OMML converter for PowerPoint export)
68
+ cd packages/mathml2omml
69
+ npm install
70
+ npm run build
71
+ cd ../..
72
+
73
+ # Build pptxgenjs (PowerPoint generation library)
74
+ cd packages/pptxgenjs
75
+ npm install @rollup/plugin-node-resolve @rollup/plugin-commonjs @rollup/plugin-typescript typescript tslib --save-dev
76
+ npx tsc --outDir ./dist-tsc --declaration --module es2020 --target es2016 --moduleResolution node --esModuleInterop true --allowSyntheticDefaultImports true --strict --strictNullChecks false --noImplicitAny false --lib dom,es2020 --skipLibCheck
77
+ mkdir -p dist
78
+ # Bundle compiled JS
79
+ cat > rollup.temp.mjs << 'EOF'
80
+ import resolve from "@rollup/plugin-node-resolve";
81
+ import commonjs from "@rollup/plugin-commonjs";
82
+ export default {
83
+ input: "dist-tsc/pptxgen.js",
84
+ output: [
85
+ { file: "./dist/pptxgen.es.js", format: "es" },
86
+ { file: "./dist/pptxgen.cjs.js", format: "cjs", exports: "default" },
87
+ ],
88
+ external: [/^node:.*/, "jszip"],
89
+ plugins: [resolve({ preferBuiltins: true }), commonjs()]
90
+ };
91
+ EOF
92
+ npx rollup -c rollup.temp.mjs
93
+ cp types/index.d.ts dist/
94
+ rm rollup.temp.mjs
95
+ cd ../..
96
+
97
+ # Install local packages into the main project
98
+ npm install ./packages/mathml2omml ./packages/pptxgenjs --legacy-peer-deps
99
+ ```
100
+
101
+ ### Step 4: Configure environment
102
+
103
+ ```bash
104
+ cp .env.example .env
105
+ ```
106
+
107
+ Edit `.env` with your API keys (see [Section 4](#4-configuration--which-api-keys-do-i-need) for which keys you actually need).
108
+
109
+ ### Step 5: Verify the build
110
+
111
+ ```bash
112
+ npm run build
113
+ ```
114
+
115
+ You should see `✓ built in ~25s` with no errors.
116
+
117
+ ---
118
+
119
+ ## 3. Running the App
120
+
121
+ ### Development mode (with hot reload)
122
+
123
+ ```bash
124
+ npm run dev
125
+ ```
126
+
127
+ Opens at **http://localhost:5173**
128
+
129
+ ### Production preview
130
+
131
+ ```bash
132
+ npm run build
133
+ npm run preview
134
+ ```
135
+
136
+ Opens at **http://localhost:4173**
137
+
138
+ ### What you'll see
139
+
140
+ 1. **Home page** — A clean interface with a text area to type your lesson requirements
141
+ 2. **Upload a PDF** or type what you want to teach
142
+ 3. Click **Generate** — the app creates an AI classroom with slides, quizzes, and interactive content
143
+ 4. **Enter the classroom** — watch the AI teacher present with voice, whiteboard, and discussion
144
+
145
+ ---
146
+
147
+ ## 4. Configuration — Which API Keys Do I Need?
148
+
149
+ ### The short answer: **You only need ONE LLM API key to get started.**
150
+
151
+ Everything else is optional. Here's what each key unlocks:
152
+
153
+ | Feature | Required Key | Can You Skip It? |
154
+ |---------|-------------|-----------------|
155
+ | 🧠 **Classroom generation** (slides, quizzes, actions) | Any LLM key (OpenAI, Google, etc.) | ❌ No — this is the core feature |
156
+ | 🗣️ **Voice narration** (TTS) | TTS provider key OR use browser TTS | ✅ Yes — browser TTS works free |
157
+ | 🎤 **Voice input** (ASR) | ASR provider key OR use browser ASR | ✅ Yes — browser ASR works free |
158
+ | 🖼️ **AI image generation** in slides | Image provider key | ✅ Yes — slides work without images |
159
+ | 🎬 **AI video generation** in slides | Video provider key | ✅ Yes — slides work without videos |
160
+ | 🔍 **Web search** for content enrichment | Tavily API key | ✅ Yes — generation works without search |
161
+ | 📄 **Advanced PDF parsing** | MinerU Cloud key | ✅ Yes — built-in unpdf parser is free |
162
+
163
+ ### Minimum viable setup: just ONE key
164
+
165
+ Pick one LLM provider and set its key in `.env`:
166
+
167
+ ```env
168
+ # Option A: Google Gemini (BEST FREE OPTION)
169
+ GOOGLE_API_KEY=your-key-here
170
+
171
+ # Option B: OpenAI
172
+ OPENAI_API_KEY=your-key-here
173
+
174
+ # Option C: DeepSeek (cheapest paid)
175
+ DEEPSEEK_API_KEY=your-key-here
176
+ ```
177
+
178
+ ---
179
+
180
+ ## 5. Best & Most Cost-Effective AI Models
181
+
182
+ ### 🧠 LLM — For Classroom Generation (THE most important choice)
183
+
184
+ | Tier | Provider | Model | Price (per 1M tokens) | Quality | Best For |
185
+ |------|----------|-------|----------------------|---------|----------|
186
+ | 🆓 **FREE** | Google | `gemini-2.5-flash` | **$0 (free tier: 500 req/day)** | ⭐⭐⭐⭐ | **Best free option. Start here.** |
187
+ | 🆓 **FREE** | Google | `gemini-2.5-flash-lite` | **$0 (free tier)** | ⭐⭐⭐ | Faster, simpler content |
188
+ | 💰 **Budget** | DeepSeek | `deepseek-chat` | **$0.14 input / $0.28 output** | ⭐⭐⭐⭐ | Best bang-for-buck paid option |
189
+ | 💰 **Budget** | GLM (ZhipuAI) | `glm-4.7-flash` | **Free tier available** | ⭐⭐⭐⭐ | Great for Chinese content |
190
+ | 💵 **Mid** | OpenAI | `gpt-4o-mini` | $0.15 / $0.60 | ⭐⭐⭐⭐ | Good balance of cost & quality |
191
+ | 💵 **Mid** | Anthropic | `claude-haiku-4-5` | $0.80 / $4.00 | ⭐⭐⭐⭐⭐ | Better slide layouts |
192
+ | 💎 **Premium** | OpenAI | `gpt-5.5` | $2.00 / $10.00 | ⭐⭐⭐⭐⭐ | Best overall quality |
193
+ | 💎 **Premium** | Anthropic | `claude-sonnet-4-5` | $3.00 / $15.00 | ⭐⭐⭐⭐⭐ | Best reasoning & creativity |
194
+ | 💎 **Premium** | Google | `gemini-2.5-pro` | $1.25 / $10.00 | ⭐⭐⭐⭐⭐ | Longest context (1M tokens) |
195
+ | 🏠 **Local** | Ollama | `llama3.3`, `qwen2.5` | **$0 (runs on your GPU)** | ⭐⭐⭐ | Privacy, no internet needed |
196
+
197
+ > **💡 My recommendation:** Start with **Google Gemini 2.5 Flash** (free). If you need better quality, switch to **DeepSeek** ($0.14/M) or **GPT-4o-mini** ($0.15/M).
198
+
199
+ ### 🗣️ TTS — Voice Narration
200
+
201
+ | Tier | Provider | Voice | Price | Quality | Setup |
202
+ |------|----------|-------|-------|---------|-------|
203
+ | 🆓 **FREE** | Browser Native | System voices | **$0** | ⭐⭐ | No setup needed — works in Chrome/Edge |
204
+ | 💰 **Budget** | OpenAI | alloy, nova, shimmer | $15.00/1M chars | ⭐⭐⭐⭐⭐ | Best quality-to-price ratio |
205
+ | 💰 **Budget** | MiniMax | speech-02 | ~$0.50/1M chars (Chinese pricing) | ⭐⭐⭐⭐ | Great for Chinese voices |
206
+ | 💵 **Mid** | Azure | 500+ voices | $16.00/1M chars | ⭐⭐⭐⭐⭐ | Most voice variety, many languages |
207
+ | 💵 **Mid** | ElevenLabs | Custom voices | $11.00/1M chars | ⭐⭐⭐⭐⭐ | Most natural sounding |
208
+ | 💎 **Advanced** | VoxCPM | Voice cloning | Self-hosted | ⭐⭐⭐⭐ | Clone any voice |
209
+
210
+ > **💡 My recommendation:** Start with **Browser TTS** (free, decent quality in Chrome). Upgrade to **OpenAI TTS** ($15/1M chars) when you want natural voices.
211
+
212
+ ### 🎤 ASR — Voice Input (Speech-to-Text)
213
+
214
+ | Tier | Provider | Price | Quality |
215
+ |------|----------|-------|---------|
216
+ | 🆓 **FREE** | Browser Native (Web Speech API) | **$0** | ⭐⭐⭐ — Works in Chrome/Edge |
217
+ | 💰 **Best** | OpenAI Whisper | $0.006/minute | ⭐⭐⭐⭐⭐ — Best accuracy |
218
+ | 💰 **Budget** | Qwen ASR | Low (Chinese pricing) | ⭐⭐⭐⭐ — Great for Chinese |
219
+
220
+ > **💡 My recommendation:** **Browser ASR** is free and good enough. Use **Whisper** only if you need high accuracy.
221
+
222
+ ### 🖼️ Image Generation (Optional)
223
+
224
+ | Tier | Provider | Model | Price per image | Quality |
225
+ |------|----------|-------|----------------|---------|
226
+ | 💰 **Budget** | OpenAI | `gpt-image-1-mini` | ~$0.02 | ⭐⭐⭐⭐ |
227
+ | 💵 **Mid** | OpenAI | `gpt-image-2` | ~$0.04-0.08 | ⭐⭐⭐⭐⭐ |
228
+ | 💵 **Mid** | Grok | `grok-image` | ~$0.05 | ⭐⭐⭐⭐ |
229
+ | 💵 **Mid** | MiniMax | `image-01` | ~$0.03 | ⭐⭐⭐⭐ |
230
+ | 💎 **Premium** | Seedream | `seedream-5.0` | ~$0.02 | ⭐⭐⭐⭐⭐ (Chinese provider) |
231
+
232
+ > **💡 My recommendation:** Skip images initially. When ready, **OpenAI gpt-image-1-mini** at $0.02/image is excellent value.
233
+
234
+ ### 🎬 Video Generation (Optional, Expensive)
235
+
236
+ | Provider | Model | Price | Duration |
237
+ |----------|-------|-------|----------|
238
+ | Kling | kling-v2.6 | ~$0.10-0.30/video | 5-10s |
239
+ | Seedance | seedance-1.5-pro | ~$0.05-0.15/video | 5-10s |
240
+ | Veo | veo-3 | ~$0.10/video | 5-8s |
241
+
242
+ > **💡 My recommendation:** Skip video generation unless you specifically need it. It's expensive and slow (30-120s per video).
243
+
244
+ ### 🔍 Web Search (Optional)
245
+
246
+ | Provider | Free Tier | Paid Price |
247
+ |----------|-----------|-----------|
248
+ | Tavily | **1,000 free searches/month** | $0.001/search after |
249
+
250
+ > **💡 My recommendation:** Get a **free Tavily key** — 1,000 searches/month is plenty.
251
+
252
+ ### 📄 PDF Parsing
253
+
254
+ | Provider | Price | Quality |
255
+ |----------|-------|---------|
256
+ | unpdf (built-in) | **$0 — always free** | ⭐⭐⭐ — Good for simple PDFs |
257
+ | MinerU (local) | **$0 — self-hosted** | ⭐⭐⭐⭐ — Better for complex layouts |
258
+ | MinerU Cloud | Pay-per-use | ⭐⭐⭐⭐⭐ — Best for scanned/complex PDFs |
259
+
260
+ > **💡 My recommendation:** The built-in **unpdf** parser is free and works fine for most PDFs. No setup needed.
261
+
262
+ ---
263
+
264
+ ## 6. Feature-by-Feature Setup
265
+
266
+ ### 🧠 Core: Classroom Generation
267
+
268
+ This is the only required feature. You need ONE LLM key.
269
+
270
+ **Option A: Google Gemini (FREE)**
271
+
272
+ 1. Go to [aistudio.google.com](https://aistudio.google.com/)
273
+ 2. Click "Get API key" → "Create API key"
274
+ 3. Add to `.env`:
275
+ ```env
276
+ GOOGLE_API_KEY=AIzaSy...your-key
277
+ ```
278
+ 4. In the app: Settings → Providers → Google → select `gemini-2.5-flash`
279
+
280
+ **Option B: OpenAI (Paid, best quality)**
281
+
282
+ 1. Go to [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
283
+ 2. Create a new API key
284
+ 3. Add credit ($5 minimum)
285
+ 4. Add to `.env`:
286
+ ```env
287
+ OPENAI_API_KEY=sk-...your-key
288
+ ```
289
+
290
+ **Option C: DeepSeek (Cheapest paid)**
291
+
292
+ 1. Go to [platform.deepseek.com](https://platform.deepseek.com/)
293
+ 2. Create account → Get API key
294
+ 3. Add to `.env`:
295
+ ```env
296
+ DEEPSEEK_API_KEY=sk-...your-key
297
+ ```
298
+
299
+ **Option D: Ollama (Free, local, needs GPU)**
300
+
301
+ 1. Install Ollama: [ollama.ai](https://ollama.ai/)
302
+ 2. Pull a model: `ollama pull llama3.3`
303
+ 3. Add to `.env`:
304
+ ```env
305
+ OLLAMA_BASE_URL=http://localhost:11434/v1
306
+ OLLAMA_MODELS=llama3.3
307
+ ALLOW_LOCAL_NETWORKS=true
308
+ ```
309
+
310
+ ### 🗣️ Voice Narration (TTS)
311
+
312
+ **Free option: Browser TTS (no setup needed)**
313
+ - Works out of the box in Chrome, Edge, Safari
314
+ - In the app: Settings → Audio → TTS Provider → "Browser"
315
+
316
+ **Paid option: OpenAI TTS**
317
+ - Same API key as LLM (if you're using OpenAI)
318
+ - In the app: Settings → Audio → TTS Provider → "OpenAI" → Voice → "nova" (recommended)
319
+
320
+ ### 🎤 Voice Input (ASR)
321
+
322
+ **Free option: Browser ASR (no setup needed)**
323
+ - Works in Chrome and Edge (not Firefox/Safari)
324
+ - Click the microphone button in the chat area
325
+
326
+ ### 🔍 Web Search
327
+
328
+ 1. Go to [tavily.com](https://tavily.com/) → Sign up (free)
329
+ 2. Get API key from dashboard
330
+ 3. Add to `.env`:
331
+ ```env
332
+ TAVILY_API_KEY=tvly-...your-key
333
+ ```
334
+ 4. Toggle "Web Search" on the home page when generating
335
+
336
+ ### 🖼️ Image Generation
337
+
338
+ **OpenAI Images (easiest):**
339
+ - Same API key as LLM
340
+ - In the app: Settings → Image → Provider → "OpenAI Image" → Model → "GPT Image 1 Mini"
341
+ - Toggle "Enable Image Generation" on the home page
342
+
343
+ ### 🎬 Video Generation
344
+
345
+ - Configure in Settings → Video → choose provider
346
+ - Video generation is slow (30-120 seconds per video) and expensive
347
+ - Only recommended for demo/showcase purposes
348
+
349
+ ---
350
+
351
+ ## 7. Free Tier & Zero-Cost Options
352
+
353
+ ### Completely free setup (no credit card needed):
354
+
355
+ ```env
356
+ # .env for 100% free setup
357
+ GOOGLE_API_KEY=your-gemini-key # Free: 500 requests/day
358
+ TAVILY_API_KEY=your-tavily-key # Free: 1,000 searches/month
359
+ ```
360
+
361
+ **What you get for free:**
362
+ - ✅ Full classroom generation (slides, quizzes, interactive content)
363
+ - ✅ Multi-agent discussions
364
+ - ✅ Voice narration (browser TTS)
365
+ - ✅ Voice input (browser ASR)
366
+ - ✅ PDF parsing (built-in unpdf)
367
+ - ✅ Web search enrichment (1,000/month)
368
+ - ✅ Whiteboard
369
+ - ✅ PowerPoint export
370
+ - ✅ Classroom ZIP export/import
371
+ - ❌ AI image generation (needs paid key)
372
+ - ❌ AI video generation (needs paid key)
373
+ - ❌ Premium voice quality (needs paid TTS key)
374
+
375
+ ### Monthly cost estimates:
376
+
377
+ | Usage Level | LLM | TTS | Images | Total |
378
+ |-------------|-----|-----|--------|-------|
379
+ | **Hobby** (5 classrooms/week) | $0 (Gemini free) | $0 (browser) | $0 (skip) | **$0/month** |
380
+ | **Regular** (3 classrooms/day) | ~$2 (DeepSeek) | $0 (browser) | $0 (skip) | **~$2/month** |
381
+ | **Power user** (10/day, with images) | ~$5 (DeepSeek) | ~$3 (OpenAI TTS) | ~$5 (images) | **~$13/month** |
382
+ | **Premium** (full features) | ~$20 (GPT-5.5) | ~$10 (Azure TTS) | ~$15 (images+video) | **~$45/month** |
383
+
384
+ ---
385
+
386
+ ## 8. Recommended Starter Configurations
387
+
388
+ ### 🟢 Configuration A: "Zero Cost Beginner"
389
+
390
+ ```env
391
+ GOOGLE_API_KEY=your-key
392
+ ```
393
+
394
+ - LLM: Gemini 2.5 Flash (free)
395
+ - TTS: Browser native (free)
396
+ - ASR: Browser native (free)
397
+ - PDF: unpdf built-in (free)
398
+ - Images/Video: disabled
399
+ - **Cost: $0/month**
400
+
401
+ ### 🟡 Configuration B: "Best Value"
402
+
403
+ ```env
404
+ GOOGLE_API_KEY=your-key
405
+ DEEPSEEK_API_KEY=your-key
406
+ TAVILY_API_KEY=your-key
407
+ ```
408
+
409
+ - LLM: DeepSeek Chat for generation, Gemini for backup
410
+ - TTS: Browser native
411
+ - Web Search: Tavily (1,000 free/month)
412
+ - **Cost: ~$2-5/month**
413
+
414
+ ### 🔵 Configuration C: "Full Experience"
415
+
416
+ ```env
417
+ OPENAI_API_KEY=your-key
418
+ GOOGLE_API_KEY=your-key
419
+ TAVILY_API_KEY=your-key
420
+ ```
421
+
422
+ - LLM: GPT-4o-mini (primary), Gemini 2.5 Pro (long docs)
423
+ - TTS: OpenAI TTS (same key)
424
+ - ASR: OpenAI Whisper (same key)
425
+ - Images: OpenAI Image (same key)
426
+ - Web Search: Tavily
427
+ - **Cost: ~$10-20/month**
428
+
429
+ ### 🟣 Configuration D: "Chinese Content Focus"
430
+
431
+ ```env
432
+ GLM_API_KEY=your-key
433
+ QWEN_API_KEY=your-key
434
+ DEEPSEEK_API_KEY=your-key
435
+ ```
436
+
437
+ - LLM: GLM-4.7-Flash or DeepSeek
438
+ - TTS: GLM TTS or MiniMax
439
+ - Best for Chinese language classroom content
440
+ - **Cost: ~$2-5/month**
441
+
442
+ ---
443
+
444
+ ## 9. Docker Deployment
445
+
446
+ ### Using Docker Compose (recommended for production)
447
+
448
+ ```bash
449
+ # 1. Create .env file with your API keys
450
+ cp .env.example .env
451
+ # Edit .env with your keys
452
+
453
+ # 2. Build and run
454
+ docker compose up -d
455
+
456
+ # 3. Access the app
457
+ open http://localhost:3000
458
+ ```
459
+
460
+ ### Using Dockerfile directly
461
+
462
+ ```bash
463
+ docker build -t multimind-classroom .
464
+ docker run -p 3000:3000 --env-file .env multimind-classroom
465
+ ```
466
+
467
+ ### Access Control (optional)
468
+
469
+ To password-protect your deployment:
470
+
471
+ ```env
472
+ ACCESS_CODE=my-secret-password
473
+ ```
474
+
475
+ Users will see a login screen and must enter this code.
476
+
477
+ ---
478
+
479
+ ## 10. Troubleshooting
480
+
481
+ ### Build fails with "Cannot find module"
482
+
483
+ ```bash
484
+ # Clean install
485
+ rm -rf node_modules package-lock.json
486
+ npm install --legacy-peer-deps
487
+ npm install ./packages/mathml2omml ./packages/pptxgenjs --legacy-peer-deps
488
+ npm run build
489
+ ```
490
+
491
+ ### "API key required" error
492
+
493
+ - Make sure your `.env` file is in the project root (same directory as `package.json`)
494
+ - Make sure you selected the correct provider in Settings → Providers
495
+ - Restart the dev server after changing `.env`
496
+
497
+ ### Browser TTS not working
498
+
499
+ - Browser TTS only works in Chrome, Edge, and Safari
500
+ - Firefox does not support Web Speech API synthesis
501
+ - Make sure your browser is not muted
502
+ - Try a different voice in Settings → Audio → TTS
503
+
504
+ ### Classroom generation is slow
505
+
506
+ - Gemini 2.5 Flash is fastest (2-5 seconds per scene)
507
+ - GPT-4o-mini is fast (3-8 seconds per scene)
508
+ - Claude models are slower (5-15 seconds per scene)
509
+ - A 10-slide classroom typically takes 30-120 seconds total
510
+
511
+ ### "Failed to parse PDF"
512
+
513
+ - The built-in unpdf parser works for most text-based PDFs
514
+ - Scanned/image PDFs need MinerU Cloud
515
+ - Very large PDFs (>50MB) may need to be split
516
+ - Try copy-pasting the text content directly into the requirements field
517
+
518
+ ### Images not loading in slides
519
+
520
+ - Check that you've enabled image generation in Settings
521
+ - Check that the image provider has a valid API key
522
+ - Generated images are stored in IndexedDB — clearing browser data removes them
523
+
524
+ ### Whiteboard not showing
525
+
526
+ - Click the pencil (✏️) icon in the bottom toolbar
527
+ - Whiteboard only appears on slide-type scenes (not quiz or interactive)
528
+
529
+ ---
530
+
531
+ ## 11. FAQ
532
+
533
+ **Q: Do I need to pay for anything?**
534
+ A: No. You can run the entire app for free using Google Gemini's free tier + browser TTS/ASR.
535
+
536
+ **Q: Can I use my own local LLM?**
537
+ A: Yes! Install Ollama, pull a model (e.g., `ollama pull llama3.3`), and configure it in `.env`. You need a GPU with at least 8GB VRAM for good results.
538
+
539
+ **Q: How much does it cost to generate one classroom?**
540
+ A: With Gemini free tier: $0. With DeepSeek: ~$0.01-0.05. With GPT-5.5: ~$0.20-0.50. Depends on PDF length and number of slides.
541
+
542
+ **Q: Can I export to PowerPoint?**
543
+ A: Yes! Click the export button (⬇️) in the classroom header and select "Export PPTX". All slides, text, shapes, charts, and images are included.
544
+
545
+ **Q: Does it work offline?**
546
+ A: The app itself runs locally, but AI generation needs internet access to call LLM APIs. If you use Ollama (local LLM), you can generate content offline. Previously generated classrooms are stored in IndexedDB and accessible offline.
547
+
548
+ **Q: What languages are supported?**
549
+ A: The UI supports 5 languages (Chinese, English, Japanese, Russian, Arabic). Classroom content can be generated in ANY language — just specify your desired language in the requirements field or let the AI auto-detect from your PDF.
550
+
551
+ **Q: Can multiple students use the same classroom?**
552
+ A: Currently, classrooms are stored locally in your browser. To share, export as a `.multimind.zip` file and share that file. Others can import it.
553
+
554
+ **Q: What PDF format works best?**
555
+ A: Text-based PDFs work best. The parser extracts text and images. For scanned PDFs, use MinerU Cloud. Maximum recommended size: 50MB.
556
+
557
+ **Q: How do I switch between AI providers mid-use?**
558
+ A: Click the Settings gear (⚙️) → Providers tab → select a different provider and model. The change takes effect immediately for the next generation.
559
+
560
+ ---
561
+
562
+ ## Quick Start Cheat Sheet
563
+
564
+ ```bash
565
+ # 1. Clone
566
+ git clone https://huggingface.co/muthuk1/OpenMAIC-React && cd OpenMAIC-React
567
+
568
+ # 2. Install
569
+ npm install --legacy-peer-deps
570
+
571
+ # 3. Build workspace packages
572
+ cd packages/mathml2omml && npm install && npm run build && cd ../..
573
+
574
+ # 4. Configure (minimum: one LLM key)
575
+ cp .env.example .env
576
+ echo "GOOGLE_API_KEY=your-key-here" >> .env
577
+
578
+ # 5. Run
579
+ npm run dev
580
+
581
+ # 6. Open http://localhost:5173 and generate your first classroom!
582
+ ```
583
+
584
+ **That's it!** Type a topic, click Generate, and watch MultiMind Classroom create an interactive AI lesson. 🎓