# Project export: VEDA - AI Coach

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: TreeHacks 2026
- Tagline: VEDA is an AI backpack that helps you study. It takes your documents and teaches you to clarify every doubt. Once you've mastered the topic, share it with public and turn your knowledge into income.
- Devpost: https://devpost.com/software/veda-3j6rq8
- GitHub: https://github.com/kanakapalli/veda
- Demo: https://app.presentations.ai/view/CIABIjQ5iZ
- Video: https://www.youtube.com/embed/udSnclxsoC8?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 0 GitHub contributor(s) — 

## Devpost submission (written by the team)

### Overview

Veda is an AI-powered learning platform where anyone can create a course just by uploading their documents and chatting with an AI — and anyone can learn from it through interactive, voice-narrated lessons that teach you like a real tutor. No video production. No slide decks. Just upload your knowledge, and Veda turns it into a structured, voice-driven learning experience. Built as a full-stack Dart monorepo with Serverpod, Flutter, Gemini AI, RAG-powered retrieval, and ElevenLabs text-to-speech.

### Inspiration

We noticed a fundamental disconnect in online education. Creating a course is absurdly hard — you need to script lectures, record videos, edit slides, structure a syllabus. And on the other side, consuming courses is passive — you watch videos, maybe take a quiz, and hope something sticks. We asked ourselves: what if the barrier to teaching was as low as uploading a PDF? What if learning felt like having a private tutor who speaks to you, explains concepts at your pace, and answers your questions on the spot? The name Veda comes from the Sanskrit word for "knowledge." The oldest organized knowledge systems in human history were oral — a teacher speaking directly to a student. We wanted to bring that back, powered by modern AI. We were also inspired by the idea that expertise is trapped — professors have research papers, engineers have documentation, specialists have manuals. All of that knowledge just sits in files. Veda unlocks it and makes it teachable. What It Does Veda is a two-sided AI learning platform with distinct creator and learner experiences: For Creators (Web) Upload knowledge files (PDFs, DOCX, TXT) — Veda extracts the text and generates semantic embeddings using Gemini's embedding model for RAG-powered retrieval. Chat with AI to build your course — In CREATE mode, you have a conversation with Gemini AI that has tool-calling capabilities. The AI can create modules, generate topics, write descriptions, update course metadata, and even generate course images — all through natural conversation. Auto-generate course structure — Upload your files, and Veda can automatically generate a complete table of contents with modules and topics by analyzing your knowledge base using RAG. Preview your course in TEACH mode — Switch to teaching mode, select a module, and hear your course delivered as a voice-narrated lecture with real-time word highlighting. For Learners (Mobile) Browse and discover — Search for courses, coaches, and topics. Explore a curated dashboard with enrolled courses, popular coaches, and topic-based discovery. Enroll and learn — Enroll in public courses, track progress across modules, and pick up where you left off. Interactive teaching sessions — Each module is delivered as a live AI-generated lecture with text-to-speech narration. The AI retrieves relevant knowledge from the course's uploaded files to deliver accurate, contextual explanations. Ask questions mid-lesson — After a lecture, use speech-to-text to ask follow-up questions. The AI answers with RAG context and maintains conversation history. Choose your learning style — Select between Quick (concise), Explanative (detailed), or Lecture (comprehensive) teaching modes that control the depth and length of AI-generated content. Track progress — Module-level progress tracking, course completion percentages, and a dedicated Learn tab showing all enrolled courses. How We Built It AI Stack Gemini 3.0 Flash & pro — Powers course creation (with function calling/tool use), teaching content generation, and Q&A. Gemini Embedding Model (gemini-embedding-001) — Generates 3072-dimensional vectors for semantic search across knowledge files. pgvector — PostgreSQL extension with HNSW indexing for fast cosine-similarity searches across course knowledge bases. ElevenLabs TTS (eleven_turbo_v2) — Converts AI-generated lectures into natural speech with expressive audio tags ([excited], [serious], [emphasizes], [pauses]). RAG Pipeline Creator uploads a document → stored in S3-compatible cloud storage Text is extracted and truncated to 10,000 characters Gemini generates a 3072-dimensional embedding Embedding is stored in PostgreSQL with an HNSW index At teaching time, the system retrieves the top 5 most relevant knowledge chunks using cosine similarity Retrieved context is injected into the teaching prompt for accurate, grounded responses Course Creation via Tool Calling In CREATE mode, Gemini has access to 7 tools: update_course — Modify title, description, visibility, video URL create_module / create_topic / add_topic_to_module — Build course structure generate_course_image / generate_banner_image / generate_module_image — AI-generated visuals The AI decides which tools to call based on the conversation, making course creation feel like talking to a knowledgeable assistant. Design System We built a custom Neo-Minimalist design system inspired by architectural blueprints and Swiss design: Pure black/white palette with zinc grays — zero color noise JetBrains Mono for system labels, Inter for headings and body Sharp rectangular aesthetic — zero border radius throughout 2px white borders as the primary visual element Grayscale image treatment for consistency Challenges We Ran Into RAG Quality and Embedding Precision Getting useful results from semantic search was harder than expected. Early on, embeddings from long documents returned irrelevant chunks. We had to experiment with text truncation strategies, similarity thresholds, and the number of retrieved chunks to balance relevance vs. coverage. Coordinating AI Tool Calling with Real Database Operations When Gemini calls a tool like create_module, that's a real database write happening in the middle of a chat response. Managing the transactional flow — parsing the AI's tool call, executing it against the database, returning the result to the AI, and updating the Flutter UI in real-time — required careful orchestration between the endpoint, service layer, and client. Audio Synchronization with Word Highlighting Syncing ElevenLabs TTS audio playback with real-time word highlighting was a significant technical challenge. We had to map audio position to word indices, handle variable speech rates, and keep highlighting smooth without jank — all while supporting pause/resume and adjacent-word highlighting. Full-Stack Dart at Scale Building everything in Dart — server, client, and frontend — is powerful for type safety but meant we couldn't fall back on mature ecosystem solutions from Node.js or Python. We worked through Serverpod's patterns for auth, file storage, migrations, and pgvector integration, often being early adopters of these patterns. Cross-Platform Consistency The same Flutter codebase serves a web-based creator tool (3-panel course architect) and a mobile-first learner experience. Designing responsive layouts and navigation flows that work across both paradigms without platform-specific code was an ongoing challenge. Accomplishments That We're Proud Of End-to-end course creation through conversation — You can go from a blank course to a fully structured, image-rich, publishable course just by chatting with an AI. No forms, no drag-and-drop builders. Just natural language. End-to-end course creation through conversation — You can go from a blank course to a fully structured, image-rich, publishable course just by chatting with an AI. No forms, no drag-and-drop builders. Just natural language. RAG-powered teaching that actually works — The AI doesn't hallucinate content. It retrieves real knowledge from uploaded documents and weaves it into coherent lectures. The teaching quality directly reflects the quality of uploaded materials. RAG-powered teaching that actually works — The AI doesn't hallucinate content. It retrieves real knowledge from uploaded documents and weaves it into coherent lectures. The teaching quality directly reflects the quality of uploaded materials. Voice-narrated learning with real-time word highlighting — It genuinely feels like having a tutor read to you. The synchronized highlighting keeps you engaged and lets you follow along at the AI's pace. Voice-narrated learning with real-time word highlighting — It genuinely feels like having a tutor read to you. The synchronized highlighting keeps you engaged and lets you follow along at the AI's pace. Full-stack type safety in one language — From PostgreSQL model definitions to Flutter widgets, everything is Dart. A change to a model automatically propagates through generated code to every layer of the stack. Zero JSON parsing bugs. Full-stack type safety in one language — From PostgreSQL model definitions to Flutter widgets, everything is Dart. A change to a model automatically propagates through generated code to every layer of the stack. Zero JSON parsing bugs. A design system that actually feels different — The Neo-Minimalist black/white aesthetic isn't just a theme — it's an intentional design philosophy that reduces visual noise and keeps focus on content. A design system that actually feels different — The Neo-Minimalist black/white aesthetic isn't just a theme — it's an intentional design philosophy that reduces visual noise and keeps focus on content. Course creation + consumption in one platform — Most edtech tools are either authoring tools OR learning platforms. Veda is both, connected by the same AI backbone. Course creation + consumption in one platform — Most edtech tools are either authoring tools OR learning platforms. Veda is both, connected by the same AI backbone. What We Learned RAG is only as good as your chunking and retrieval strategy. Raw document embeddings aren't magic. The quality of teaching output depends heavily on how you segment, embed, and retrieve knowledge. RAG is only as good as your chunking and retrieval strategy. Raw document embeddings aren't magic. The quality of teaching output depends heavily on how you segment, embed, and retrieve knowledge. AI tool calling transforms what's possible in UIs. Instead of building complex form-based interfaces for course creation, we let the AI decide what needs to happen based on conversation context. This dramatically simplified the creator experience. AI tool calling transforms what's possible in UIs. Instead of building complex form-based interfaces for course creation, we let the AI decide what needs to happen based on conversation context. This dramatically simplified the creator experience. Text-to-speech changes how people engage with content. Adding voice narration isn't just an accessibility feature — it fundamentally changes the learning experience. People pay attention differently when they're listening vs. reading. Text-to-speech changes how people engage with content. Adding voice narration isn't just an accessibility feature — it fundamentally changes the learning experience. People pay attention differently when they're listening vs. reading. Serverpod's code generation model is powerful but demands discipline. The generated client-server contract eliminates entire categories of bugs, but you have to respect the generation workflow and never touch generated files. Serverpod's code generation model is powerful but demands discipline. The generated client-server contract eliminates entire categories of bugs, but you have to respect the generation workflow and never touch generated files. Design constraints breed creativity. Limiting ourselves to a black/white palette forced us to communicate hierarchy through typography, spacing, and borders rather than color — and the result is more focused and legible. Design constraints breed creativity. Limiting ourselves to a black/white palette forced us to communicate hierarchy through typography, spacing, and borders rather than color — and the result is more focused and legible. What's Next for Veda Collaborative course creation — Multiple creators contributing to and co-editing the same course in real time. Collaborative course creation — Multiple creators contributing to and co-editing the same course in real time. Adaptive learning paths — AI that adjusts teaching depth, pace, and examples based on how the learner responds to questions and how quickly they progress through modules. Adaptive learning paths — AI that adjusts teaching depth, pace, and examples based on how the learner responds to questions and how quickly they progress through modules. Quiz and assessment generation — Auto-generated quizzes from course content with AI-graded free-response answers. Quiz and assessment generation — Auto-generated quizzes from course content with AI-graded free-response answers. Community features — Discussion threads per module, peer Q&A, and learner-to-learner interaction. Community features — Discussion threads per module, peer Q&A, and learner-to-learner interaction. Creator analytics — Dashboards showing enrollment trends, completion rates, and which modules learners struggle with most. Creator analytics — Dashboards showing enrollment trends, completion rates, and which modules learners struggle with most. Offline learning — Download courses and audio for offline consumption with progress syncing when back online. Offline learning — Download courses and audio for offline consumption with progress syncing when back online. Multi-language support — AI-translated courses and TTS in multiple languages, making knowledge accessible regardless of language barriers. Multi-language support — AI-translated courses and TTS in multiple languages, making knowledge accessible regardless of language barriers. Live mentoring sessions — Real-time audio/video sessions between coaches and learners, integrated directly into the course experience. Live mentoring sessions — Real-time audio/video sessions between coaches and learners, integrated directly into the course experience.

## README (from the GitHub repository)

# VEDA

**AI-powered learning platform — upload documents, chat with AI to create courses, learn through voice-narrated interactive lessons.**

Built as a full-stack Dart monorepo: **Serverpod** backend, **Flutter** frontend, **Gemini AI** for course creation & teaching, **pgvector** for RAG retrieval, **ElevenLabs** for text-to-speech.

---

## 📄 Documentation

| Document | Description |
|----------|-------------|
| [PROJECT_STORY.md](PROJECT_STORY.md) | Project narrative — inspiration, what it does, how we built it, challenges, accomplishments, and what's next. |
| [PROPOSAL.md](PROPOSAL.md) | Written proposal — problem statement, target audience, and monetization strategy (freemium tiers, revenue share, Veda Pass subscriptions, enterprise licensing). |
| [TECHNICAL_DOCS.md](TECHNICAL_DOCS.md) | Deep technical architecture — course creation with tool calling, file upload → embedding → pgvector pipeline, RAG retrieval, teaching & Q&A architecture, RevenueCat integration. |

---

## Project Structure

```
veda/
├── veda_server/     Serverpod 3.2.3 backend (PostgreSQL + pgvector + Redis)
├── veda_client/     Auto-generated client SDK (type-safe RPC)
├── veda_flutter/    Flutter app (iOS, Android, macOS, Windows, Linux, Web)
└── veda_desgin/     Static HTML design references
```

---

## Prerequisites

- **Dart SDK** `^3.8.0`
- **Flutter SDK** `^3.32.0`
- **Docker** (for PostgreSQL + Redis)
- **API Keys:**
  - [Google Gemini](https://aistudio.google.com/app/apikey) — AI chat, embeddings, course creation
  - [ElevenLabs](https://elevenlabs.io) — Text-to-speech
  - Gmail App Password — Email OTP verification ([generate here](https://myaccount.google.com/apppasswords))
  - AWS S3 credentials — File storage (optional, can use local storage)

---

## Setup & Run

### 1. Clone the repository

```bash
git clone https://github.com/kanakapalli/veda.git
cd veda
```

### 2. Start database services

```bash
cd veda_server
docker compose up -d
```

This starts:
- **PostgreSQL 16** (with pgvector) on port `8090`
- **Redis 6.2** on port `8091`

### 3. Configure API keys

Edit `veda_server/config/passwords.yaml` and add your keys:

```yaml
shared:
  geminiApiKey: 'YOUR_GEMINI_API_KEY'
  elevenlabsApiKey: 'YOUR_ELEVENLABS_API_KEY'
  AWSAccessKeyId: 'YOUR_AWS_ACCESS_KEY'
  AWSSecretKey: 'YOUR_AWS_SECRET_KEY'
  smtpUsername: 'your-email@gmail.com'
  smtpPassword: 'YOUR_GMAIL_APP_PASSWORD'
  smtpFromEmail: 'your-email@gmail.com'
```

### 4. Configure server host

Edit `veda_server/config/development.yaml` — set `publicHost` to your local IP:

```yaml
apiServer:
  port: 8080
  publicHost: YOUR_LOCAL_IP    # e.g., 192.168.1.100
  publicPort: 8080
  publicScheme: http
```

Find your IP: `ifconfig | grep "inet " | grep -v 127.0.0.1`

### 5. Start the server

```bash
cd veda_server
dart pub get
dart bin/main.dart --apply-migrations
```

The server runs on:
- `8080` — API server
- `8081` — Insights dashboard
- `8082` — Web server

`--apply-migrations` creates the database tables and pgvector indexes on first run.

### 6. Configure Flutter client

Edit `veda_flutter/assets/config.json` to point to your server:

```json
{
    "apiUrl": "http://YOUR_LOCAL_IP:8080"
}
```

### 7. Run the Flutter app

```bash
cd veda_flutter
flutter pub get
flutter run
```

**Platform-specific:**

```bash
# iOS
flutter run -d ios

# Android
flutter run -d android

# macOS
flutter run -d macos

# Web (connects to server at config.json URL)
flutter run -d chrome

# Or build web and serve from Serverpod:
cd veda_flutter
flutter build web --base-href /app/ --wasm --output ../veda_server/web/app
# Then access at http://YOUR_LOCAL_IP:8082/app/
```

---

## Generate Client SDK

After modifying server endpoints or models, regenerate the client SDK:

```bash
cd veda_server
serverpod generate
```

This updates `veda_client/` with new protocol types and endpoint stubs.

---

## Run Tests

```bash
# Start test database services
cd veda_server
docker compose up -d postgres_test redis_test

# Run server tests
dart test
```

---

## Key Commands Reference

| Command | Location | Purpose |
|---------|----------|---------|
| `docker compose up -d` | `veda_server/` | Start PostgreSQL + Redis |
| `dart bin/main.dart --apply-migrations` | `veda_server/` | Start server + apply DB migrations |
| `serverpod generate` | `veda_server/` | Regenerate client SDK after model/endpoint changes |
| `flutter run` | `veda_flutter/` | Run Flutter app on connected device |
| `dart analyze` | any package | Check for compile errors |
| `dart format .` | any package | Format code |

---

## Architecture at a Glance

**Creator flow (Web):** Upload files → files embedded as 3072-dim vectors in pgvector → chat with Gemini (9 tool-calling functions) to build course structure → AI generates TOC from knowledge base → preview with TTS lectures

**Learner flow (Mobile):** Browse/search courses → enroll → select module & teaching mode → server retrieves top-5 relevant knowledge chunks via cosine similarity → Gemini generates lecture → ElevenLabs converts to speech → word-by-word highlighted playback → ask follow-up questions via STT

See [TECHNICAL_DOCS.md](TECHNICAL_DOCS.md) for the full architecture deep-dive.

---

## License

Private repository. All rights reserved.


## Detected evidence (automated analysis)

Indexed codebase: 239 recognized source files, 2153 KB.
- C (language) — detected in the code
- C++ (language) — detected in the code
- CSS (language) — detected in the code
- Dart (language) — detected in the code
- HTML (language) — detected in the code
- Kotlin (language) — detected in the code
- SQL (language) — detected in the code
- Swift (language) — detected in the code
- AWS (technology) — claimed on Devpost, not found in the code
- AI coding agent: Claude Code — evidence: config files committed to the repository

## Codebase structure (from repository index)

### Files (120 of 325)

```
.DS_Store
.gitignore
.vscode/launch.json
CLAUDE.md
PROJECT_STORY.md
PROPOSAL.md
README.md
TECHNICAL_DOCS.md
veda_client/.gitignore
veda_client/analysis_options.yaml
veda_client/CHANGELOG.md
veda_client/dartdoc_options.yaml
veda_client/doc/endpoint.md
veda_client/lib/src/protocol/client.dart
veda_client/lib/src/protocol/gemini/chat_message.dart
veda_client/lib/src/protocol/gemini/chat_request.dart
veda_client/lib/src/protocol/gemini/chat_response.dart
veda_client/lib/src/protocol/gemini/course_chat_request.dart
veda_client/lib/src/protocol/gemini/course_chat_response.dart
veda_client/lib/src/protocol/greetings/greeting.dart
veda_client/lib/src/protocol/lms/course_index.dart
veda_client/lib/src/protocol/lms/course_visibility.dart
veda_client/lib/src/protocol/lms/course.dart
veda_client/lib/src/protocol/lms/enrollment.dart
veda_client/lib/src/protocol/lms/file_creation_draft.dart
veda_client/lib/src/protocol/lms/knowledge_file.dart
veda_client/lib/src/protocol/lms/module_item.dart
veda_client/lib/src/protocol/lms/module_progress.dart
veda_client/lib/src/protocol/lms/module.dart
veda_client/lib/src/protocol/lms/topic.dart
veda_client/lib/src/protocol/profiles/subscription_status.dart
veda_client/lib/src/protocol/profiles/user_profile_with_email.dart
veda_client/lib/src/protocol/profiles/user_profile.dart
veda_client/lib/src/protocol/profiles/user_type.dart
veda_client/lib/src/protocol/protocol.dart
veda_client/lib/veda_client.dart
veda_client/pubspec.yaml
veda_client/README.md
veda_desgin/.DS_Store
veda_desgin/active course/code.html
veda_desgin/code.html
veda_desgin/course_listeningState/code.html
veda_desgin/couse_teachingState/code.html
veda_desgin/dashboard/code.html
veda_desgin/desgin guidlines.md
veda_desgin/index_extracted/code.html
veda_desgin/learn/code.html
veda_desgin/listening_state/code.html
veda_desgin/login/code.html
veda_desgin/otp/code.html
veda_desgin/profile/code.html
veda_desgin/profileEdit_extracted/code.html
veda_desgin/search_coach_temp/code.html
veda_desgin/search_course_temp/code.html
veda_desgin/search/code.html
veda_desgin/signup:onboarding/code.html
veda_desgin/teaching_state/code.html
veda_flutter/.gitignore
veda_flutter/.metadata
veda_flutter/analysis_options.yaml
veda_flutter/android/.gitignore
veda_flutter/android/app/build.gradle.kts
veda_flutter/android/app/google-services.json
veda_flutter/android/app/src/debug/AndroidManifest.xml
veda_flutter/android/app/src/main/AndroidManifest.xml
veda_flutter/android/app/src/main/kotlin/com/garuna/veda_flutter/MainActivity.kt
veda_flutter/android/app/src/main/res/drawable-v21/launch_background.xml
veda_flutter/android/app/src/main/res/drawable/launch_background.xml
veda_flutter/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
veda_flutter/android/app/src/main/res/values-night/styles.xml
veda_flutter/android/app/src/main/res/values/colors.xml
veda_flutter/android/app/src/main/res/values/styles.xml
veda_flutter/android/app/src/profile/AndroidManifest.xml
veda_flutter/android/build.gradle.kts
veda_flutter/android/gradle.properties
veda_flutter/android/gradle/wrapper/gradle-wrapper.properties
veda_flutter/android/settings.gradle.kts
veda_flutter/assets/config.json
veda_flutter/devtools_options.yaml
veda_flutter/firebase.json
veda_flutter/ios/.gitignore
veda_flutter/ios/Flutter/AppFrameworkInfo.plist
veda_flutter/ios/Flutter/Debug.xcconfig
veda_flutter/ios/Flutter/Release.xcconfig
veda_flutter/ios/Podfile
veda_flutter/ios/Podfile.lock
veda_flutter/ios/Runner.xcodeproj/project.pbxproj
veda_flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
veda_flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
veda_flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
veda_flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
veda_flutter/ios/Runner.xcworkspace/contents.xcworkspacedata
veda_flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
veda_flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
veda_flutter/ios/Runner/AppDelegate.swift
veda_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
veda_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
veda_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
veda_flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard
veda_flutter/ios/Runner/Base.lproj/Main.storyboard
veda_flutter/ios/Runner/GoogleService-Info.plist
veda_flutter/ios/Runner/Info.plist
veda_flutter/ios/Runner/Runner-Bridging-Header.h
veda_flutter/ios/RunnerTests/RunnerTests.swift
veda_flutter/lib/design_system/design_system_screen.dart
veda_flutter/lib/design_system/veda_colors.dart
veda_flutter/lib/design_system/veda_spacing.dart
veda_flutter/lib/design_system/veda_text_styles.dart
veda_flutter/lib/design_system/widgets/veda_button.dart
veda_flutter/lib/design_system/widgets/veda_card.dart
veda_flutter/lib/design_system/widgets/veda_grid.dart
veda_flutter/lib/design_system/widgets/veda_input.dart
veda_flutter/lib/firebase_options.dart
veda_flutter/lib/main.dart
veda_flutter/lib/screens/auth/auth_flow_screen.dart
veda_flutter/lib/screens/auth/forgot_password_screen.dart
veda_flutter/lib/screens/auth/login_screen.dart
veda_flutter/lib/screens/auth/otp_screen.dart
veda_flutter/lib/screens/auth/register_screen.dart
veda_flutter/lib/screens/auth/reset_password_screen.dart
[205 more files omitted for size]
```

### Dependencies

No dependency index available.

### Recent commits (newest first)

- feat: Update package name and configuration for Android app
- feat: Add video playback functionality with Chewie and Web support
- Add subscription-related fields to veda_user_profile table
- feat: add subscription management screen and RevenueCat service
- Add initial design guidelines for DeskBubby with Neo-Minimalist aesthetic
- Remove large DMG file and add to .gitignore
- chore: remove obsolete GitHub workflow files for analysis, formatting, and testing
- feat: Enhance course creation and onboarding experience
- feat: add topic management and profile image upload functionality
- feat(migrations): add module_progress table with foreign keys and indexes
- feat: add Creator Browser Screen to list creators and display their profiles and courses
- feat: Add file_creation_drafts table and migration files
- Add detailed documentation for server endpoints and methods in CLAUDE.md
- improved
- testv1
- Add migration for new database schema and UUID generation function
- first commit

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

### PROPOSAL.md

```markdown
# VEDA — Written Proposal

---

## The Problem

Online education is broken on both sides.

**Creating a course is unreasonably expensive.** A single hour of polished video content takes 10–40 hours to produce — scripting, recording, editing, designing slides, re-shooting. This locks out the vast majority of domain experts — researchers, engineers, doctors, consultants — who have deep knowledge but neither the time, budget, nor production skills to package it into a traditional course. The result: most human expertise stays trapped in PDFs, papers, and documentation that nobody else can learn from.

**Consuming a course is fundamentally passive.** Learners watch pre-recorded videos, scroll through slides, and hope information sticks. There's no adaptation to their pace, no way to ask clarifying questions in the moment, and no personalized depth control. Completion rates on major platforms hover around 5–15%. The format hasn't meaningfully evolved since the first MOOCs launched over a decade ago.

The core tension is clear: **the people with the most knowledge have the least time to teach, and the people trying to learn have no way to interact with what they're consuming.**

---

## Target Audience

### Primary: Independent Subject-Matter Experts (Creators)

- University professors and researchers sitting on years of published papers and lecture notes
- Corporate trainers and consultants with proprietary methodologies documented internally
- Technical professionals — engineers, data scientists, designers — with deep domain knowledge captured in documentation, wikis, and guides
- Authors and thought leaders who want to extend their written work into interactive learning experiences

**What they share:** deep expertise, existing written material, zero interest in video production, and a desire to monetize or share their knowledge at scale.

### Secondary: Self-Directed Learners (Consumers)

- Working professionals upskilling in adjacent domains (e.g., a developer learning system design, a marketer learning data analytics)
- University students supplementing coursework with deeper, more interactive explanations
- Lifelong learners exploring new subjects who prefer guided, voice-driven instruction over passive video
- Non-native English speakers who benefit from adjustable pacing and AI-narrated clarity over variable-quality instructor audio

**What they share:** a preference for active, personalized learning over one-size-fits-all video lectures, and willingness to pay for quality instruction that adapts to them.

---

## Monetization Strategy

### 1. Freemium Creator Model

| Tier | Price | Includes |
|------|-------|----------|
| **Free** | $0 | 1 course, 5 modules, 3 knowledge file uploads, community-hosted |
| **Pro** | $19/mo | Unlimited courses & modules, 50 file uploads, custom branding, analytics dashboard, priority AI generation |
| **Institution** | $99/mo | Everything in Pro + team collaboration, bulk learner management, SSO, API access, wh
[truncated — 3462 more characters]
```

### PROJECT_STORY.md

```markdown
# VEDA — Project Story

---

## Elevator Pitch

**Veda is an AI-powered learning platform where anyone can create a course just by uploading their documents and chatting with an AI — and anyone can learn from it through interactive, voice-narrated lessons that teach you like a real tutor.** No video production. No slide decks. Just upload your knowledge, and Veda turns it into a structured, voice-driven learning experience. Built as a full-stack Dart monorepo with Serverpod, Flutter, Gemini AI, RAG-powered retrieval, and ElevenLabs text-to-speech.

---

## Inspiration

We noticed a fundamental disconnect in online education. **Creating a course is absurdly hard** — you need to script lectures, record videos, edit slides, structure a syllabus. And on the other side, **consuming courses is passive** — you watch videos, maybe take a quiz, and hope something sticks.

We asked ourselves: what if the barrier to teaching was as low as uploading a PDF? What if learning felt like having a private tutor who speaks to you, explains concepts at your pace, and answers your questions on the spot?

The name **Veda** comes from the Sanskrit word for "knowledge." The oldest organized knowledge systems in human history were oral — a teacher speaking directly to a student. We wanted to bring that back, powered by modern AI.

We were also inspired by the idea that **expertise is trapped** — professors have research papers, engineers have documentation, specialists have manuals. All of that knowledge just sits in files. Veda unlocks it and makes it teachable.

---

## What It Does

Veda is a **two-sided AI learning platform** with distinct creator and learner experiences:

### For Creators (Web)
- **Upload knowledge files** (PDFs, DOCX, TXT) — Veda extracts the text and generates semantic embeddings using Gemini's embedding model for RAG-powered retrieval.
- **Chat with AI to build your course** — In CREATE mode, you have a conversation with Gemini AI that has tool-calling capabilities. The AI can create modules, generate topics, write descriptions, update course metadata, and even generate course images — all through natural conversation.
- **Auto-generate course structure** — Upload your files, and Veda can automatically generate a complete table of contents with modules and topics by analyzing your knowledge base using RAG.
- **Preview your course in TEACH mode** — Switch to teaching mode, select a module, and hear your course delivered as a voice-narrated lecture with real-time word highlighting.

### For Learners (Mobile)
- **Browse and discover** — Search for courses, coaches, and topics. Explore a curated dashboard with enrolled courses, popular coaches, and topic-based discovery.
- **Enroll and learn** — Enroll in public courses, track progress across modules, and pick up where you left off.
- **Interactive teaching sessions** — Each module is delivered as a live AI-generated lecture with text-to-speech narration. The AI retrieves relevant knowledge from the 
[truncated — 8397 more characters]
```

### veda_server/Dockerfile

```
# Build stage
FROM dart:3.8.0 AS build
WORKDIR /app
COPY . .

# Install dependencies and compile the server executable
RUN dart pub get
RUN dart compile exe bin/main.dart -o bin/server

# Final stage
FROM alpine:latest

# Environment variables
ENV runmode=production
ENV serverid=default
ENV logging=normal
ENV role=monolith

# Copy runtime dependencies
COPY --from=build /runtime/ /

# Copy compiled server executable
COPY --from=build /app/bin/server server

# Copy configuration files and resources
COPY --from=build /app/config/ config/
COPY --from=build /app/web/ web/
COPY --from=build /app/migrations/ migrations/

# This file is required to enable the endpoint log filter in Insights.
COPY --from=build /app/lib/src/generated/protocol.yaml lib/src/generated/protocol.yaml

# Expose ports
EXPOSE 8080
EXPOSE 8081
EXPOSE 8082

# Define the entrypoint command
ENTRYPOINT ./server --mode=$runmode --server-id=$serverid --logging=$logging --role=$role

```

### veda_server/docker-compose.yaml

```yaml
services:
  # Development services
  postgres:
    image: pgvector/pgvector:pg16
    ports:
      - "8090:5432"
    environment:
      POSTGRES_USER: postgres
      POSTGRES_DB: veda
      POSTGRES_PASSWORD: "TY2Wo0ttxw7MVXTX0fQqgr9TcW45uWnX"
    volumes:
      - veda_data:/var/lib/postgresql/data

  redis:
    image: redis:6.2.6
    ports:
      - "8091:6379"
    command: redis-server --requirepass "b8LANphVqp0ie7CqIV-jhLVb1f9cUqGA"
    environment:
      - REDIS_REPLICATION_MODE=master

  # Test services
  postgres_test:
    image: pgvector/pgvector:pg16
    ports:
      - "9090:5432"
    environment:
      POSTGRES_USER: postgres
      POSTGRES_DB: veda_test
      POSTGRES_PASSWORD: "hREeoe8ohL63EeOju0qjoOhBoH5TWzWW"
    volumes:
      - veda_test_data:/var/lib/postgresql/data

  redis_test:
    image: redis:6.2.6
    ports:
      - "9091:6379"
    command: redis-server --requirepass "aprJK5sfJqDN4qH6gbU6x0eVBSceCdXv"
    environment:
      - REDIS_REPLICATION_MODE=master

volumes:
  veda_data:
  veda_test_data:

```

### veda_server/dart_test.yaml

```yaml
tags:
  integration: {}

```

### veda_client/dartdoc_options.yaml

```yaml
dartdoc:
  categories: 
    "Endpoint":
      markdown: doc/endpoint.md
      name: Endpoint
```

### veda_client/pubspec.yaml

```yaml
name: veda_client
description: Starting point for a Serverpod client.

environment:
  sdk: '^3.8.0'

dependencies:
  serverpod_auth_idp_client: 3.2.3
  serverpod_client: 3.2.3


```

### veda_flutter/devtools_options.yaml

```yaml
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:

```

### veda_server/devtools_options.yaml

```yaml
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:

```

### veda_client/analysis_options.yaml

```yaml
# Defines a default set of lint rules enforced for
# projects at Google. For details and rationale,
# see https://github.com/dart-lang/pedantic#enabled-lints.

# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
# Uncomment to specify additional rules.
# linter:
#   rules:
#     - camel_case_types

analyzer:
  exclude:
    - lib/src/protocol/**

formatter:
  trailing_commas: preserve

```

[222 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]