Skip to content

Sharan-Magesh/Edu-AI-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ LearnPlay AI โ€” Full Installation & Usage Guide Make Hard Concepts Feel Like Play

๐Ÿ“˜ Introduction LearnPlay AI is a local, privacy-friendly learning assistant powered by Ollama and built with Node.js + React. This guide will walk you through EVERYTHING you need โ€” installing dependencies, downloading models, running backend, running frontend, uploading documents, generating quizzes, and more. โœ… Prerequisites Before you begin, ensure you have the following installed: โ€ข Node.js (v18 or higher recommended) โ€ข NPM (comes with Node.js) โ€ข Ollama (for local LLMs) โ€ข Git (optional but recommended) ๐Ÿง  Step 1 โ€” Install Ollama Ollama is required to run local LLMs. Download from: https://ollama.com/download

After installation, open your terminal and verify: ollama --version

๐Ÿ“ฅ Step 2 โ€” Download Required Models LearnPlay requires 2 models:

  1. LLM model โ†’ llama3.2:3b
  2. Embedding model โ†’ nomic-embed-text

Run these commands: ollama pull llama3.2:3b ollama pull nomic-embed-text

๐Ÿ“ Project Folder Structure learnplay/ โ”œโ”€โ”€ client/ (React frontend) โ”œโ”€โ”€ server/ (Node.js backend) โ”œโ”€โ”€ README.md

๐ŸŸฆ Step 3 โ€” Install Server Dependencies Navigate into the server folder: cd server

Install all required dependencies: npm install

This installs packages like: โ€ข express โ€ข cors โ€ข multer โ€ข pdf-parse โ€ข mammoth โ€ข dotenv

โš™๏ธ Step 4 โ€” Create .env File Inside /server create a file named .env with: PORT=5179 OLLAMA_URL=http://localhost:11434 OLLAMA_MODEL=llama3.2:3b

โ–ถ๏ธ Step 5 โ€” Start the Backend Server Run the backend: node server.js

You should see: Server running โ†’ http://localhost:5179

โš›๏ธ Step 6 โ€” Install Frontend Dependencies Navigate to the client folder: cd client

Install packages: npm install

This installs React, Vite, and all UI dependencies.

๐Ÿš€ Step 7 โ€” Start the LearnPlay Frontend Run the frontend UI: npm run dev

You should now see LearnPlay running at: http://localhost:5173

๐ŸŽ“ Step 8 โ€” Using LearnPlay AI โœ… Type a topic in the Topic box (e.g., 'Eigenvalues') โœ… Click: โ€ข Teach Me โ€” explanation with analogy + example + check question โ€ข Co-Relate โ€” relate to badminton/cooking โ€ข Quiz Me โ€” generates quiz (JSON hidden) as UI โ€ข Make It Fun โ€” story-mode explanation

๐Ÿ“„ Step 9 โ€” Uploading Documents (PDF/DOCX/TXT) Click the Upload button in the Topic panel and upload: โ€ข PDF file โ€ข DOCX file โ€ข TXT file

LearnPlay will: โœ… Extract text โœ… Chunk it โœ… Embed it using nomic-embed-text โœ… Enable document mode Now all buttons use ONLY the uploaded document content.

๐ŸŽฏ Step 10 โ€” Quiz Mode (Document or Topic) When clicking 'Quiz Me': โœ… LearnPlay generates 3 questions โœ… JSON is parsed silently (NOT shown to user) โœ… Quiz UI appears below chat โœ… Answers are auto-graded โœ… Score is tracked persistently

๐Ÿงน Step 11 โ€” Clear Document Context Click the Clear button to switch back to topic mode. This resets: โ€ข Document chunks โ€ข Embeddings โ€ข Quiz data

๐Ÿ› ๏ธ Troubleshooting โœ… If Vite throws HTML parse errors โ†’ remove React syntax from index.html โœ… If Node crashes with memory error โ†’ update Node to v20+ โœ… If Ollama model errors โ†’ re-run: ollama pull llama3.2:3b ollama pull nomic-embed-text

โœจ You Are Ready! Your LearnPlay AI setup is complete. Enjoy fun, interactive, document-powered learning!

About

Backend server for LearnPlay / Edu AI tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors