Upload any file (PDF, DOCX, TXT, PPT) → AI generates 4-option MCQ quiz with result screen.
smartquiz/
├── server.js ← Node.js backend
├── package.json ← Dependencies
├── .env ← Your API key goes here
├── public/
│ └── index.html ← Frontend quiz UI
└── uploads/ ← Temp folder (auto-cleaned)
Download from https://nodejs.org (LTS version)
Unzip smartquiz.zip anywhere on your computer/server.
Open .env file and replace:
ANTHROPIC_API_KEY=your_api_key_here
with your actual Anthropic API key from https://console.anthropic.com
Open terminal in the smartquiz folder:
npm installnpm startGo to: http://localhost:3000
npm install -g pm2
pm2 start server.js --name smartquiz
pm2 save
pm2 startupserver {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
}
}- ✅ PDF, DOCX, DOC, TXT, PPT, PPTX support
- ✅ AI reads file → generates 4-option MCQ
- ✅ Right answer → Green highlight ✓
- ✅ Wrong answer → Red shake + shows correct answer
- ✅ End screen with score + all wrong answers review
- ✅ Explanation for each question
- ✅ Easy / Medium / Hard difficulty
- ✅ 5 / 10 / 15 / 20 questions
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Your API key from console.anthropic.com |
PORT |
Server port (default: 3000) |
- API key is stored only in
.env— never exposed to browser - Uploaded files are deleted immediately after processing
- Max file size: 20MB