Skip to content

KartikLabhshetwar/mind-mentor

Repository files navigation

Mind Mentor

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.

Setup

git clone https://github.com/KartikLabhshetwar/mind-mentor
cd mind-mentor
npm install

Create .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-host

Run:

npm run dev

Open http://localhost:3000 — sign up and you'll land on /chat.

Tech Stack

  • 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

Features

  • 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

Project Structure

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

License

Apache 2.0 — see LICENSE.

About

Mind Mentor is an innovative AI-powered study assistant designed to revolutionize the way students learn and prepare for exams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages