AI-powered learning assistant with a ChatGPT/Claude-style chat interface. Ask questions, generate study plans, search resources, analyze PDFs, and track your progress — all through conversation.
git clone https://github.com/KartikLabhshetwar/mind-mentor
cd mind-mentor
npm installCreate .env.local:
# Required
MONGODB_URI=your-mongodb-uri
NEXTAUTH_SECRET=your-secret-key
NEXTAUTH_URL=http://localhost:3000
GROQ_API_KEY=your-groq-api-key
HF_TOKEN=your-huggingface-token
TAVILY_API_KEY=your-tavily-api-key
# Optional (for multi-model support)
ANTHROPIC_API_KEY=your-anthropic-key
OPENAI_API_KEY=your-openai-key
# Optional (analytics)
NEXT_PUBLIC_POSTHOG_KEY=your-posthog-key
NEXT_PUBLIC_POSTHOG_HOST=your-posthog-hostRun:
npm run devOpen http://localhost:3000 — sign up and you'll land on /chat.
- Framework: Next.js 14 (App Router)
- AI: Vercel AI SDK v6 — Groq (default, free), Claude, GPT-4o
- Embeddings: HuggingFace Inference API (sentence-transformers)
- Search: Tavily API
- Database: MongoDB + Mongoose
- Auth: NextAuth.js (JWT)
- UI: shadcn/ui, Tailwind CSS, Radix UI
- State: Zustand
- Chat interface — streaming AI responses with markdown rendering
- Multi-model — switch between Groq, Claude, GPT-4o per conversation
- Study plans — AI-generated weekly plans rendered as interactive cards
- Resource search — Tavily-powered resource curation from top education platforms
- PDF analysis — upload PDFs, ask questions, get answers with page citations
- Study stats — streak tracking, contribution calendar, total hours
- Pomodoro timer — floating focus timer triggered via chat or sidebar
- Library — saved plans, PDFs, and resources in a slide-over panel
src/
app/
chat/ # Main chat UI
api/chat/route.ts # AI streaming endpoint
api/library/route.ts # Library data endpoint
components/
chat/ # Chat thread, message, composer, tool result cards
sidebar/ # Conversation history, model selector
panels/ # Library and stats slide-over panels
widgets/ # Floating timer
lib/ai/ # Providers, system prompt, embeddings
models/ # Mongoose schemas
store/ # Zustand app state
Apache 2.0 — see LICENSE.