Natively Rendered HTML Artifacts

An AI-powered conversational web application grounded in Lenny's Podcast and Newsletter transcripts. Every answer includes inline citations traceable to specific episodes and timestamps.
- 🔍 Grounded RAG: All responses are sourced from transcript evidence with
[Source: Episode @ Timestamp]citations - 🤖 Multi-Model Support: Dynamic switching between local Ollama (llama3.2) and cloud (Claude/GPT-4o)
- 📝 Ship 30 for 30 Skill: Generates ~1,250-word high-impact essays from podcast insights
- 🎨 Artifact Generation: Produces interactive HTML/Markdown components
- 🔒 Sandboxed Viewer: Artifacts render in isolated iframes — XSS-safe
- ⚡ Real-time Streaming: Server-Sent Events for instant token-by-token responses
- 💾 Session Persistence: PostgreSQL-backed conversation history
Frontend (React + TypeScript + Tailwind)
↕ HTTP / SSE
Backend (FastAPI + Python 3.11+)
↕ Async SQLAlchemy
PostgreSQL + pgvector
↕
Ollama (Local LLM) | Anthropic Claude | OpenAI GPT-4o
See docs/architecture.md for full details.
| Requirement | Version | Notes |
|---|---|---|
| Docker + Docker Compose | v2.0+ | Recommended for one-command setup |
| Python | 3.11+ | For local development |
| Node.js | 18+ | For frontend development |
| PostgreSQL | 15+ | With pgvector extension |
| Ollama | Latest | For local LLM (optional if using cloud) |
# 1. Clone and enter the project
cd The-Lenny-Growth-Assistant
# 2. Copy environment template
cp .env.example .env
# 3. Edit .env with your API keys (optional for local-only usage)
# nano .env
# 4. Start everything
docker-compose up --build
# 5. Open in browser
# Frontend: http://localhost:5173
# Backend: http://localhost:8000
# API Docs: http://localhost:8000/docscd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install dependencies
pip install -r requirements.txt
# Copy and configure .env
cp ../.env.example ../.env
# Run database migrations (optional — auto-creates tables on first run)
alembic upgrade head
# Start the backend
uvicorn app.main:app --reload --port 8000cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Open http://localhost:5173# Install Ollama (macOS/Linux)
curl -fsSL https://ollama.ai/install.sh | sh
# Pull required models
ollama pull llama3.2
ollama pull nomic-embed-text
# Verify Ollama is running
curl http://localhost:11434/api/tags| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgresql+asyncpg://lenny:lenny_secret@localhost:5432/lenny_growth |
PostgreSQL connection string |
OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama server URL |
OLLAMA_DEFAULT_MODEL |
llama3.2 |
Default local LLM model |
OLLAMA_EMBEDDING_MODEL |
nomic-embed-text |
Embedding model for RAG |
ANTHROPIC_API_KEY |
(empty) | Anthropic API key for Claude |
ANTHROPIC_MODEL |
claude-3-5-sonnet-20241022 |
Claude model identifier |
OPENAI_API_KEY |
(empty) | OpenAI API key for GPT |
OPENAI_MODEL |
gpt-4o |
GPT model identifier |
DEFAULT_MODEL_PROVIDER |
ollama |
Default LLM provider |
VECTOR_STORE_BACKEND |
pgvector |
Vector store: pgvector or memory |
APP_DEBUG |
false |
Enable debug logging |
cd backend
# Run all tests
pytest
# Run with coverage
pytest --cov=app --cov-report=html
# Run specific test suite
pytest tests/test_api.py -v
pytest tests/test_rag.py -v
pytest tests/test_agent.py -vThe-Lenny-Growth-Assistant/
├── backend/
│ ├── app/
│ │ ├── api/v1/ # REST endpoints
│ │ ├── core/ # Config, logging, security
│ │ ├── db/models/ # SQLAlchemy models
│ │ ├── rag/ # Ingestion, chunking, retrieval
│ │ ├── agent/ # LLM routing, skills
│ │ └── schemas/ # Pydantic validation
│ ├── data/ # Sample transcripts
│ ├── tests/ # Test suites
│ └── main.py # FastAPI entry point
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── services/ # API client + types
│ │ └── styles/ # Tailwind globals
│ └── package.json
├── docs/ # Documentation
├── docker-compose.yml # Full-stack orchestration
├── .env.example # Environment template
└── README.md
# Check if Ollama is running
curl http://localhost:11434/api/tags
# Restart Ollama
ollama serve
# Verify model is pulled
ollama list# Check PostgreSQL is running
docker-compose up postgres
# Test connection
psql postgresql://lenny:lenny_secret@localhost:5432/lenny_growth# Clear and reinstall
cd frontend
rm -rf node_modules
npm install- Check
.envfile has correct keys (no quotes around values) - Verify keys are valid at provider's dashboard
- Ollama requires no API keys for local usage
MIT License — see LICENSE for details.
Built on the insights and frameworks shared by Lenny Rachitsky and his incredible guests on Lenny's Podcast.
