Skip to content

swarnendu19/LearnifyAI

Repository files navigation

πŸš€ Skout - AI-Powered Learning Platform

Learn Anything With the Power of AI

Transform YouTube videos into structured learning experiences with our intelligent course generator. Create, share, and master any topic through AI-powered course creation.

Next.js TypeScript Prisma OpenAI Tailwind CSS

✨ Key Features

πŸ€– AI-Powered Course Generation

  • Intelligent Video Analysis: Advanced AI analyzes YouTube videos to extract key concepts and learning objectives
  • Automated Chapter Creation: Automatically generates structured course chapters with logical flow
  • Smart Content Summarization: Creates comprehensive summaries for each chapter
  • Dynamic Quiz Generation: AI-generated quizzes with multiple-choice questions for concept reinforcement

πŸ“š Course Management System

  • Interactive Course Builder: Intuitive form-based course creation with real-time preview
  • Multi-Unit Structure: Organize courses into units and chapters for better learning progression
  • Course Gallery: Browse and discover community-created courses
  • Progress Tracking: Monitor learning progress with detailed analytics

🎯 Learning Experience

  • Interactive Quizzes: Concept check quizzes with instant feedback and scoring
  • Video Integration: Seamless YouTube video embedding with synchronized content
  • Responsive Design: Optimized for desktop, tablet, and mobile learning
  • Dark/Light Theme: Customizable UI themes for comfortable learning

πŸ‘₯ User Management & Authentication

  • NextAuth Integration: Secure authentication with multiple providers
  • User Profiles: Personalized user accounts with course history
  • Credit System: Token-based system for course generation
  • Subscription Management: Stripe-powered premium subscriptions

🎨 Modern UI/UX

  • Framer Motion Animations: Smooth, engaging animations throughout the platform
  • Radix UI Components: Accessible, customizable UI components
  • Gradient Design System: Modern gradient-based visual design
  • Responsive Layout: Mobile-first responsive design approach

πŸ› οΈ Technical Stack

Frontend

  • Next.js 15.3.5 - React framework with App Router
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first CSS framework
  • Framer Motion - Animation library
  • Radix UI - Accessible component primitives
  • React Hook Form - Form state management
  • Zod - Schema validation

Backend & Database

  • Prisma ORM - Type-safe database client
  • PostgreSQL - Primary database
  • NextAuth.js - Authentication solution
  • OpenAI API - AI-powered content generation
  • YouTube Transcript API - Video content extraction

Deployment & Services

  • Vercel - Hosting and deployment
  • Stripe - Payment processing
  • YouTube API - Video data integration

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • OpenAI API key
  • YouTube API key (optional)
  • Stripe account (for subscriptions)

Installation

  1. Clone the repository
git clone https://github.com/yourusername/skout.git
cd skout
  1. Install dependencies
npm install
  1. Environment Setup
cp .env.example .env

Configure your .env file with:

DATABASE_URL="postgresql://username:password@localhost:5432/skout"
NEXTAUTH_SECRET="your-nextauth-secret"
NEXTAUTH_URL="http://localhost:3000"
OPENAI_API_KEY="your-openai-api-key"
STRIPE_API_KEY="your-stripe-secret-key"
STRIPE_WEBHOOK_SECRET="your-stripe-webhook-secret"
  1. Database Setup
npx prisma generate
npx prisma db push
npm run db:seed
  1. Start Development Server
npm run dev

Visit http://localhost:3000 to see the application.

πŸ“ Project Structure

skout/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”œβ”€β”€ course/            # Course pages
β”‚   β”œβ”€β”€ create/            # Course creation
β”‚   β”œβ”€β”€ gallery/           # Course gallery
β”‚   └── settings/          # User settings
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/               # Reusable UI components
β”‚   └── *.tsx             # Feature components
β”œβ”€β”€ lib/                  # Utility functions
β”œβ”€β”€ prisma/               # Database schema
β”œβ”€β”€ validators/           # Zod schemas
└── public/              # Static assets

πŸ”§ Available Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint
npm run db:migrate   # Run database migrations
npm run db:seed      # Seed database with sample data
npm run db:studio    # Open Prisma Studio
npm run db:reset     # Reset database and reseed

🌟 Core Functionality

Course Creation Workflow

  1. Input Course Details: Title and learning units
  2. AI Processing: OpenAI analyzes and structures content
  3. Chapter Generation: Automatic chapter creation with summaries
  4. Quiz Creation: AI-generated assessment questions
  5. Course Publishing: Make available in gallery

Learning Experience

  1. Course Discovery: Browse gallery or create custom courses
  2. Structured Learning: Progress through units and chapters
  3. Interactive Quizzes: Test understanding with AI-generated questions
  4. Progress Tracking: Monitor completion and performance

πŸ” Authentication & Security

  • NextAuth.js integration with multiple providers
  • JWT-based session management
  • Role-based access control
  • API route protection
  • Input validation with Zod schemas

πŸ’³ Subscription System

  • Stripe Integration for payment processing
  • Credit-based course generation
  • Subscription tiers with different limits
  • Webhook handling for real-time updates

πŸ“± Responsive Design

  • Mobile-first approach
  • Tablet optimization for learning on-the-go
  • Desktop enhancement for full-featured experience
  • Touch-friendly interactions

🎨 Design System

  • Consistent color palette with CSS variables
  • Typography scale with Lexend font
  • Component variants using class-variance-authority
  • Animation patterns with Framer Motion
  • Accessibility compliance with Radix UI

πŸš€ Deployment

Vercel Deployment

  1. Connect your GitHub repository to Vercel
  2. Configure environment variables
  3. Deploy with automatic builds on push

Database Migration

npm run vercel-build  # Includes Prisma generation and migration

🀝 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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI for powerful AI capabilities
  • Vercel for seamless deployment
  • Prisma for excellent database tooling
  • Radix UI for accessible components
  • Tailwind CSS for rapid styling

Built with ❀️ using Next.js, TypeScript, and AI