Skip to content

cyrixninja/KeentoLearn-App

Repository files navigation

KeentoLearn - AI-Powered Education Platform

Next.js TypeScript TailwindCSS MongoDB 1

Learn smarter with personalized AI-generated quizzes, notes and study plans

KeentoLearn is a modern, AI-powered educational platform that helps students create personalized study materials, take adaptive quizzes, and track their learning progress. Built with cutting-edge technologies including Google's Gemini AI, Next.js, and MongoDB.

✨ Features

🧠 Smart Study Notes

  • Multiple Format Options: Outline, detailed notes, concise summaries, flashcard format
  • AI-Generated Content: Powered by Google Gemini for comprehensive, accurate notes
  • PDF Export: Download your notes as professionally formatted PDFs
  • Key Point Highlights: Automatically extracted important concepts
  • Markdown Support: Rich text formatting with full markdown support

πŸ“ Interactive Quizzes

  • Adaptive Difficulty: Questions adjust based on your performance
  • Multiple Question Types: Multiple choice, true/false, short answer
  • Instant Feedback: Real-time scoring and explanations
  • Progress Tracking: Monitor your learning journey
  • Custom Topics: Generate quizzes on any subject

πŸ“š Personalized Study Plans

  • Goal-Oriented Structure: Tailored to your learning objectives
  • Adaptive Timelines: Flexible scheduling that adapts to your pace
  • Resource Recommendations: Curated study materials
  • Progress Monitoring: Track completion and performance metrics

🎨 Modern User Experience

  • Dark/Light Theme: Seamless theme switching
  • Responsive Design: Perfect experience across all devices
  • Clean Interface: Intuitive, distraction-free design
  • Fast Performance: Optimized for speed and efficiency

πŸš€ Tech Stack

Frontend

Backend & Database

AI & APIs

Additional Tools

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js 18+
  • npm/yarn/pnpm
  • MongoDB database
  • Google AI API key

Clone the Repository

git clone KeentoLearn-App
cd KeentoLearn-App

Install Dependencies

npm install
# or
yarn install
# or
pnpm install

Environment Setup

Create a .env.local file in the root directory:

# Database
MONGODB_URI=your_mongodb_connection_string

# Authentication
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret

# Google AI
GOOGLE_API_KEY=your_google_gemini_api_key

Run Development Server

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 in your browser.

πŸ“ Project Structure

keentolearn/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ layout.tsx               # Root layout with providers
β”‚   β”œβ”€β”€ page.tsx                 # Landing page
β”‚   β”œβ”€β”€ globals.css              # Global styles
β”‚   β”œβ”€β”€ about/                   # About page
β”‚   β”œβ”€β”€ api/                     # API routes
β”‚   β”œβ”€β”€ dashboard/               # User dashboard
β”‚   β”œβ”€β”€ login/                   # Authentication pages
β”‚   β”œβ”€β”€ notes/                   # Notes pages
β”‚   β”‚   β”œβ”€β”€ page.tsx            # Notes listing
β”‚   β”‚   β”œβ”€β”€ create/             # Create notes
β”‚   β”‚   └── [id]/               # Individual note view
β”‚   └── quizzes/                # Quiz pages
β”œβ”€β”€ components/                  # Reusable UI components
β”‚   β”œβ”€β”€ ui/                     # Base UI components
β”‚   β”œβ”€β”€ auth-provider.tsx       # Authentication provider
β”‚   β”œβ”€β”€ navbar.tsx              # Navigation component
β”‚   └── theme-provider.tsx      # Theme provider
β”œβ”€β”€ lib/                        # Utilities and actions
β”‚   β”œβ”€β”€ actions/               # Server actions
β”‚   β”‚   β”œβ”€β”€ notes-actions.ts   # Notes CRUD operations
β”‚   β”‚   └── quiz-actions.ts    # Quiz operations
β”‚   β”œβ”€β”€ db/                    # Database utilities
β”‚   └── utils.ts               # Helper functions
β”œβ”€β”€ public/                     # Static assets
└── package.json               # Dependencies and scripts

🎯 Usage Guide

Creating Study Notes

  1. Navigate to Notes β†’ Create Notes
  2. Enter your topic and select format/length preferences
  3. Add optional additional information for context
  4. Click Generate Notes and wait for AI processing
  5. View, edit, or download your generated notes as PDF

Taking Quizzes

  1. Go to Quizzes β†’ Create Quiz
  2. Specify topic, difficulty, and question count
  3. Take the adaptive quiz with instant feedback
  4. Review results and track your progress

Managing Study Plans

  1. Access Dashboard for overview
  2. Create personalized study schedules
  3. Track progress across different subjects
  4. Get AI-powered recommendations

πŸ”§ Scripts

# Development
npm run dev          # Start development server

# Production
npm run build        # Build for production
npm run start        # Start production server

# Code Quality
npm run lint         # Run ESLint

🌐 Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add environment variables in Vercel dashboard
  4. Deploy automatically on every push

Manual Deployment

npm run build
npm run start

πŸ” Environment Variables

Variable Description Required
MONGODB_URI MongoDB connection string βœ…
NEXTAUTH_URL Application URL βœ…
NEXTAUTH_SECRET NextAuth secret key βœ…
GOOGLE_API_KEY Google Gemini API key βœ…

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ API Routes

Notes API

  • POST /api/notes - Create new notes
  • GET /api/notes - Get user notes
  • GET /api/notes/[id] - Get specific note
  • DELETE /api/notes/[id] - Delete note

Quiz API

  • POST /api/quiz - Generate quiz
  • GET /api/quiz/[id] - Get quiz data
  • POST /api/quiz/[id]/submit - Submit quiz answers

πŸ”§ Key Features Implementation

AI Content Generation

The platform uses Google's Gemini AI for generating educational content:

const genAI = new GoogleGenerativeAI(process.env.GOOGLE_API_KEY!)
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" })

PDF Export

Notes can be exported as PDFs using jsPDF:

import jsPDF from "jspdf"
// PDF generation logic in notes/[id]/page.tsx

Theme System

Dark/light theme support with system preference detection:

<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>

πŸ“± Responsive Design

The application is fully responsive and optimized for:

  • πŸ“± Mobile devices (320px+)
  • πŸ“± Tablets (768px+)
  • πŸ’» Desktop (1024px+)
  • πŸ–₯️ Large screens (1280px+)

πŸ› Troubleshooting

Common Issues

Authentication Issues

  • Verify NEXTAUTH_SECRET is set
  • Check MongoDB connection
  • Ensure proper environment variables

AI Generation Failures

  • Verify Google API key is valid
  • Check API quota limits
  • Ensure network connectivity

Build Errors

  • Clear .next folder: rm -rf .next
  • Reinstall dependencies: npm install
  • Check TypeScript errors: npm run lint

πŸ“Š Performance

  • Core Web Vitals: Optimized for excellent scores
  • Code Splitting: Automatic route-based splitting
  • Image Optimization: Next.js Image component
  • Caching: Strategic caching for better performance

πŸ”’ Security

  • Authentication: Secure session management
  • Input Validation: Server-side validation
  • SQL Injection: MongoDB prevents SQL injection
  • XSS Protection: Content sanitization

Screenshots

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

πŸ‘¨β€πŸ’» Author

Built with ❀️ by cyrixninja

πŸ™ Acknowledgments


Ready to revolutionize your learning experience? Start with KeentoLearn today! πŸš€

About

AI Powered Learning Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •