6.3 KiB
6.3 KiB
NotebookLlaMa 🦙 - Enterprise Edition
An enterprise-ready, open-source alternative to NotebookLM with multi-user support, authentication, and document management.
✨ Features
Core Features
- 📄 PDF Processing: Upload PDFs and generate comprehensive summaries, Q&A, and mind maps
- 💬 Document Chat: Have AI-powered conversations with your documents
- 🎙️ Podcast Generation: Create engaging audio conversations from documents
- 📊 Observability: Full tracing with Jaeger and OpenTelemetry
🆕 Enterprise Features
- 🔐 User Authentication: Secure login and registration system
- 👥 Multi-user Support: Complete data isolation per user
- 📚 Document Library: Persistent storage of all processed documents
- 💾 Chat History: Save and resume conversations
- 🤝 Document Sharing: Share documents with other users with granular permissions
- 🔒 Access Control: Role-based permissions (Read/Write/Admin)
- 📊 User Dashboard: Centralized view of all documents and activities
🚀 Quick Start
Prerequisites
- Docker Desktop
- Python 3.13+
uvpackage manager (installation instructions)
Installation
-
Clone the repository
git clone https://github.com/run-llama/notebookllama cd notebookllama -
Install dependencies
uv sync -
Configure environment variables
cp .env.example .env # Edit .env with your API keysRequired API keys:
OPENAI_API_KEY: Get from OpenAIELEVENLABS_API_KEY: Get from ElevenLabsLLAMACLOUD_API_KEY: Get from LlamaCloud
-
Run setup scripts
uv run tools/create_llama_extract_agent.py uv run tools/create_llama_cloud_index.py -
Start the application
./start.shOr manually:
# Terminal 1: Start infrastructure docker compose up -d # Terminal 2: Start MCP server uv run src/notebookllama/server.py # Terminal 3: Start Streamlit app streamlit run src/notebookllama/App.py -
Access the application
- Open http://localhost:8501
- Create an account (Sign Up tab)
- Start processing documents!
📖 Usage
Processing Documents
- Click "Process Document" in the navigation
- Upload a PDF file
- Click "Process Document" button
- Wait 2-3 minutes for processing
- View generated summary, highlights, Q&A, and mind map
Chatting with Documents
- Go to "Document Chat"
- Select a document from the dropdown
- Ask questions about your document
- Previous conversations are automatically saved
Managing Documents
- Go to "My Documents" to see all your processed documents
- Click on a document to view details
- Use the "Share" button to share with other users
- View shared documents in "Shared With Me"
Generating Podcasts
- After processing a document
- Click "Generate In-Depth Conversation"
- Wait for audio generation
- Listen to the AI-generated podcast discussion
🏗️ Architecture
Technology Stack
- Frontend: Streamlit
- Backend: FastMCP, LlamaIndex
- Database: PostgreSQL
- LLM: OpenAI GPT-4
- Parsing: LlamaParse
- Audio: ElevenLabs
- Observability: Jaeger, OpenTelemetry
- Authentication: bcrypt, session-based
Database Schema
users: User accounts and authenticationdocuments: Uploaded PDF documentsnotebooks: Processed summaries and Q&Achat_sessions: Chat conversation sessionschat_messages: Individual messagesdocument_shares: Sharing permissions
🔧 Configuration
Environment Variables
# API Keys
OPENAI_API_KEY="your-openai-key"
LLAMACLOUD_API_KEY="your-llamacloud-key"
ELEVENLABS_API_KEY="your-elevenlabs-key"
# LlamaCloud Configuration
EXTRACT_AGENT_ID="your-agent-id"
LLAMACLOUD_PIPELINE_ID="your-pipeline-id"
# Database Configuration
pgql_db=postgres
pgql_user=postgres
pgql_psw=admin
Docker Services
The application uses Docker Compose for:
- PostgreSQL (port 5432): Database
- Jaeger (port 16686): Distributed tracing UI
- Adminer (port 8080): Database administration
🐛 Troubleshooting
PostgreSQL Connection Issues
If you see "role does not exist" errors:
# Stop local PostgreSQL
brew services stop postgresql@14
killall postgres
# Recreate Docker containers
docker compose down -v
docker compose up -d
# Reinitialize database
uv run src/notebookllama/init_database.py
MCP Server Not Responding
# Check if server is running
lsof -i :8000
# Restart server
killall python
uv run src/notebookllama/server.py
Missing Environment Variables
If services fail to start, ensure all required environment variables are set in .env:
- OPENAI_API_KEY
- LLAMACLOUD_API_KEY
- ELEVENLABS_API_KEY
- EXTRACT_AGENT_ID
- LLAMACLOUD_PIPELINE_ID
📚 Documentation
- Enterprise Setup Guide - Detailed setup and features
- Implementation Summary - Technical details and architecture
- Contributing Guidelines - How to contribute
🔒 Security
- Passwords are hashed using bcrypt
- SQL injection protection via SQLAlchemy ORM
- Session-based authentication
- Per-user data isolation
- Document access controls
🚀 Deployment
For production deployment, consider:
- Using managed PostgreSQL (AWS RDS, Google Cloud SQL)
- Setting up HTTPS/TLS
- Implementing rate limiting
- Adding Redis for caching
- Using a reverse proxy (nginx)
- Setting up monitoring and alerting
- Regular backups
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
📝 License
This project is licensed under the MIT License - see LICENSE for details.
🙏 Acknowledgments
- Built with LlamaIndex
- Powered by LlamaCloud
- UI with Streamlit
- Observability by Jaeger
📞 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ by the LlamaIndex team and contributors