File size: 19,747 Bytes
3eafcdd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# πŸš€ SETUP.md β€” MultiMind Classroom Setup Guide

> Complete beginner-friendly guide to install, configure, run, and use MultiMind Classroom.
> Includes cost-effective AI model recommendations for every feature.

---

## πŸ“‹ Table of Contents

1. [Prerequisites](#1-prerequisites)
2. [Installation (Step by Step)](#2-installation-step-by-step)
3. [Running the App](#3-running-the-app)
4. [Configuration β€” Which API Keys Do I Need?](#4-configuration--which-api-keys-do-i-need)
5. [Best & Most Cost-Effective AI Models](#5-best--most-cost-effective-ai-models)
6. [Feature-by-Feature Setup](#6-feature-by-feature-setup)
7. [Free Tier & Zero-Cost Options](#7-free-tier--zero-cost-options)
8. [Recommended Starter Configurations](#8-recommended-starter-configurations)
9. [Docker Deployment](#9-docker-deployment)
10. [Troubleshooting](#10-troubleshooting)
11. [FAQ](#11-faq)

---

## 1. Prerequisites

| Requirement | Minimum | Recommended |
|-------------|---------|-------------|
| **Node.js** | 20.9.0+ | 22.x LTS |
| **npm** or **pnpm** | npm 10+ or pnpm 10+ | pnpm (faster) |
| **OS** | Windows 10+, macOS 12+, Linux | Any modern OS |
| **RAM** | 4 GB | 8 GB+ |
| **Browser** | Chrome 100+, Firefox 100+, Edge 100+, Safari 16+ | Chrome or Edge (best WebRTC/TTS support) |

### Check your environment

```bash
node --version    # Should show v20.x or v22.x
npm --version     # Should show 10.x+
```

**Don't have Node.js?** Download from [nodejs.org](https://nodejs.org/) β€” pick the **LTS** version.

---

## 2. Installation (Step by Step)

### Step 1: Clone the repository

```bash
git clone https://huggingface.co/muthuk1/OpenMAIC-React
cd OpenMAIC-React
```

### Step 2: Install dependencies

```bash
npm install --legacy-peer-deps
```

> **Why `--legacy-peer-deps`?** Some packages have peer dependency version mismatches. This flag tells npm to install them anyway. It's safe.

### Step 3: Build workspace packages

The app uses two local packages that need to be built first:

```bash
# Build mathml2omml (MathML β†’ OMML converter for PowerPoint export)
cd packages/mathml2omml
npm install
npm run build
cd ../..

# Build pptxgenjs (PowerPoint generation library)
cd packages/pptxgenjs
npm install @rollup/plugin-node-resolve @rollup/plugin-commonjs @rollup/plugin-typescript typescript tslib --save-dev
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
mkdir -p dist
# Bundle compiled JS
cat > rollup.temp.mjs << 'EOF'
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
export default {
  input: "dist-tsc/pptxgen.js",
  output: [
    { file: "./dist/pptxgen.es.js", format: "es" },
    { file: "./dist/pptxgen.cjs.js", format: "cjs", exports: "default" },
  ],
  external: [/^node:.*/, "jszip"],
  plugins: [resolve({ preferBuiltins: true }), commonjs()]
};
EOF
npx rollup -c rollup.temp.mjs
cp types/index.d.ts dist/
rm rollup.temp.mjs
cd ../..

# Install local packages into the main project
npm install ./packages/mathml2omml ./packages/pptxgenjs --legacy-peer-deps
```

### Step 4: Configure environment

```bash
cp .env.example .env
```

Edit `.env` with your API keys (see [Section 4](#4-configuration--which-api-keys-do-i-need) for which keys you actually need).

### Step 5: Verify the build

```bash
npm run build
```

You should see `βœ“ built in ~25s` with no errors.

---

## 3. Running the App

### Development mode (with hot reload)

```bash
npm run dev
```

Opens at **http://localhost:5173**

### Production preview

```bash
npm run build
npm run preview
```

Opens at **http://localhost:4173**

### What you'll see

1. **Home page** β€” A clean interface with a text area to type your lesson requirements
2. **Upload a PDF** or type what you want to teach
3. Click **Generate** β€” the app creates an AI classroom with slides, quizzes, and interactive content
4. **Enter the classroom** β€” watch the AI teacher present with voice, whiteboard, and discussion

---

## 4. Configuration β€” Which API Keys Do I Need?

### The short answer: **You only need ONE LLM API key to get started.**

Everything else is optional. Here's what each key unlocks:

| Feature | Required Key | Can You Skip It? |
|---------|-------------|-----------------|
| 🧠 **Classroom generation** (slides, quizzes, actions) | Any LLM key (OpenAI, Google, etc.) | ❌ No β€” this is the core feature |
| πŸ—£οΈ **Voice narration** (TTS) | TTS provider key OR use browser TTS | βœ… Yes β€” browser TTS works free |
| 🎀 **Voice input** (ASR) | ASR provider key OR use browser ASR | βœ… Yes β€” browser ASR works free |
| πŸ–ΌοΈ **AI image generation** in slides | Image provider key | βœ… Yes β€” slides work without images |
| 🎬 **AI video generation** in slides | Video provider key | βœ… Yes β€” slides work without videos |
| πŸ” **Web search** for content enrichment | Tavily API key | βœ… Yes β€” generation works without search |
| πŸ“„ **Advanced PDF parsing** | MinerU Cloud key | βœ… Yes β€” built-in unpdf parser is free |

### Minimum viable setup: just ONE key

Pick one LLM provider and set its key in `.env`:

```env
# Option A: Google Gemini (BEST FREE OPTION)
GOOGLE_API_KEY=your-key-here

# Option B: OpenAI
OPENAI_API_KEY=your-key-here

# Option C: DeepSeek (cheapest paid)
DEEPSEEK_API_KEY=your-key-here
```

---

## 5. Best & Most Cost-Effective AI Models

### 🧠 LLM β€” For Classroom Generation (THE most important choice)

| Tier | Provider | Model | Price (per 1M tokens) | Quality | Best For |
|------|----------|-------|----------------------|---------|----------|
| πŸ†“ **FREE** | Google | `gemini-2.5-flash` | **$0 (free tier: 500 req/day)** | ⭐⭐⭐⭐ | **Best free option. Start here.** |
| πŸ†“ **FREE** | Google | `gemini-2.5-flash-lite` | **$0 (free tier)** | ⭐⭐⭐ | Faster, simpler content |
| πŸ’° **Budget** | DeepSeek | `deepseek-chat` | **$0.14 input / $0.28 output** | ⭐⭐⭐⭐ | Best bang-for-buck paid option |
| πŸ’° **Budget** | GLM (ZhipuAI) | `glm-4.7-flash` | **Free tier available** | ⭐⭐⭐⭐ | Great for Chinese content |
| πŸ’΅ **Mid** | OpenAI | `gpt-4o-mini` | $0.15 / $0.60 | ⭐⭐⭐⭐ | Good balance of cost & quality |
| πŸ’΅ **Mid** | Anthropic | `claude-haiku-4-5` | $0.80 / $4.00 | ⭐⭐⭐⭐⭐ | Better slide layouts |
| πŸ’Ž **Premium** | OpenAI | `gpt-5.5` | $2.00 / $10.00 | ⭐⭐⭐⭐⭐ | Best overall quality |
| πŸ’Ž **Premium** | Anthropic | `claude-sonnet-4-5` | $3.00 / $15.00 | ⭐⭐⭐⭐⭐ | Best reasoning & creativity |
| πŸ’Ž **Premium** | Google | `gemini-2.5-pro` | $1.25 / $10.00 | ⭐⭐⭐⭐⭐ | Longest context (1M tokens) |
| 🏠 **Local** | Ollama | `llama3.3`, `qwen2.5` | **$0 (runs on your GPU)** | ⭐⭐⭐ | Privacy, no internet needed |

> **πŸ’‘ 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).

### πŸ—£οΈ TTS β€” Voice Narration

| Tier | Provider | Voice | Price | Quality | Setup |
|------|----------|-------|-------|---------|-------|
| πŸ†“ **FREE** | Browser Native | System voices | **$0** | ⭐⭐ | No setup needed β€” works in Chrome/Edge |
| πŸ’° **Budget** | OpenAI | alloy, nova, shimmer | $15.00/1M chars | ⭐⭐⭐⭐⭐ | Best quality-to-price ratio |
| πŸ’° **Budget** | MiniMax | speech-02 | ~$0.50/1M chars (Chinese pricing) | ⭐⭐⭐⭐ | Great for Chinese voices |
| πŸ’΅ **Mid** | Azure | 500+ voices | $16.00/1M chars | ⭐⭐⭐⭐⭐ | Most voice variety, many languages |
| πŸ’΅ **Mid** | ElevenLabs | Custom voices | $11.00/1M chars | ⭐⭐⭐⭐⭐ | Most natural sounding |
| πŸ’Ž **Advanced** | VoxCPM | Voice cloning | Self-hosted | ⭐⭐⭐⭐ | Clone any voice |

> **πŸ’‘ My recommendation:** Start with **Browser TTS** (free, decent quality in Chrome). Upgrade to **OpenAI TTS** ($15/1M chars) when you want natural voices.

### 🎀 ASR β€” Voice Input (Speech-to-Text)

| Tier | Provider | Price | Quality |
|------|----------|-------|---------|
| πŸ†“ **FREE** | Browser Native (Web Speech API) | **$0** | ⭐⭐⭐ β€” Works in Chrome/Edge |
| πŸ’° **Best** | OpenAI Whisper | $0.006/minute | ⭐⭐⭐⭐⭐ β€” Best accuracy |
| πŸ’° **Budget** | Qwen ASR | Low (Chinese pricing) | ⭐⭐⭐⭐ β€” Great for Chinese |

> **πŸ’‘ My recommendation:** **Browser ASR** is free and good enough. Use **Whisper** only if you need high accuracy.

### πŸ–ΌοΈ Image Generation (Optional)

| Tier | Provider | Model | Price per image | Quality |
|------|----------|-------|----------------|---------|
| πŸ’° **Budget** | OpenAI | `gpt-image-1-mini` | ~$0.02 | ⭐⭐⭐⭐ |
| πŸ’΅ **Mid** | OpenAI | `gpt-image-2` | ~$0.04-0.08 | ⭐⭐⭐⭐⭐ |
| πŸ’΅ **Mid** | Grok | `grok-image` | ~$0.05 | ⭐⭐⭐⭐ |
| πŸ’΅ **Mid** | MiniMax | `image-01` | ~$0.03 | ⭐⭐⭐⭐ |
| πŸ’Ž **Premium** | Seedream | `seedream-5.0` | ~$0.02 | ⭐⭐⭐⭐⭐ (Chinese provider) |

> **πŸ’‘ My recommendation:** Skip images initially. When ready, **OpenAI gpt-image-1-mini** at $0.02/image is excellent value.

### 🎬 Video Generation (Optional, Expensive)

| Provider | Model | Price | Duration |
|----------|-------|-------|----------|
| Kling | kling-v2.6 | ~$0.10-0.30/video | 5-10s |
| Seedance | seedance-1.5-pro | ~$0.05-0.15/video | 5-10s |
| Veo | veo-3 | ~$0.10/video | 5-8s |

> **πŸ’‘ My recommendation:** Skip video generation unless you specifically need it. It's expensive and slow (30-120s per video).

### πŸ” Web Search (Optional)

| Provider | Free Tier | Paid Price |
|----------|-----------|-----------|
| Tavily | **1,000 free searches/month** | $0.001/search after |

> **πŸ’‘ My recommendation:** Get a **free Tavily key** β€” 1,000 searches/month is plenty.

### πŸ“„ PDF Parsing

| Provider | Price | Quality |
|----------|-------|---------|
| unpdf (built-in) | **$0 β€” always free** | ⭐⭐⭐ β€” Good for simple PDFs |
| MinerU (local) | **$0 β€” self-hosted** | ⭐⭐⭐⭐ β€” Better for complex layouts |
| MinerU Cloud | Pay-per-use | ⭐⭐⭐⭐⭐ β€” Best for scanned/complex PDFs |

> **πŸ’‘ My recommendation:** The built-in **unpdf** parser is free and works fine for most PDFs. No setup needed.

---

## 6. Feature-by-Feature Setup

### 🧠 Core: Classroom Generation

This is the only required feature. You need ONE LLM key.

**Option A: Google Gemini (FREE)**

1. Go to [aistudio.google.com](https://aistudio.google.com/)
2. Click "Get API key" β†’ "Create API key"
3. Add to `.env`:
   ```env
   GOOGLE_API_KEY=AIzaSy...your-key
   ```
4. In the app: Settings β†’ Providers β†’ Google β†’ select `gemini-2.5-flash`

**Option B: OpenAI (Paid, best quality)**

1. Go to [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
2. Create a new API key
3. Add credit ($5 minimum)
4. Add to `.env`:
   ```env
   OPENAI_API_KEY=sk-...your-key
   ```

**Option C: DeepSeek (Cheapest paid)**

1. Go to [platform.deepseek.com](https://platform.deepseek.com/)
2. Create account β†’ Get API key
3. Add to `.env`:
   ```env
   DEEPSEEK_API_KEY=sk-...your-key
   ```

**Option D: Ollama (Free, local, needs GPU)**

1. Install Ollama: [ollama.ai](https://ollama.ai/)
2. Pull a model: `ollama pull llama3.3`
3. Add to `.env`:
   ```env
   OLLAMA_BASE_URL=http://localhost:11434/v1
   OLLAMA_MODELS=llama3.3
   ALLOW_LOCAL_NETWORKS=true
   ```

### πŸ—£οΈ Voice Narration (TTS)

**Free option: Browser TTS (no setup needed)**
- Works out of the box in Chrome, Edge, Safari
- In the app: Settings β†’ Audio β†’ TTS Provider β†’ "Browser"

**Paid option: OpenAI TTS**
- Same API key as LLM (if you're using OpenAI)
- In the app: Settings β†’ Audio β†’ TTS Provider β†’ "OpenAI" β†’ Voice β†’ "nova" (recommended)

### 🎀 Voice Input (ASR)

**Free option: Browser ASR (no setup needed)**
- Works in Chrome and Edge (not Firefox/Safari)
- Click the microphone button in the chat area

### πŸ” Web Search

1. Go to [tavily.com](https://tavily.com/) β†’ Sign up (free)
2. Get API key from dashboard
3. Add to `.env`:
   ```env
   TAVILY_API_KEY=tvly-...your-key
   ```
4. Toggle "Web Search" on the home page when generating

### πŸ–ΌοΈ Image Generation

**OpenAI Images (easiest):**
- Same API key as LLM
- In the app: Settings β†’ Image β†’ Provider β†’ "OpenAI Image" β†’ Model β†’ "GPT Image 1 Mini"
- Toggle "Enable Image Generation" on the home page

### 🎬 Video Generation

- Configure in Settings β†’ Video β†’ choose provider
- Video generation is slow (30-120 seconds per video) and expensive
- Only recommended for demo/showcase purposes

---

## 7. Free Tier & Zero-Cost Options

### Completely free setup (no credit card needed):

```env
# .env for 100% free setup
GOOGLE_API_KEY=your-gemini-key    # Free: 500 requests/day
TAVILY_API_KEY=your-tavily-key    # Free: 1,000 searches/month
```

**What you get for free:**
- βœ… Full classroom generation (slides, quizzes, interactive content)
- βœ… Multi-agent discussions
- βœ… Voice narration (browser TTS)
- βœ… Voice input (browser ASR)
- βœ… PDF parsing (built-in unpdf)
- βœ… Web search enrichment (1,000/month)
- βœ… Whiteboard
- βœ… PowerPoint export
- βœ… Classroom ZIP export/import
- ❌ AI image generation (needs paid key)
- ❌ AI video generation (needs paid key)
- ❌ Premium voice quality (needs paid TTS key)

### Monthly cost estimates:

| Usage Level | LLM | TTS | Images | Total |
|-------------|-----|-----|--------|-------|
| **Hobby** (5 classrooms/week) | $0 (Gemini free) | $0 (browser) | $0 (skip) | **$0/month** |
| **Regular** (3 classrooms/day) | ~$2 (DeepSeek) | $0 (browser) | $0 (skip) | **~$2/month** |
| **Power user** (10/day, with images) | ~$5 (DeepSeek) | ~$3 (OpenAI TTS) | ~$5 (images) | **~$13/month** |
| **Premium** (full features) | ~$20 (GPT-5.5) | ~$10 (Azure TTS) | ~$15 (images+video) | **~$45/month** |

---

## 8. Recommended Starter Configurations

### 🟒 Configuration A: "Zero Cost Beginner"

```env
GOOGLE_API_KEY=your-key
```

- LLM: Gemini 2.5 Flash (free)
- TTS: Browser native (free)
- ASR: Browser native (free)
- PDF: unpdf built-in (free)
- Images/Video: disabled
- **Cost: $0/month**

### 🟑 Configuration B: "Best Value"

```env
GOOGLE_API_KEY=your-key
DEEPSEEK_API_KEY=your-key
TAVILY_API_KEY=your-key
```

- LLM: DeepSeek Chat for generation, Gemini for backup
- TTS: Browser native
- Web Search: Tavily (1,000 free/month)
- **Cost: ~$2-5/month**

### πŸ”΅ Configuration C: "Full Experience"

```env
OPENAI_API_KEY=your-key
GOOGLE_API_KEY=your-key
TAVILY_API_KEY=your-key
```

- LLM: GPT-4o-mini (primary), Gemini 2.5 Pro (long docs)
- TTS: OpenAI TTS (same key)
- ASR: OpenAI Whisper (same key)
- Images: OpenAI Image (same key)
- Web Search: Tavily
- **Cost: ~$10-20/month**

### 🟣 Configuration D: "Chinese Content Focus"

```env
GLM_API_KEY=your-key
QWEN_API_KEY=your-key
DEEPSEEK_API_KEY=your-key
```

- LLM: GLM-4.7-Flash or DeepSeek
- TTS: GLM TTS or MiniMax
- Best for Chinese language classroom content
- **Cost: ~$2-5/month**

---

## 9. Docker Deployment

### Using Docker Compose (recommended for production)

```bash
# 1. Create .env file with your API keys
cp .env.example .env
# Edit .env with your keys

# 2. Build and run
docker compose up -d

# 3. Access the app
open http://localhost:3000
```

### Using Dockerfile directly

```bash
docker build -t multimind-classroom .
docker run -p 3000:3000 --env-file .env multimind-classroom
```

### Access Control (optional)

To password-protect your deployment:

```env
ACCESS_CODE=my-secret-password
```

Users will see a login screen and must enter this code.

---

## 10. Troubleshooting

### Build fails with "Cannot find module"

```bash
# Clean install
rm -rf node_modules package-lock.json
npm install --legacy-peer-deps
npm install ./packages/mathml2omml ./packages/pptxgenjs --legacy-peer-deps
npm run build
```

### "API key required" error

- Make sure your `.env` file is in the project root (same directory as `package.json`)
- Make sure you selected the correct provider in Settings β†’ Providers
- Restart the dev server after changing `.env`

### Browser TTS not working

- Browser TTS only works in Chrome, Edge, and Safari
- Firefox does not support Web Speech API synthesis
- Make sure your browser is not muted
- Try a different voice in Settings β†’ Audio β†’ TTS

### Classroom generation is slow

- Gemini 2.5 Flash is fastest (2-5 seconds per scene)
- GPT-4o-mini is fast (3-8 seconds per scene)
- Claude models are slower (5-15 seconds per scene)
- A 10-slide classroom typically takes 30-120 seconds total

### "Failed to parse PDF"

- The built-in unpdf parser works for most text-based PDFs
- Scanned/image PDFs need MinerU Cloud
- Very large PDFs (>50MB) may need to be split
- Try copy-pasting the text content directly into the requirements field

### Images not loading in slides

- Check that you've enabled image generation in Settings
- Check that the image provider has a valid API key
- Generated images are stored in IndexedDB β€” clearing browser data removes them

### Whiteboard not showing

- Click the pencil (✏️) icon in the bottom toolbar
- Whiteboard only appears on slide-type scenes (not quiz or interactive)

---

## 11. FAQ

**Q: Do I need to pay for anything?**
A: No. You can run the entire app for free using Google Gemini's free tier + browser TTS/ASR.

**Q: Can I use my own local LLM?**
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.

**Q: How much does it cost to generate one classroom?**
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.

**Q: Can I export to PowerPoint?**
A: Yes! Click the export button (⬇️) in the classroom header and select "Export PPTX". All slides, text, shapes, charts, and images are included.

**Q: Does it work offline?**
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.

**Q: What languages are supported?**
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.

**Q: Can multiple students use the same classroom?**
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.

**Q: What PDF format works best?**
A: Text-based PDFs work best. The parser extracts text and images. For scanned PDFs, use MinerU Cloud. Maximum recommended size: 50MB.

**Q: How do I switch between AI providers mid-use?**
A: Click the Settings gear (βš™οΈ) β†’ Providers tab β†’ select a different provider and model. The change takes effect immediately for the next generation.

---

## Quick Start Cheat Sheet

```bash
# 1. Clone
git clone https://huggingface.co/muthuk1/OpenMAIC-React && cd OpenMAIC-React

# 2. Install
npm install --legacy-peer-deps

# 3. Build workspace packages
cd packages/mathml2omml && npm install && npm run build && cd ../..

# 4. Configure (minimum: one LLM key)
cp .env.example .env
echo "GOOGLE_API_KEY=your-key-here" >> .env

# 5. Run
npm run dev

# 6. Open http://localhost:5173 and generate your first classroom!
```

**That's it!** Type a topic, click Generate, and watch MultiMind Classroom create an interactive AI lesson. πŸŽ“