About this project

LearnMate AI is an AI study companion that organizes study material into Spaces and Projects, processes uploaded PDFs, and provides a Tutor that answers questions only from the uploaded content with page citations. When material does not cover a question, the system explicitly returns a "not enough evidence" response. A Quiz targets weak concepts, grades free-text answers with feedback, and updates per-concept Mastery scores. Background jobs generate Recommendations grounded in the user's own material, and a Growth dashboard shows trends. The architecture combines a React/Vite frontend with a Node.js/Express API and BullMQ background workers. PDFs are processed per page: text extraction, chunking, embeddings via BAAI/bge-small-en-v1.5 into pgvector, and concept extraction. Tutor responses use similarity search over a project's chunks and schema-validated JSON to enforce evidence sufficiency. Quiz question selection scores concepts by mastery gap, under-practice, recency, and mistakes. Mastery uses an append-only history with a 60/40 weighting of new evidence. The stack includes Prisma with PostgreSQL (Neon) and pgvector, Redis (Upstash) for job queues, Groq for LLM calls, Hugging Face for hosted embeddings, Cloudinary for PDF storage, and JWT authentication with HTTP-only cookies. Local setup requires Node.js 20+, a pgvector-enabled Postgres database, Redis, and API keys for Groq, Hugging Face, and Cloudinary. The project includes integration tests against real infrastructure covering cross-user isolation, admin access, mastery math, adaptive selection, tutor groundedness, and material processing idempotency. Deployment is documented for Vercel (frontend) and Render (combined API and worker process).