sandbox-notebookllamalm/start.sh
DJP 2292f8a511 Transform NotebookLlaMa to enterprise multi-user NotebookLM clone
Major Changes:
- Implemented notebook-first architecture (multi-document collections)
- Added user authentication and multi-tenancy
- Created comprehensive database schema (7 tables)
- Built complete notebook management system
- Implemented notebook-level chat across multiple documents
- Added podcast generation from notebooks
- Implemented notebook sharing with permissions
- Fixed MCP server crashes by bypassing for document processing
- Added all enterprise features requested

New Features:
- User login/signup with bcrypt password hashing
- Create/edit/delete notebooks
- Upload multiple PDFs to notebooks
- Add documents to existing notebooks
- Chat across all documents in a notebook
- Generate podcasts from entire notebooks
- Share notebooks with other users
- View shared notebooks
- Persistent chat history per notebook
- Document summaries, Q&A, and highlights

Technical Improvements:
- PostgreSQL database with SQLAlchemy ORM
- Connection pooling and proper cleanup
- Bypassed buggy MCP server for document processing
- Direct LlamaCloud API calls for reliability
- Proper CASCADE deletes
- Session management
- Error handling and logging

Documentation:
- ENTERPRISE_SETUP.md - Setup guide
- IMPLEMENTATION_SUMMARY.md - Technical details
- SIMPLIFIED_PLAN.md - Architecture overview
- CURRENT_STATUS.md - Status and known issues
- FINAL_README.md - User guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 17:28:06 -04:00

57 lines
1.6 KiB
Bash
Executable file

#!/bin/bash
# NotebookLlaMa Startup Script
echo "🦙 Starting NotebookLlaMa Enterprise..."
echo ""
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "❌ Docker is not running. Please start Docker and try again."
exit 1
fi
# Start Docker services
echo "📦 Starting Docker services (PostgreSQL, Jaeger, Adminer)..."
docker compose up -d
# Wait for PostgreSQL to be ready
echo "⏳ Waiting for PostgreSQL to be ready..."
sleep 5
# Check if database is initialized
echo "🗄️ Checking database..."
if ! uv run src/notebookllama/init_database.py 2>&1 | grep -q "Database connection successful"; then
echo "⚠️ Database not initialized. Initializing now..."
uv run src/notebookllama/init_database.py
fi
# Stop any local PostgreSQL that might interfere
echo "🛑 Stopping local PostgreSQL if running..."
brew services stop postgresql@14 2>/dev/null || true
killall postgres 2>/dev/null || true
# Check if MCP server is already running
if lsof -Pi :8000 -sTCP:LISTEN -t >/dev/null 2>&1; then
echo "⚠️ MCP server already running on port 8000"
else
echo "🚀 Starting MCP server..."
nohup uv run src/notebookllama/server.py > server.log 2>&1 &
sleep 3
echo "✅ MCP server started (logs: server.log)"
fi
echo ""
echo "✨ All services started!"
echo ""
echo "📊 Access points:"
echo " • Streamlit App: http://localhost:8501"
echo " • Jaeger UI: http://localhost:16686"
echo " • Adminer (DB): http://localhost:8080"
echo " • MCP Server: http://localhost:8000"
echo ""
echo "🚀 Starting Streamlit app..."
echo ""
# Start Streamlit
streamlit run src/notebookllama/App.py