# Project export: Dumbify

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: UC Berkeley AI Hackathon 2025
- Tagline: Utilizing ClaudeAI, Dumbify is a chatbot that translates complex concepts into easy-to-digest ideas, unique and curated for each user. Input what you know, outputs what you don't, yet. It's so DUMB!
- Devpost: https://devpost.com/software/dumbify
- GitHub: https://github.com/Ualps/Dumbify.git
- Team: 1 GitHub contributor(s) — Ualps (2 commits)

## Devpost submission (written by the team)

### Inspiration

After being approached by a successful entrepreneur (he pulled up a photo with Elon Musk) while brainstorming our project, we were somehow introduced to the idea of linear fractals amidst our conversation. Earlier in the day, our group was bonding over trending "brainrot" memes and online videos and shared a laughing moment at the way our society has ended up to where these videos are dominating the internet. Given this shared knowledge among our group and our shared lack of knowledge of the complex idea of linear fractals, we thought of the idea to build an app that would help us break down intellectually stimulating concepts into terminology and intellect that we could all understand.

### What it does

Dumbify is a state-of-the-art chatbot that utilizes Claude API to unpack complex concepts in terms of each user's unique, personal passions.

### How we built it

Dumbify was built using a simple Flask web app using embedded CSS and JS for the frontend. The backend uses Flask to handle the two main endpoints. One for learning and the other for using document processing with pypdf. The core functionality uses user inputs (topic, interests and learning style) and uses Claude's API to give the user a simple explanation.

### Challenges we ran into

All being beginner coders, we took this as an opportunity to learn coding fundamentals and technical terms. We all come from different backgrounds, whether it be mathematics, informatics, psychology, or electrical engineering. Given this, we lacked any advanced coding abilities. This didn't stop us, as we still proppeled our strengths to produce a project that provided a tangible solution to each of our lives.

### Accomplishments we're proud of

Under the same realm, we are extremely proud that, given our coding abilities and knowledge of the tech landscape, we were still able to come together and produce something that we can be proud of and have real-world application in our lives.

### What we learned

We learned immeasurable amounts of knowledge, whether it be technical coding terms and techniques like embedding APIs into our code, to general knowledge of artificial intelligence and how everyday people interact with technology. We left this experience with an unimaginable amount of information and newfound ambitions to incorporate ourselves in the world of AI and technology.

### What's next

We believe that Dumbify has the potential to be used for a plethora of end users, whether it be at a sophisticated capacity, such as the education system, or just simple everyday life, like stumbling across an idea you are unfamiliar with. Dumbify has the potential to make everybody feel smarter by becoming a bit dumber.

## README (from the GitHub repository)

Dumbify dumbs down any concept into an east to understand concept you are passionante about. 
Please enter a claude API key on line 13


## Detected evidence (automated analysis)

Indexed codebase: 2 recognized source files, 42 KB.
- Python (language) — detected in the code
- HTML (language) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (2 of 2)

```
dumbify.py
README.md
```

### Dependencies

No dependency index available.

### Recent commits (newest first)

- Create README.md
- Add files via upload

## Key source files (fetched from GitHub, selected and truncated for size)

### dumbify.py

```python
from flask import Flask, request, jsonify, render_template_string
from flask_cors import CORS
import anthropic
import traceback
import os
from werkzeug.utils import secure_filename
import PyPDF2
import io

app = Flask(__name__)
CORS(app)

API_KEY = ''  #ENTER API KEY HERE


# Configure upload settings
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024  # 16MB max file size
UPLOAD_FOLDER = 'uploads'
ALLOWED_EXTENSIONS = {'txt', 'md', 'pdf'}
# Create uploads directory if it doesn't exist
if not os.path.exists(UPLOAD_FOLDER):
    os.makedirs(UPLOAD_FOLDER)

def allowed_file(filename):
    return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS

def extract_text_from_file(file_stream, filename):
    """Extract text from uploaded file"""
    try:
        # Reset file stream position
        file_stream.seek(0)
        
        # Get file extension
        file_extension = filename.rsplit('.', 1)[1].lower()
        
        if file_extension == 'pdf':
            # Handle PDF files
            pdf_reader = PyPDF2.PdfReader(file_stream)
            text = ""
            
            for page_num in range(len(pdf_reader.pages)):
                page = pdf_reader.pages[page_num]
                text += page.extract_text() + "\n"
            
            return text.strip()
        else:
            # Handle text files (txt, md)
            text = file_stream.read().decode('utf-8')
            return text.strip()
            
    except Exception as e:
        return f"Error reading file: {str(e)}"

# Enhanced Professional HTML Template
HTML_TEMPLATE = """
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dumbify - Personalized Learning Assistant</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        :root {
            --primary-color: #2563eb;
            --primary-dark: #1d4ed8;
            --secondary-color: #f1f5f9;
            --accent-color: #06b6d4;
            --success-color: #10b981;
            --warning-color: #f59e0b;
            --error-color: #ef4444;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --border-color: #e2e8f0;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
            --border-radius: 0.75rem;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            min-height: 100vh;
            color: var(--text-primary);
            line-height: 1.6;
        }

        .navbar {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border-color);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .navbar-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
        }

        .logo-icon {
            background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
            color: white;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            align-items: center;
        }

        .nav-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s ease;
        }

        .nav-link:hover {
            color: var(--primary-color);
        }

        .container {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 2rem;
        }

        .hero-section {
            text-align: center;
            padding: 3rem 0 4rem;
        }

        .hero-title {
            font-size: 3.5rem;
            font-weight: 800;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero-subtitle {
            font-size: 1.25rem;
            color: var(--text-secondary);
            margin-bottom: 2rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin-bottom: 3rem;
        }

        .feature-card {
            background: white;
            padding: 1.5rem;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            text-align: center;
            transition: all 0.3s ease;
        }

        .feature-card:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
        }

        .feature-ico
[truncated — 36440 more characters]
```