No description
Find a file
2025-10-20 06:59:32 -05:00
backend suppress websocket httpx error 2025-10-17 18:40:16 -05:00
frontend added prose styles for response formatting 2025-10-20 06:59:32 -05:00
Old Readmes Fix critical bugs and improve features 2025-10-03 15:27:32 -04:00
.DS_Store Fix critical bugs and improve features 2025-10-03 15:27:32 -04:00
.gitignore added .gitignore to project root 2025-10-16 17:24:39 -05:00
docker-compose.yml changed redis port and added .service file 2025-10-16 15:52:42 -05:00
README.md adjusted polling logs and another video processing fix 2025-10-17 16:46:12 -05:00

🦙 Sandbox-NotebookLM - Next.js Edition

Enterprise-ready alternative to Google NotebookLM with multi-user support, powered by LlamaIndex and multiple AI models.

Live Demo: http://localhost:4000 (after installation) Repository: https://bitbucket.org/zlalani/sandbox-notebookllamalm-nextjs


🚀 Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Python 3.10+
  • Docker and Docker Compose
  • Git

Installation

1. Clone the repository:

git clone git@bitbucket.org:zlalani/sandbox-notebookllamalm-nextjs.git
cd sandbox-notebookllamalm-nextjs

2. Start Docker services:

docker-compose up -d

This starts:

  • PostgreSQL on port 5433
  • Redis on port 6380
  • Jaeger on port 17000
  • Adminer on port 9001

3. Set up Backend:

cd backend

# Install uv package manager
pip install uv

# Sync dependencies
uv sync

# Create .env file with your API keys
cat > .env << 'EOF'
# Required for core functionality
OPENAI_API_KEY=sk-...
LLAMACLOUD_API_KEY=llx-...

# Required for specific models
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=AI...
GROQ_API_KEY=gsk_...
DEEPSEEK_API_KEY=sk-...

# Required for podcast generation
ELEVENLABS_API_KEY=...

# Database (pre-configured)
pgql_user=postgres
pgql_psw=admin
pgql_db=postgres_nextjs
EOF

# Initialize database (optional - Docker auto-creates it via POSTGRES_DB env var)
# This command ensures the database exists if you need to recreate it
createdb -h localhost -p 5433 -U postgres postgres_nextjs 2>/dev/null || echo "Database already exists, continuing..."

uv run python -c "
import sys
sys.path.insert(0, 'src/notebookllama')
from database import Base, engine
from background_tasks import BackgroundTask
Base.metadata.create_all(bind=engine)
print('✓ Database initialized with all tables')
"

# Add synthesis column and SSO support (if not exists)
PGPASSWORD=admin psql -h localhost -p 5433 -U postgres -d postgres_nextjs -c "
ALTER TABLE notebooks ADD COLUMN IF NOT EXISTS synthesis_data TEXT;
ALTER TABLE users ADD COLUMN IF NOT EXISTS is_admin BOOLEAN DEFAULT false;
ALTER TABLE users ADD COLUMN IF NOT EXISTS auth_provider VARCHAR(20) DEFAULT 'local';
ALTER TABLE users ALTER COLUMN password_hash DROP NOT NULL;
"

# Start backend (polling endpoint logs filtered in main.py)
uv run uvicorn src.api.main:app --host 0.0.0.0 --port 9000 --reload

4. Set up Frontend (open new terminal in project root):

cd frontend

# Create .env.local with configuration
cat > .env.local << 'EOF'
# Backend URLs (for local dev, these default to localhost:9000)
NEXT_PUBLIC_API_URL=http://localhost:9000
NEXT_PUBLIC_WS_URL=ws://localhost:9000

# Microsoft SSO Authentication (optional)
NEXT_PUBLIC_AZURE_CLIENT_ID=your-client-id
NEXT_PUBLIC_AZURE_AUTHORITY=https://login.microsoftonline.com/your-tenant-id
NEXT_PUBLIC_AZURE_REDIRECT_URI=https://your-domain.com/notebookllama/
EOF

# Install dependencies
npm install

# Start frontend
npm run dev

Note: For production deployment, update NEXT_PUBLIC_API_URL and NEXT_PUBLIC_WS_URL to point to your production backend URL.


🌐 Access Points

Service URL Credentials
Frontend http://localhost:4000 Use Microsoft SSO or local login
Backend API http://localhost:9000 -
API Documentation http://localhost:9000/docs -
Database UI (Adminer) http://localhost:9001 System: PostgreSQL
Server: postgres
Username: postgres
Password: admin
Database: postgres_nextjs
Jaeger Tracing http://localhost:17000 -

📚 Features

Core Features

  • User Authentication - Secure login with role-based access + Microsoft SSO
  • Admin System - Admin users can manage platform
  • Multi-Notebook Management - Organize documents into collections
  • 6 AI Models - GPT-5, Claude 4.5, Gemini 2.5 Pro, GPT-4o, Gemini Flash, GPT-4
  • Pricing Display - See costs for each model
  • Multi-Document Upload - Upload 1-20 files per notebook (40+ formats)
    • Documents: PDF, Word, PowerPoint, RTF, EPUB, Pages, Keynote, TXT, MD
    • Spreadsheets: Excel, CSV, TSV, Numbers
    • Images: JPG, PNG, GIF, BMP, TIFF, SVG (with OCR)
    • Audio: MP3, WAV, M4A (transcription, 20MB limit)
    • Videos: MP4, MOV, AVI, WebM, WMV (multimodal analysis, 55min/2GB limits)
    • Web: HTML
  • Intelligent Processing - Automatic format detection
    • PDF/DOCX/PPTX: LlamaExtract for structured extraction
    • Videos: Gemini 2.5 Pro multimodal analysis (visual + audio + transcript)
    • Other formats: Direct LLM analysis (Excel, CSV, images, audio, etc.)
  • Background Processing - Non-blocking document analysis
  • Real-time Status - Watch processing progress

AI Analysis Features

  • Document Summaries - AI-generated summaries (markdown rendered)
  • Highlights Extraction - Key points from each document
  • Q&A Generation - Auto-generated question-answer pairs
  • Cross-Document Synthesis - Analyze all documents together
    • Overall summary
    • Common themes
    • Key insights
    • Comparative findings
    • Shows which documents were analyzed
    • Persists across sessions

Podcast Generation

  • Audio Discussions - AI-generated podcast from your documents
  • Customizable Length - 5-30 minutes
  • Voice Selection - Choose from 8 professional voices (2 speakers)
  • Custom Theme - Guide the conversation focus
  • Custom Instructions - Detailed prompts for style
  • Background Generation - Process while you work
  • Audio Player - Play directly in browser
  • Download/Delete - Manage podcast files

Collaboration

  • Notebook Sharing - Share with team members by email
  • Permission Levels
    • Read: View only
    • Write: View + add documents
    • Share: Write + share with others
  • Shared Notebooks Page - See what's shared with you
  • Access Management - Add/remove collaborators

Chat Features

  • Real-time WebSocket Chat - Instant AI responses
  • Multi-Document Querying - Ask across all documents
  • Multiple Chat Sessions - Organize conversations
  • Private & Shared Chats - Control visibility
  • Rename/Delete Sessions - Manage your chats
  • Source Citations - See which documents were used (collapsible dropdown)
  • Markdown Rendering - Formatted AI responses
  • Chat History - Messages persist

Admin Dashboard

  • System Statistics - Users, notebooks, documents, chat counts
  • Cost Estimation - Track API usage costs
  • Recent Activity - View users, notebooks, documents (tabbed)
  • Background Tasks - Monitor processing queue
  • User Management - Promote/demote admins
  • Health Monitoring - System status checks
  • Access Control - Admin-only page

🎯 AI Models & Pricing

Model Provider Speed Input Output Best For
GPT-5 OpenAI Fast $1.25/1M $10/1M Latest, balanced
Claude 4.5 Anthropic Fast $3/1M $15/1M Complex reasoning
Gemini 2.5 Pro Google Medium $1.25/1M $5/1M Cost-effective
GPT-4o OpenAI Very Fast $5/1M $15/1M Speed + quality
Gemini Flash Google Ultra Fast $0.075/1M $0.30/1M Budget
GPT-4 OpenAI Medium $30/1M $60/1M Legacy

🔑 API Keys Setup

Required Keys

Create a .env file in the backend/ directory:

# Core (Required for basic features)
OPENAI_API_KEY=sk-...              # Get from https://platform.openai.com/api-keys
LLAMACLOUD_API_KEY=llx-...         # Get from https://cloud.llamaindex.ai/

# Model-specific (Optional - only if using that model)
ANTHROPIC_API_KEY=sk-ant-...       # https://console.anthropic.com/
GOOGLE_API_KEY=AI...               # https://makersuite.google.com/app/apikey
GROQ_API_KEY=gsk_...               # https://console.groq.com/
DEEPSEEK_API_KEY=sk-...            # https://platform.deepseek.com/

# Podcast generation (Optional)
ELEVENLABS_API_KEY=...             # https://elevenlabs.io/

# Database (Pre-configured)
pgql_user=postgres
pgql_psw=admin
pgql_db=postgres_nextjs

🔐 Microsoft SSO Setup (Optional)

To enable Microsoft SSO authentication:

1. Configure Azure AD App Registration:

  • Ensure your Azure AD app has the redirect URI configured
  • Required API permissions: User.Read
  • Authentication type: Single Page Application (SPA) with PKCE

2. Add environment variables:

Backend (backend/.env):

AZURE_CLIENT_ID=9079054c-9620-4757-a256-23413042f1ef
AZURE_AUTHORITY=https://login.microsoftonline.com/e519c2e6-bc6d-4fdf-8d9c-923c2f002385
AZURE_REDIRECT_URI=https://ai-sandbox.oliver.solutions/notebookllama/

Frontend (frontend/.env.local):

NEXT_PUBLIC_AZURE_CLIENT_ID=9079054c-9620-4757-a256-23413042f1ef
NEXT_PUBLIC_AZURE_AUTHORITY=https://login.microsoftonline.com/e519c2e6-bc6d-4fdf-8d9c-923c2f002385
NEXT_PUBLIC_AZURE_REDIRECT_URI=https://ai-sandbox.oliver.solutions/notebookllama/

3. How it works:

  • Users can click "Log In with Microsoft" on the login page
  • First-time SSO users are automatically created in the database
  • Local users who login via SSO have their accounts merged (password cleared, auth_provider updated)
  • SSO users cannot use the local email/password login
  • Logout only clears local session (doesn't sign out of Microsoft globally)

📖 Usage Guide

First Time Setup

1. Create Admin Account (via API or database):

Option A - Via curl:

curl -X POST "http://localhost:9000/api/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{"email":"your@email.com","username":"yourusername","password":"yourpassword"}'

Option B - Via database:

cd backend
uv run python -c "
import sys
sys.path.insert(0, 'src/notebookllama')
from auth import create_user
user = create_user('your@email.com', 'yourusername', 'yourpassword')
print(f'Created user: {user.email}' if user else 'Failed to create user')
"

2. Set as Admin (via database):

PGPASSWORD=admin psql -h localhost -p 5433 -U postgres -d postgres_nextjs -c "
UPDATE users SET is_admin = true WHERE email = 'your@email.com';
"

Using the Application

Create Notebook:

  1. Click "View Notebooks"
  2. Click "New Notebook"
  3. Enter name and description
  4. Select AI model (see pricing)
  5. Click "Create Notebook"

Upload Documents:

  1. Open your notebook
  2. Click "Select Files"
  3. Choose 1-20 files (supports 40+ formats):
    • Documents: PDF, DOCX, PPTX, RTF, EPUB, TXT, MD, and more
    • Spreadsheets: XLSX, CSV, TSV
    • Images: JPG, PNG (with OCR)
    • Audio: MP3, WAV (with transcription, 20MB limit)
    • Videos: MP4, MOV, AVI, WebM, WMV (55min max, 2GB max)
    • Web: HTML
  4. Click "Upload X File(s)"
  5. Wait for processing (time varies by file type):
    • Documents/Images: ~1 minute
    • Videos: ~1 minute per 10 minutes of video (50min video = ~5min processing)
    • Audio: ~30 seconds
  6. Processing methods:
    • PDF/DOCX/PPTX → LlamaExtract
    • Videos → Gemini 2.5 Pro (full transcript + visual/audio analysis)
    • Other formats → Direct LLM analysis
  7. Expand files to see summaries, highlights, Q&A

Generate Cross-Document Analysis:

  1. Click "Cross-Doc Analysis" button
  2. Wait for AI to analyze (30-60 seconds)
  3. View themes, insights, findings
  4. Results persist - will show on next visit

Generate Podcast:

  1. Click "Podcast" button
  2. Select length (5-30 minutes)
  3. Choose voices for Speaker 1 and 2
  4. Add theme (optional)
  5. Add custom instructions (optional)
  6. Click "Generate"
  7. Wait 3-5 minutes
  8. Listen to audio discussion

Chat with Documents:

  1. Click "Chat" button
  2. Create new chat session or select existing
  3. Ask questions about your documents
  4. Get AI responses with source citations
  5. Rename, share, or delete sessions as needed

Share Notebook:

  1. Click "Share" button
  2. Enter collaborator's email
  3. Select permission level
  4. Click "Share"
  5. They'll see it in "Shared" page

🏗️ Architecture

Tech Stack

Frontend:

  • Next.js 15 (App Router)
  • React 19
  • TypeScript
  • Tailwind CSS 4 (#FFC407 color scheme)
  • Montserrat font
  • React Query (data fetching)
  • Zustand (auth state)
  • MSAL (Microsoft SSO authentication)
  • ReactMarkdown (formatted responses)
  • WebSocket (real-time chat)

Backend:

  • FastAPI (Python)
  • SQLAlchemy ORM
  • PostgreSQL (postgres_nextjs database)
  • LlamaCloud/LlamaIndex (document indexing)
  • WebSockets (chat)
  • Background task queue (threading)

AI/ML:

  • LlamaCloud (document indexing)
  • LlamaIndex (RAG)
  • LlamaParse (document parsing - supports 30+ formats)
  • LlamaExtract (structured extraction for PDF/DOCX/PPTX)
  • Gemini 2.5 Pro (multimodal video analysis - transcript + visual + audio)
  • Direct LLM extraction (fallback for Excel, CSV, images, audio, etc.)
  • OpenAI (GPT-4, GPT-5)
  • Anthropic (Claude 3.5, 4.5)
  • Google (Gemini 2.0, 2.5 Pro)
  • Groq, DeepSeek
  • ElevenLabs (voice synthesis for podcasts)

Database Schema (9 Tables)

  1. users - User accounts (with is_admin, auth_provider columns)
  2. notebooks - Document collections (with synthesis_data, podcast_path)
  3. documents - Uploaded files
  4. notebook_documents - Many-to-many links
  5. document_summaries - AI analysis results
  6. chat_sessions - Chat conversations
  7. chat_messages - Individual messages (role, content, sources)
  8. document_shares - Sharing permissions
  9. background_tasks - Async job queue

🔌 API Endpoints

Full API documentation: http://localhost:9000/docs

Key Endpoints

Authentication:

  • POST /api/auth/signup - Create local account
  • POST /api/auth/login - Local login (returns user with is_admin)
  • POST /api/auth/microsoft - Microsoft SSO login (validates token, creates/merges user)

Notebooks:

  • GET /api/notebooks/ - List user's notebooks
  • POST /api/notebooks/ - Create notebook (async pipeline creation)
  • GET /api/notebooks/{id} - Get notebook with documents
  • PUT /api/notebooks/{id} - Update name/description
  • DELETE /api/notebooks/{id} - Delete (checks for shares, cleans up LlamaCloud)
  • POST /api/notebooks/{id}/synthesis - Generate cross-doc analysis (saves to DB)
  • GET /api/notebooks/{id}/synthesis - Get saved synthesis
  • POST /api/notebooks/{id}/podcast - Start podcast generation
  • GET /api/notebooks/{id}/podcast/status - Check podcast progress
  • DELETE /api/notebooks/{id}/podcast - Delete podcast
  • POST /api/notebooks/{id}/share - Share with user
  • GET /api/notebooks/{id}/shares - List shares
  • DELETE /api/notebooks/{id}/shares/{shareId} - Remove access
  • DELETE /api/notebooks/{id}/documents/{docId} - Remove document
  • GET /api/notebooks/shared - Get shared notebooks

Documents:

  • POST /api/documents/upload/{notebookId} - Upload PDFs
  • GET /api/documents/task/{taskId} - Task status
  • GET /api/documents/notebook/{notebookId}/tasks - All tasks
  • GET /api/documents/{documentId}/summary - Get analysis (summaries, highlights, Q&A)

Chat:

  • WebSocket /api/chat/ws/{notebookId} - Real-time chat (sources separated)
  • GET /api/chat/{notebookId}/history - Chat history
  • GET /api/chat/{notebookId}/sessions - List sessions (private + shared)
  • POST /api/chat/{notebookId}/sessions - Create session
  • POST /api/chat/sessions/{sessionId}/toggle-share - Share/unshare
  • PUT /api/chat/sessions/{sessionId}/title - Rename
  • DELETE /api/chat/sessions/{sessionId} - Delete

Admin:

  • GET /api/admin/stats - System statistics
  • GET /api/admin/health - Health check
  • GET /api/admin/users - Recent users
  • GET /api/admin/notebooks - Recent notebooks
  • GET /api/admin/documents - Recent documents
  • GET /api/admin/tasks - Background tasks
  • GET /api/admin/costs - Cost estimation
  • PUT /api/admin/users/{userId}/role - Update user role

🎨 Styling

  • Font: Montserrat (Google Font)
  • Primary Color: #FFC407 (Golden Yellow)
  • Design: Modern, clean, responsive
  • Markdown: Proper rendering in chat and summaries

🐛 Troubleshooting

Backend won't start

# Check port 9000
lsof -i :9000
pkill -f "uvicorn.*9000"

# Restart
cd backend
uv run uvicorn src.api.main:app --host 0.0.0.0 --port 9000 --reload

Database errors

# Check PostgreSQL
docker ps | grep postgres

# Restart services
docker-compose restart

# Reinitialize database
cd backend
uv run python -c "
import sys
sys.path.insert(0, 'src/notebookllama')
from database import Base, engine
from background_tasks import BackgroundTask
Base.metadata.create_all(bind=engine)
"

# Add columns if missing
PGPASSWORD=admin psql -h localhost -p 5433 -U postgres -d postgres_nextjs -c "
ALTER TABLE notebooks ADD COLUMN IF NOT EXISTS synthesis_data TEXT;
ALTER TABLE users ADD COLUMN IF NOT EXISTS is_admin BOOLEAN DEFAULT false;
"

Frontend won't build

cd frontend
rm -rf .next node_modules package-lock.json
npm install
npm run dev

Documents not processing

  • Verify LlamaCloud API key is valid
  • Check background tasks in admin dashboard
  • Look at backend logs for errors
  • Normal processing: ~1 minute per document

Podcast generation slow/stuck

  • Normal time: 3-5 minutes
  • Complex documents: Can take 10-15 minutes
  • If stuck >30 minutes, stop task:
PGPASSWORD=admin psql -h localhost -p 5433 -U postgres -d postgres_nextjs -c "
UPDATE background_tasks
SET status = 'FAILED', error_message = 'Timeout', completed_at = NOW()
WHERE task_type = 'podcast_generation' AND status = 'IN_PROGRESS';
"

Synthesis not persisting

  • Check database has synthesis_data column
  • Restart backend after adding column
  • Check browser console for errors
  • Verify GET /api/notebooks/{id}/synthesis returns data

👥 User Management

Create Admin User

# Via database
PGPASSWORD=admin psql -h localhost -p 5433 -U postgres -d postgres_nextjs -c "
UPDATE users SET is_admin = true WHERE email = 'user@example.com';
"

# Via API (if you're already admin)
curl -X PUT "http://localhost:9000/api/admin/users/USER_ID/role?is_admin=true&requester_id=YOUR_ID"

Admin Features

  • Access admin dashboard
  • View all users, notebooks, documents
  • Monitor background tasks
  • See cost estimates
  • Manage user roles

🔒 Security

  • Password Hashing: bcrypt for local users
  • Microsoft SSO: MSAL with PKCE flow, token validation via Microsoft Graph API
  • Account Merging: Local accounts automatically upgraded to SSO on first Microsoft login
  • Protected Routes: Authentication required for all pages except /login
  • Role-Based Access: Admin-only pages
  • CORS: Configured for localhost:4000
  • SQL Injection Protection: SQLAlchemy ORM
  • File Validation: 30+ file types supported (documents, spreadsheets, images, audio, web)
  • Permission System: Granular notebook sharing

📊 Performance

  • Database Connection Pooling: 10 connections, 20 max overflow
  • React Query Caching: 30-second stale time, refetch on mount
  • Background Processing: Non-blocking uploads and processing
  • WebSocket: Real-time chat updates
  • Static File Serving: Direct podcast streaming

🚢 Production Deployment

Build for Production

Frontend:

cd frontend
npm run build
npm start  # Runs on port 4000

Backend:

cd backend
uv run uvicorn src.api.main:app --host 0.0.0.0 --port 9000 --workers 4

Environment Variables for Production

Backend (.env):

  • Update database credentials if needed
  • Add Azure SSO credentials
  • Configure all API keys

Frontend (.env.local):

# Point to your production backend
NEXT_PUBLIC_API_URL=https://ai-sandbox.oliver.solutions/notebookllama-back
NEXT_PUBLIC_WS_URL=wss://ai-sandbox.oliver.solutions/notebookllama-back

# Azure SSO (use production redirect URI)
NEXT_PUBLIC_AZURE_CLIENT_ID=9079054c-9620-4757-a256-23413042f1ef
NEXT_PUBLIC_AZURE_AUTHORITY=https://login.microsoftonline.com/e519c2e6-bc6d-4fdf-8d9c-923c2f002385
NEXT_PUBLIC_AZURE_REDIRECT_URI=https://ai-sandbox.oliver.solutions/notebookllama/

Other considerations:

  • Update database URL to production PostgreSQL
  • Add production frontend URL to CORS origins in backend
  • Enable HTTPS
  • Configure systemd service for backend auto-start

📁 Project Structure

sandbox-notebookllamalm-nextjs/
├── backend/
│   ├── src/
│   │   ├── api/
│   │   │   ├── main.py              # FastAPI app with static files
│   │   │   └── routes/              # API endpoints
│   │   │       ├── auth.py          # Authentication (is_admin flag)
│   │   │       ├── notebooks.py     # CRUD + synthesis + podcast + sharing
│   │   │       ├── documents.py     # Upload + summaries
│   │   │       ├── chat.py          # WebSocket + history
│   │   │       ├── chat_sessions.py # Session management
│   │   │       └── admin.py         # Admin endpoints + user management
│   │   └── notebookllama/           # Business logic
│   │       ├── database.py          # Models (with synthesis_data, is_admin)
│   │       ├── notebook_manager.py  # Notebook ops (delete with LlamaCloud cleanup)
│   │       ├── document_manager.py
│   │       ├── pipeline_manager.py
│   │       ├── background_tasks.py
│   │       ├── notebook_synthesis.py
│   │       └── audio.py
│   ├── .env                         # API keys
│   └── *.mp3                        # Generated podcasts
├── frontend/
│   ├── src/
│   │   ├── app/
│   │   │   ├── layout.tsx           # Montserrat font, ProtectedRoute
│   │   │   ├── page.tsx             # Home (requires auth)
│   │   │   ├── login/
│   │   │   ├── signup/
│   │   │   ├── notebooks/
│   │   │   │   ├── page.tsx         # List + create
│   │   │   │   └── [id]/
│   │   │   │       ├── page.tsx     # Detail (edit, share, analyze, podcast)
│   │   │   │       └── chat/
│   │   │   │           └── page.tsx # Chat with sessions sidebar
│   │   │   ├── shared/              # Shared notebooks
│   │   │   └── admin/               # Admin dashboard (tabs, costs, tasks)
│   │   ├── components/
│   │   │   ├── Navigation.tsx       # Header with user info
│   │   │   └── ProtectedRoute.tsx   # Auth guard
│   │   ├── lib/
│   │   │   ├── api.ts               # API client (50+ methods)
│   │   │   └── queryClient.ts       # React Query config
│   │   ├── store/
│   │   │   └── authStore.ts         # Zustand auth (persisted)
│   │   ├── types/
│   │   │   └── index.ts             # TypeScript interfaces
│   │   └── app/globals.css          # Markdown styles, #FFC407 theme
│   └── package.json
├── docker-compose.yml
└── README.md

🧪 Testing

Create Test User

curl -X POST "http://localhost:9000/api/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{"email":"test@test.com","username":"testuser","password":"test1234"}'

Test Notebook Creation

curl -X POST "http://localhost:9000/api/notebooks/?user_id=1" \
  -H "Content-Type: application/json" \
  -d '{"name":"Test Notebook","model_type":"gpt5-exp"}'

📝 Known Issues

Podcast Generation

  • Can timeout on very complex documents (30+ minutes)
  • Normal time: 3-5 minutes
  • Workaround: Stop stuck tasks via SQL (see Troubleshooting)

Background Workers

  • Run in threads spawned by FastAPI
  • Process one task at a time for podcasts
  • Multiple document processing tasks run concurrently

🤝 Contributing

  1. Fork repository on Bitbucket
  2. Create feature branch
  3. Make changes
  4. Test thoroughly
  5. Push to Bitbucket
  6. Create pull request

📞 Support


🎓 Credits

Built by migrating the original Streamlit NotebookLlama app to:

  • Modern Next.js frontend
  • FastAPI backend
  • Enterprise features
  • Multi-user support
  • Advanced collaboration tools

Based on: https://github.com/run-llama/notebookllama


📄 License

Open source - see LICENSE file


Version: 2.0.0 Last Updated: October 2025 Status: Production Ready Feature Parity: 100% with Streamlit app

Built with ❤️ and AI