Skip to content

abhayclasher/StudySync-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

106 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š StudySync AI

Transform Your Learning Experience with AI-Powered Study Tools โ€” Master Knowledge, One Concept at a Time

Live Site License React Supabase TypeScript Gemini AI

StudySync AI Homepage


๐Ÿ“– Table of Contents


โœจ Overview

StudySync AI is an AI-powered learning platform designed to revolutionize how students learn, practice, and master complex concepts. By leveraging cutting-edge AI technology, the platform provides personalized learning experiences that adapt to each user's unique learning style and pace.

๐ŸŽฏ Key Highlights

  • ๐Ÿค– AI-Powered Learning: Gemini AI integration for intelligent content analysis and generation
  • ๐ŸŽ“ Interactive Tools: Flashcards, quizzes, and interactive learning modules
  • ๐ŸŽฅ Video Learning: Smart video player with transcript integration
  • ๐Ÿ—บ๏ธ Roadmap Generator: Personalized learning paths based on your goals
  • ๐Ÿ“ฑ Real-time Sync: Supabase-powered real-time data synchronization
  • ๐ŸŽจ Modern UI: Beautiful, responsive interface with smooth animations
  • ๐Ÿ‘ฅ Social Learning: Collaborative features for group learning experiences

๐Ÿ’ก Mission & Vision

๐Ÿ“š Mission: Make high-quality, personalized education accessible to everyone through intelligent AI assistance
๐ŸŒ Vision: Create the world's most effective AI-powered learning ecosystem that adapts to every learner's unique needs


โšก Features

๐Ÿ”ฅ Core Features

Feature Description
๐Ÿง  AI Content Analysis Automatically analyze documents, videos, and content to generate study materials
๐ŸŽฏ Interactive Flashcards Create, review, and practice with AI-generated flashcards
๐Ÿงฉ Adaptive Quizzes Personalized quizzes that adapt to your learning progress
๐Ÿ“น Video Learning Integrated video player with transcript and AI-powered summarization
๐Ÿ—บ๏ธ Learning Roadmaps Generate personalized study paths based on your goals
๐Ÿ’ฌ AI Chat Assistant Get instant answers to your questions with our AI tutor
๐Ÿ“Š Progress Tracking Monitor your learning progress with detailed analytics
๐ŸŒ™ Dark Mode First Beautiful dark theme by default with light mode toggle
๐Ÿ“ฑ Fully Responsive Seamless experience across desktop, tablet, and mobile devices
๐Ÿ” Secure Authentication Supabase-powered user authentication and data security

๐ŸŽฎ Advanced Features

Feature Description
๐Ÿ“ Document Upload Upload PDFs, Word docs, and other formats for AI processing
๐ŸŽง Transcript Integration Automatic transcript generation and analysis for video content
๐Ÿ† Learning Gamification Points, badges, and leaderboards to keep you motivated
๐Ÿ“… Study Scheduling Intelligent study schedule recommendations
๐Ÿค Collaborative Learning Share flashcards and quizzes with peers
๐Ÿ“ˆ Performance Analytics Detailed insights into your learning patterns and progress

๐Ÿงฑ Tech Stack

Frontend

  • Framework: React 18 with Vite
  • Language: TypeScript 5.0+
  • UI Library: React + Custom Components
  • Styling: TailwindCSS + CSS Modules
  • Animations: Custom CSS animations and transitions
  • Icons: Lucide React + Custom SVG icons
  • Forms: React Hook Form + Zod validation
  • Theme: Custom dark/light mode implementation

Backend & Database

  • Database: Supabase (PostgreSQL + Authentication)
  • Real-time: Supabase real-time updates
  • Storage: Supabase Storage (for document uploads)
  • Authentication: Supabase Auth
  • AI Integration: Google Gemini API

Development Tools

  • Build Tool: Vite
  • Package Manager: npm
  • Linting: ESLint + Prettier
  • Deployment: Vercel / Netlify
  • Version Control: Git & GitHub

Key Dependencies

{
  "react": "^18.2.0",
  "react-dom": "^18.2.0",
  "typescript": "^5.0.2",
  "vite": "^4.4.5",
  "@supabase/supabase-js": "^2.38.4",
  "@google/generative-ai": "^0.1.3",
  "tailwindcss": "^3.3.3",
  "lucide-react": "^0.294.0"
}

๐Ÿงญ Pages & Previews

๐Ÿ  Dashboard

Your personalized learning hub with progress tracking, recent activity, and quick access to tools.
Dashboard


๐Ÿ“น Video Learning

Integrated video player with transcript and AI-powered analysis.
Video Learning


๐Ÿ—บ๏ธ Roadmap Generator

Personalized learning paths based on your goals and current knowledge.
Roadmap


๐Ÿ’ฌ AI Chat Interface

Interactive chat with AI tutor for instant help and explanations.
AI Chat


๐Ÿš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

Installation

  1. Clone the repository

    git clone https://github.com/abhayclasher/StudySync-AI.git
    cd StudySync-AI
  2. Install dependencies

    npm install
  3. Set up Supabase

    • Create a new Supabase project at Supabase Console
    • Enable authentication and create required tables
    • Copy your Supabase URL and Anon Key
    • Create a .env.local file in the root directory:
    VITE_SUPABASE_URL=your_supabase_url
    VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
    VITE_GEMINI_API_KEY=your_gemini_api_key
    YOUTUBE_API_KEY=your_youtube_api_key  # Optional but recommended for enhanced functionality

    Important Security Note:

    • Never commit actual API keys to version control
    • Always use .env.local for local development
    • For production deployment, add these variables in your hosting platform's environment settings (Vercel, Netlify, etc.)

    Important Supabase Configuration:

    • After creating your Supabase project, go to Authentication โ†’ Settings
    • Add these URLs to "Redirect URLs":
      • For local development: http://localhost:3000
      • For deployed app: your deployed URL (e.g., https://your-app-name.vercel.app)
    • Enable the authentication providers you want to use (Google, GitHub, etc.)

    For Production Deployment (Vercel): Add these environment variables in your Vercel project settings:

    • VITE_SUPABASE_URL
    • VITE_SUPABASE_ANON_KEY
    • VITE_GEMINI_API_KEY
  4. Run the development server

    npm run dev
  5. Open your browser Navigate to http://localhost:5173

Build for Production

npm run build
npm run preview

๐Ÿ–ฅ๏ธ Backend Architecture

Serverless Functions (Vercel)

StudySync AI now uses Vercel serverless functions instead of a traditional backend server. This provides better scalability and easier deployment.

The serverless functions are located in the api/ directory and handle:

  • YouTube transcript extraction
  • Video and playlist processing
  • All API endpoints previously handled by the separate backend

API Endpoints

Endpoint Method Description Request Body
/api/transcript POST Fetch YouTube video transcript { "url": "youtube_video_url" }
/api/video POST Process YouTube videos/playlist { "url": "youtube_video_url" }
/api/playlist POST Fetch YouTube playlist videos { "url": "youtube_playlist_url" }

Environment Variables

For Vercel deployment, ensure these environment variables are set in your Vercel project settings:

  • YOUTUBE_API_KEY: YouTube API key for enhanced functionality (optional, as functions have fallback methods)

๐Ÿงฉ Project Structure

StudySync-AI/
โ”‚
โ”œโ”€โ”€ api/                          # API endpoints and transcript handling
โ”‚   โ”œโ”€โ”€ playlist.js               # YouTube playlist processing
โ”‚   โ””โ”€โ”€ transcript.js             # Transcript generation and processing
โ”‚
โ”œโ”€โ”€ components/                   # React components
โ”‚   โ”œโ”€โ”€ ui/                       # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ 3d-card.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ apple-cards-carousel.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ bento-grid.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ colourfull-text.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ container-scroll-animation.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ evervault-card.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ particles.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ sidebar.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ sticky-scroll-reveal.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ tabs.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ text-generate-effect.tsx
โ”‚   โ”‚   โ””โ”€โ”€ wobble-card.tsx
โ”‚   โ”œโ”€โ”€ AuthModal.tsx             # Authentication modal
โ”‚   โ”œโ”€โ”€ ChatInterface.tsx         # AI chat interface
โ”‚   โ”œโ”€โ”€ Dashboard.tsx             # Main dashboard
โ”‚   โ”œโ”€โ”€ DocumentUpload.tsx        # Document upload component
โ”‚   โ”œโ”€โ”€ FlashcardDeck.tsx         # Flashcard system
โ”‚   โ”œโ”€โ”€ LandingPage.tsx           # Landing page
โ”‚   โ”œโ”€โ”€ QuizArena.tsx             # Quiz system
โ”‚   โ”œโ”€โ”€ RightSidebar.tsx          # Right sidebar
โ”‚   โ”œโ”€โ”€ RoadmapGenerator.tsx      # Learning roadmap generator
โ”‚   โ”œโ”€โ”€ Sidebar.tsx               # Main sidebar
โ”‚   โ””โ”€โ”€ VideoPlayer.tsx           # Video player with transcript
โ”‚
โ”œโ”€โ”€ hooks/                        # Custom React hooks
โ”‚   โ””โ”€โ”€ use-outside-click.tsx
โ”‚
โ”œโ”€โ”€ lib/                          # Utility functions & configs
โ”‚   โ”œโ”€โ”€ supabase.ts               # Supabase client initialization
โ”‚   โ””โ”€โ”€ utils.ts                  # Helper functions
โ”‚
โ”œโ”€โ”€ server/                       # Server-side code
โ”‚   โ”œโ”€โ”€ index.js                  # Server entry point
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ package-lock.json
โ”‚
โ”œโ”€โ”€ services/                     # Business logic services
โ”‚   โ”œโ”€โ”€ db.ts                     # Database service
โ”‚   โ””โ”€โ”€ geminiService.ts          # Gemini AI service
โ”‚
โ”œโ”€โ”€ public/                       # Static assets
โ”‚   โ””โ”€โ”€ *.svg                     # Icons and images
โ”‚
โ”œโ”€โ”€ .env.example                  # Environment variables template
โ”œโ”€โ”€ .gitignore                    # Git ignore configuration
โ”œโ”€โ”€ App.tsx                       # Main application component
โ”œโ”€โ”€ index.html                    # HTML entry point
โ”œโ”€โ”€ index.tsx                     # React entry point
โ”œโ”€โ”€ package.json                  # Project dependencies
โ”œโ”€โ”€ setup-database.js             # Database setup script
โ”œโ”€โ”€ supabase_init.sql             # Database initialization SQL
โ”œโ”€โ”€ tsconfig.json                 # TypeScript configuration
โ”œโ”€โ”€ vite.config.ts                # Vite configuration
โ””โ”€โ”€ README.md                     # Project documentation

๐Ÿ”— API Integration

Gemini AI Integration

StudySync AI leverages Google's Gemini API for intelligent content analysis and generation:

  • Document Analysis: Automatically analyze uploaded documents to extract key concepts
  • Quiz Generation: Create personalized quizzes based on learning materials
  • Explanation Generation: Provide detailed explanations for complex topics
  • Content Summarization: Generate concise summaries of lengthy content

Supabase Integration

  • Authentication: Secure user authentication and authorization
  • Database: Real-time data synchronization and storage
  • Storage: Document and media file storage
  • Real-time: Live updates for collaborative features

YouTube Integration

  • Video Processing: Analyze YouTube videos for educational content
  • Transcript Extraction: Automatically extract and process video transcripts
  • Playlist Management: Handle entire YouTube playlists for comprehensive learning

๐Ÿš€ Deployment

Live Site

The application is deployed on Vercel for optimal performance and reliability.

๐ŸŒ Visit: studysync-ai.vercel.app

Deploy Your Own

Option 1: Deploy to Vercel (Recommended)

Deploy with Vercel

  1. Click the button above
  2. Connect your GitHub account
  3. Add environment variables (Supabase, Gemini API, and YouTube API config)
  4. Set Build Command: npm run build (Vercel will auto-detect this but you can verify)
  5. Set Output Directory: dist (Vercel will auto-detect this but you can verify)
  6. Add Node.js version: 18.x or higher
  7. Deploy!

Required Environment Variables for Vercel:

  • VITE_SUPABASE_URL: Your Supabase project URL
  • VITE_SUPABASE_ANON_KEY: Your Supabase anon key
  • VITE_GEMINI_API_KEY: Your Google Gemini API key
  • YOUTUBE_API_KEY: Your YouTube Data API key (optional, but recommended for full functionality)

Important: After deployment, make sure to configure Supabase authentication:

  • Go to your Supabase dashboard
  • Navigate to Authentication โ†’ Settings (or URL Configuration in older versions)
  • Add your deployed URL (e.g., https://your-app-name.vercel.app) to the "Redirect URLs" field
  • For local development, make sure to include http://localhost:5173 in the "Redirect URLs" field
  • For social logins (Google, GitHub), these redirect URLs must match exactly what you're using in your application

Option 2: Manual Deployment

Install Dependencies:

npm install

Build for Production:

npm run build

Deploy with Vercel CLI:

# Install Vercel CLI globally
npm install -g vercel

# Deploy to production
vercel --prod

Preview locally:

npm run preview

Option 3: Other Platforms

  • Netlify: Use the included build configuration (Build command: npm run build, Publish directory: dist)
  • Docker: Build a container with your preferred setup
  • Self-hosted: Deploy on any Node.js server with the required dependencies

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help:

Ways to Contribute

  • ๐Ÿ› Report Bugs: Open an issue describing the problem
  • ๐Ÿ’ก Suggest Features: Share your ideas for improvements
  • ๐Ÿ”ง Submit Pull Requests: Fix bugs or add new features
  • ๐Ÿ“š Improve Documentation: Help make the docs better
  • ๐ŸŒ Spread the Word: Share StudySync AI with others

Development Workflow

  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

Code Standards

  • Follow the existing code style
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test your changes thoroughly
  • Update documentation as needed

๐Ÿ“„ License

This project is licensed under the MIT License.

โœ… Permitted: Personal use, modifications, commercial use
โœ… Required: Include copyright notice and license in all copies

See the LICENSE file for complete terms.


๐Ÿ™ Acknowledgments

  • Supabase for providing robust real-time database infrastructure
  • Vercel for seamless deployment and hosting
  • Google Gemini for powerful AI capabilities
  • React Team for the incredible component framework
  • Open Source Community for inspiration and support
  • YouTube API for video content integration

๐Ÿ› ๏ธ Troubleshooting

Common Login Issues

1. Login not working after deployment:

  • Make sure you've properly set the environment variables in your deployment platform
  • Check that your Supabase project has the correct redirect URLs configured in Authentication settings
  • Verify that the deployed URL is added to both "Redirect URLs" and "Additional URLs" in Supabase

2. Supabase client not initialized:

  • Ensure VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY are correctly set
  • Check that the environment variables are properly prefixed with VITE_ for Vite to expose them

3. Social login not working:

  • For Google/GitHub OAuth, make sure to configure the providers in your Supabase Authentication settings
  • Add the correct redirect URLs for your deployed application
  • Example redirect URLs: https://your-app-name.vercel.app, http://localhost:5173

4. After successful login, page doesn't update:

  • This might be due to a missing auth state listener
  • Make sure the Supabase client is properly initialized with correct credentials
  • Check browser console for any error messages

5. Social login redirects to wrong URL (e.g., localhost:3000 instead of localhost:5173):

  • This is caused by incorrect redirect URL configuration in your Supabase authentication settings
  • Go to your Supabase dashboard โ†’ Authentication โ†’ Settings
  • Update the "Redirect URLs" to match your application's URL (e.g., http://localhost:5173 for local development, your deployed URL for production)
  • Make sure to include all possible URLs where your app runs

๐Ÿ“ž Support & Contact

Need help or have questions?


โค๏ธ Credits

๐Ÿ‘จโ€๐Ÿ’ป Developed by

Abhay Kumar

๐Ÿง  Full Stack Web Developer | 21 | Kolkata, India ๐Ÿ‡ฎ๐Ÿ‡ณ
Building technology that transforms learning through AI and innovation

๐Ÿ† About the Developer

  • ๐Ÿ’ป Passionate about creating impactful solutions with modern web technologies
  • ๐ŸŽฏ Focused on education technology and AI-powered learning
  • ๐ŸŽ“ Self-taught developer with expertise in React, TypeScript, and AI integration
  • โ™Ÿ๏ธ Hobbies: Chess, Cricket, and Open Source Contribution

๐Ÿ”— Connect With Me

Website GitHub LinkedIn Email


๐Ÿ’ญ Project Philosophy

"Every concept mastered, every milestone achieved."

This project was born from a simple belief: technology should enhance learning.
In today's world, everyone deserves access to personalized, effective learning tools.
StudySync AI eliminates barriers between complex concepts and understanding.

No limits. No boundaries. Just learning unleashed.


โญ If this project helped you or someone you know, please star it! โญ
Your support motivates continued development and helps others discover this resource.


โค๏ธ Made with passion in India ๐Ÿ‡ฎ๐Ÿ‡ณ
Dedicated to everyone working to make education accessible and effective

About

๐Ÿ“š StudySync AI - Transform Your Learning Experience with AI-Powered Study Tools โ€” Master Knowledge, One Concept at a Time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors