AI-powered study companion and chat assistant built with Next.js and OpenAI.
Open-ended conversations with GPT-4o Mini for any topic or question.
Personalized learning sessions for any topic:
- Choose your study topic
- Set your skill level (beginner to expert)
- Select session type (lesson, quiz, practice or review)
- Pick duration (10 to 60 minutes)
- Get tailored instruction based on your needs
Specialized coding sessions with latest tech stack:
- Languages: JavaScript, TypeScript, Python, SQL
- Frameworks: React 19.2, Next.js 16
- Backend: Supabase, PostgreSQL, Neon
- Styling: Tailwind CSS v4
- Session Types: Lesson, Debug, Build, Review
- AI trained on 2025 documentation for latest features
- Interactive code examples with syntax highlighting
- Copy-paste ready code snippets
-
Clone the repository
-
Install dependencies:
npm install
-
Create environment file:
cp .env.example .env.local
-
Add your OpenAI API key to
.env.local:OPENAI_API_KEY=sk-proj-your-key-here -
Run development server:
npm run dev
/- General chat interface/studdy-buddy- Study session interface (any topic)/studdy-buddy-coding- Coding session interface (web development)/dashboard- API usage and cost monitoring dashboard
This application includes comprehensive safeguards:
- Rate limiting (20 requests per minute)
- Token limits (1000 max per response)
- Context truncation (20 messages max)
- Request validation
- Usage logging with cost estimates
See SECURITY.md for detailed information.
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS 4
- OpenAI API (GPT-4o Mini)
- Lucide React (icons)
- API Safety: All requests are validated, rate limited and monitored
- Writing Style: No oxford commas
- UI Components: Lucide icons only (no emojis)
- Development: KISS principle
claude.md- Full project documentation and statusSECURITY.md- Security measures and cost analysis.env.example- Environment variable template
With current safeguards:
- Single message: ~$0.0003
- Typical conversation: ~$0.001-0.003
- Development usage: ~$1-5/month
See SECURITY.md for detailed cost breakdown.
MIT