Skip to content

sahildadhwal/CalHacks2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š LearnIt AI - Smart Syllabus Scheduler

Transform your course syllabus into a personalized, AI-powered study schedule complete with YouTube video resources and interactive quizzes!

๐Ÿ† CalHacks 2025 Project
๐Ÿ‘ฅ Team: Sahil Dadhwal, Vicky Kang, Mai Westfall

๐ŸŒ Live Site: calhacks2025-learnitai.up.railway.app

๐ŸŒ Live Demo Video: YouTube Demo


๐ŸŽฏ Problem Statement

33% of first-generation students drop out (Source: NCES)

While colleges offer financial aid, daycare, and counseling, students still struggle to manage their coursework effectively. LearnIt AI bridges this gap by providing personalized, AI-powered study schedules that adapt to individual learning needs.


โœจ Features

๐Ÿ“„ Smart Input Options

  • PDF Upload Support - Direct syllabus PDF upload with text extraction
  • Text Input - Paste syllabus content directly
  • File Support - PDF, TXT, and Markdown files

๐Ÿค– AI-Powered Planning

  • Intelligent Scheduling - Weekly and daily study plans using Groq's Llama 3.3 70B
  • Realistic Time Estimates - 2-3 hour daily sessions
  • Progressive Difficulty - Gradual complexity increase
  • Review Days - Strategic review sessions before major topics

๐Ÿ“บ Rich Learning Resources

  • YouTube Integration - Curated video search links for each topic
  • Specific Search Terms - Targeted educational content
  • Direct Links - One-click access to video tutorials

๐Ÿง  Interactive Quizzes

  • Auto-Generated Questions - Multiple choice quizzes for each major topic
  • Instant Feedback - Immediate answer validation
  • Detailed Explanations - Learn why answers are correct/incorrect

๐Ÿ“Š Progress Tracking

  • Visual Progress Bar - See your completion percentage
  • Persistent Storage - Saves locally in your browser
  • Task Completion - Mark days as complete
  • Statistics Dashboard - Track weeks, hours, videos, and quizzes

๐Ÿ“… Export & Share

  • Calendar Export - iCalendar (.ics) format for Google Calendar, Outlook, etc.
  • Print Schedule - Printer-friendly format
  • Share Functionality - Share your study plan with friends

๐ŸŽจ Modern User Experience

  • Responsive Design - Works on desktop, tablet, and mobile
  • Intuitive Interface - Clean, easy-to-navigate UI
  • Smooth Animations - Professional transitions and effects
  • Dark/Light Accents - Modern gradient design

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • pip (Python package manager)
  • Groq API Key (FREE - see setup below)

Installation

  1. Clone the repository
git clone https://github.com/sahildadhwal/CalHacks2025.git
cd CalHacks2025
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables

Create a .env file in the root directory:

GROQ_API_KEY=your_groq_api_key_here
  1. Run the application
python app.py
  1. Open in browser
http://localhost:5001

๐Ÿ”‘ Getting Your FREE Groq API Key

LearnIt AI uses Groq's lightning-fast AI inference API (powered by Llama 3.3 70B). Here's how to get your free API key:

Step 1: Sign Up

  1. Go to console.groq.com
  2. Click "Sign Up" or "Get Started"
  3. Create a free account (no credit card required!)

Step 2: Generate API Key

  1. After signing in, navigate to console.groq.com/keys
  2. Click "Create API Key"
  3. Give it a name (e.g., "LearnIt AI")
  4. Copy the generated key (it will look like gsk_...)

Step 3: Add to Your Project

Option A: Environment Variable (Recommended)

# Create .env file
echo "GROQ_API_KEY=your_key_here" > .env

Option B: Web Interface

  1. Start the app without an API key
  2. Click "Change Key" in the API Status section
  3. Paste your key and click "Save"
  4. The key will be stored in your browser's local storage

Why Groq?

  • โšก Fastest inference - Up to 10x faster than alternatives
  • ๐Ÿ†“ Generous free tier - No credit card required
  • ๐Ÿง  Powerful models - Llama 3.3 70B Versatile
  • ๐ŸŽฏ JSON mode - Perfect for structured output
  • ๐ŸŒ Great API - Simple, well-documented

๐Ÿ“– How to Use

1. Upload Your Syllabus

Option A: Upload File

  • Drag and drop your syllabus PDF
  • Or click to browse and select a file
  • Supports PDF, TXT, and Markdown files

Option B: Paste Text

  • Copy your syllabus content
  • Paste directly into the text area

2. Configure Settings

Course Duration

  • Select from 4 to 16 weeks
  • Default: 10 weeks

Start Date

  • Choose when you want to begin
  • Default: Today

3. Generate Schedule

  1. Click "Generate Study Plan"
  2. Wait 10-20 seconds for AI processing
  3. View your personalized schedule!

4. Use Your Schedule

Weekly View

  • Click week headers to expand/collapse
  • See overview for each week

Daily Breakdown

  • View daily topics and objectives
  • See estimated study hours
  • Access YouTube video resources
  • Take interactive quizzes
  • Mark days as complete

Track Progress

  • Visual progress bar shows completion
  • Progress saved automatically
  • Export to calendar apps
  • Print or share your schedule

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ User Starts โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Upload Syllabus     โ”‚      โ”‚ Set Preferences  โ”‚
โ”‚ - PDF/TXT           โ”‚โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ - Duration       โ”‚
โ”‚ - Paste Text        โ”‚      โ”‚ - Start Date     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ”‚
                                      โ–ผ
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚ Click Generateโ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ”‚
                                      โ–ผ
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ”‚  AI Processing      โ”‚
                          โ”‚  Groq Llama 3.3 70B โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
                                     โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Create Study Schedule         โ”‚
                    โ”‚  - Weekly Topics               โ”‚
                    โ”‚  - Daily Objectives            โ”‚
                    โ”‚  - Study Hours                 โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                                 โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Add Resources                 โ”‚
                    โ”‚  - YouTube Videos              โ”‚
                    โ”‚  - Quiz Questions              โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                                 โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  Display Interactive Schedule  โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                                 โ–ผ
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚  User Features                 โ”‚
                    โ”‚  - Take Quizzes                โ”‚
                    โ”‚  - Watch Videos                โ”‚
                    โ”‚  - Track Progress              โ”‚
                    โ”‚  - Export Calendar             โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ Tech Stack

Backend

  • Flask - Python web framework
  • Groq API - AI inference (Llama 3.3 70B)
  • PyPDF2 - PDF text extraction
  • python-dotenv - Environment variable management
  • Gunicorn - Production WSGI server

Frontend

  • Vanilla JavaScript - No framework bloat
  • HTML5 - Semantic markup
  • CSS3 - Modern styling with gradients
  • Font Awesome - Icons

Deployment

  • Railway - Hosting platform
  • Nixpacks - Build system
  • Docker - Containerization support

APIs & Services

  • Groq API - Fast LLM inference
  • YouTube Search - Video resource integration
  • iCalendar - Calendar export format

๐Ÿš‚ Deployment on Railway

The app is deployed at: calhacks2025-learnitai.up.railway.app

Deploy Your Own

  1. Fork this repository

  2. Create Railway account

  3. Create new project

    • Click "New Project"
    • Select "Deploy from GitHub repo"
    • Choose your forked repository
  4. Add environment variables

    • Go to project settings
    • Add variable: GROQ_API_KEY=your_key_here
  5. Deploy!

    • Railway will automatically build and deploy
    • Your app will be live at your-app.up.railway.app

Custom Domain (Optional)

  • Go to Settings โ†’ Domains
  • Add your custom domain
  • Update DNS records as shown

๐Ÿ“ Key Files Explained

CalHacks2025/
โ”œโ”€โ”€ app.py                 # Flask backend API
โ”œโ”€โ”€ requirements.txt       # Python dependencies
โ”œโ”€โ”€ Dockerfile            # Docker configuration
โ”œโ”€โ”€ railway.json          # Railway deployment config
โ”œโ”€โ”€ nixpacks.toml         # Nixpacks build config
โ”œโ”€โ”€ Procfile              # Process configuration
โ”œโ”€โ”€ .env.example          # Environment template
โ”œโ”€โ”€ static/
โ”‚   โ”œโ”€โ”€ app.js           # Frontend JavaScript logic
โ”‚   โ””โ”€โ”€ styles.css       # Responsive styling
โ””โ”€โ”€ templates/
    โ””โ”€โ”€ index.html       # Main HTML template

๐ŸŽฏ Use Cases

For Students

  • First-Generation Students - Structured learning path
  • Self-Learners - Organize independent study
  • Online Courses - Break down MOOC syllabi
  • Exam Prep - Systematic review schedules

For Educators

  • Course Planning - Visualize syllabus pacing
  • Student Sharing - Distribute study guides
  • Tutoring - Create structured learning plans

๐Ÿ’ก Future Enhancements

Planned Features

  • ๐Ÿค Collaborative Study Groups - Study with classmates
  • ๐Ÿ’ฌ AI Tutoring Chatbot - Get help on specific topics
  • ๐ŸŽฎ Study Streak Gamification - Maintain daily streaks
  • โš™๏ธ Custom Intensity Levels - Light, moderate, intense study
  • ๐Ÿ—ƒ๏ธ Flashcard Generation - Auto-create flashcards
  • ๐Ÿ“ฑ Mobile App - Native iOS/Android apps
  • ๐Ÿ”— LMS Integration - Canvas, Blackboard, Moodle
  • ๐Ÿ“ง Email Reminders - Daily study notifications
  • ๐ŸŽจ Theme Customization - Personalize your interface

๐Ÿ› Troubleshooting

PDF Extraction Issues

Problem: PDF content not extracting properly
Solutions:

  • Ensure PDF contains selectable text (not scanned images)
  • Try copy-pasting text manually into the text area
  • Use a PDF with actual text layers

API Errors

Problem: "API Error: 401" or "No API key"
Solutions:

  • Verify your Groq API key is correct
  • Check that key is in .env file or added via web interface
  • Ensure no extra spaces in the key
  • Try generating a new API key

Schedule Not Generating

Problem: Loading spinner runs forever
Solutions:

  • Provide detailed syllabus content (more than just topic names)
  • Check browser console for errors (F12)
  • Try a shorter duration first (4-8 weeks)
  • Verify internet connection
  • Check API quota hasn't been exceeded

Browser Compatibility

Problem: Features not working
Solutions:

  • Use a modern browser (Chrome, Firefox, Safari, Edge)
  • Enable JavaScript
  • Clear browser cache
  • Try incognito/private mode

Progress Not Saving

Problem: Completion marks disappear
Solutions:

  • Enable browser local storage
  • Don't use private/incognito mode
  • Check browser storage settings

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

Report Bugs

  • Use GitHub Issues
  • Provide detailed description
  • Include screenshots if applicable
  • Share browser console errors

Suggest Features

  • Open a GitHub Issue
  • Describe the feature
  • Explain the use case
  • Discuss implementation ideas

Submit Pull Requests

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

๐Ÿ† Hackathon Features

Perfect for CalHacks 2025 because:

  • โœ… Solves Real Problem - Addresses 33% dropout rate
  • โœ… Cutting-Edge AI - Uses Groq's fastest inference
  • โœ… Beautiful UI - Modern, responsive design
  • โœ… Practical & Useful - Students can use immediately
  • โœ… Easy to Demo - Quick setup and clear value prop
  • โœ… Scalable Concept - Can grow into full platform
  • โœ… Social Impact - Helps underserved students succeed

Project Repository: github.com/sahildadhwal/CalHacks2025
Live Site: calhacks2025-learnitai.up.railway.app

Built for: CalHacks 2025


๐Ÿ™ Acknowledgments

  • Groq - For providing fast, free AI inference
  • Cal Hacks - For organizing an amazing hackathon
  • YouTube - For educational content integration
  • Open Source Community - For amazing tools and libraries

๐Ÿ“Š Project Stats

  • Lines of Code: ~2,500+
  • Development Time: 36 hours (hackathon)
  • Technologies Used: 10+
  • Coffee Consumed: โˆž
  • Students Helped: Growing!

โญ Star this repo if you find it helpful!

๐Ÿš€ Good luck with your studies, and happy learning!


About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published