Sign inSign up

niranjan024/lenny-growth-assistant

By niranjan024

•Updated 6 days ago

An AI-powered knowledge and writing assistant grounded in Lenny's Podcast transcripts.

Image
2

38

niranjan024/lenny-growth-assistant repository overview

⁠Lenny Growth Assistant

⁠An AI-powered knowledge and writing assistant grounded in Lenny's Podcast transcripts

Lenny Growth Assistant is a containerized AI application designed to help users explore business, product management, startups, and growth insights from Lenny's Podcast transcripts. It combines retrieval-augmented generation (RAG), persistent conversations, configurable language models, and asynchronous essay generation in one application.

The project is designed around a modular architecture, with separate Docker images for the frontend, backend API, background writing worker, and agent service.


⁠Architecture

                       User
                         |
                         v
                React Web Frontend
                         |
                         v
                   FastAPI Backend
                         |
             +-----------+-----------+
             |           |           |
             v           v           v
        PostgreSQL     Redis      Pi Agent
        + pgvector    Queue       Service
             |           |
             v           v
       Transcript     Writing Worker
       Retrieval      Essay Generation

Core components

  • Frontend: React and TypeScript, served using Nginx.
  • Backend API: FastAPI application for chat, session management, retrieval, settings, and writing workflows.
  • Database: PostgreSQL with pgvector for persistent data and vector similarity search.
  • Queue and cache: Redis for background job coordination.
  • Writing worker: Processes asynchronous essay-generation jobs.
  • Pi agent service: Separate agent service integrated with the backend.

⁠Docker Hub Images

All four application images are published under the niranjan024 Docker Hub namespace.

ComponentRepositoryVersion
Backend APIlenny-growth-api⁠v1.0.0
Frontendlenny-growth-frontend⁠v1.0.0
Writing Workerlenny-growth-worker⁠v1.0.0
Pi Agentlenny-growth-agent⁠v1.0.0
⁠Pull the images
docker pull niranjan024/lenny-growth-api:v1.0.0
docker pull niranjan024/lenny-growth-frontend:v1.0.0
docker pull niranjan024/lenny-growth-worker:v1.0.0
docker pull niranjan024/lenny-growth-agent:v1.0.0

The application also depends on PostgreSQL with pgvector and Redis, which are configured separately in Docker Compose.

⁠Key Capabilities

⁠1. Transcript-Grounded AI Assistance
  • Query business and product insights from podcast transcripts.
  • Retrieve relevant transcript passages to support generated answers.
  • Provide source references to help users trace answers to the underlying material.
  • Support uncertainty-aware responses when retrieved evidence is insufficient.
⁠2. Persistent Conversations
  • Manage chat sessions through the backend API.
  • Store application data in PostgreSQL.
  • Retrieve existing sessions and messages after refreshing the frontend.
⁠3. AI-Assisted Writing
  • Generate long-form essays using a Ship 30 for 30-inspired workflow.
  • Process writing jobs asynchronously using Redis and a dedicated worker.
  • Support Markdown and HTML-based writing artifacts.
⁠4. Configurable Language Models

The application supports a configurable model-provider architecture. Provider availability depends on environment configuration, credentials, model compatibility, and network access.

The development configuration has used Ollama with qwen2.5:1.5b. Hosted model integrations can be configured separately through supported provider settings.

⁠5. Containerized Deployment
  • Separate images for independently managed application services.
  • Docker Compose orchestration.
  • Health checks for critical infrastructure and the backend API.
  • Internal service networking and persistent database storage, as configured in the deployment Compose file.

⁠Technology Stack

LayerTechnologies
FrontendReact, TypeScript, Vite
BackendPython, FastAPI
DatabasePostgreSQL, pgvector
Background jobsRedis, Python worker
Agent serviceNode.js, TypeScript
Web servingNginx
ContainersDocker, Docker Compose
AI and retrievalRAG, embeddings, vector similarity search, configurable LLM providers

⁠Run with Docker Compose

The four images are application components, not a standalone application by themselves. To run the complete system, use the project's Docker Compose configuration and environment variables.

  1. Obtain the project source code and its Compose files.
  2. Create the required environment configuration using the project's .env.example.
  3. Configure database credentials, internal service tokens, and any required model-provider settings.
  4. Ensure the required transcript data and database initialization or migration steps are available.
  5. Start the application using the production Compose configuration.
docker compose -f compose.prod.yaml pull
docker compose -f compose.prod.yaml up -d
docker compose -f compose.prod.yaml ps

The commands above assume that the Compose file and required environment configuration are present in the current directory.

⁠Health check

The backend exposes the following liveness endpoint in the current deployment:

GET http://localhost:8000/health/live

A healthy response looks like:

{
  "status": "ok",
  "service": "lenny-growth-assistant"
}

The frontend is served on the configured HTTP port. In the current local production Compose configuration, open:

http://localhost

Security note: Configure production secrets through environment variables or a secrets manager. Never publish .env files, API keys, database passwords, or internal service tokens in a repository or image.

⁠Configuration

The deployment uses environment variables for application settings. Depending on the selected configuration, these may include:

  • PostgreSQL connection settings.
  • Redis connection settings.
  • LLM provider, model, API endpoint, and credentials.
  • Request timeouts.
  • Internal agent authentication.
  • Worker and queue settings.

Use the project's .env.example and Compose configuration as the authoritative reference for the exact required variables and defaults.

⁠Project Structure

The application is organized into independently containerized services:

Lenny-Growth-Assistant/
├── frontend/          # React and TypeScript UI
├── backend/            # FastAPI application and writing workflows
├── agent-service/      # Pi agent service
├── alembic/            # Database migrations
├── compose.yaml        # Development orchestration
├── compose.prod.yaml   # Production-oriented orchestration
├── Dockerfile          # Backend image
└── .env.example        # Environment configuration template

The exact repository structure may evolve as the project develops.

⁠Reliability and Security Considerations

  • Keep API credentials and internal tokens outside source control.
  • Use persistent volumes for database data.
  • Restrict database and internal service ports from public exposure.
  • Use HTTPS and a properly configured reverse proxy for public deployments.
  • Validate generated HTML and render it in a sandboxed environment.
  • Test retrieval quality, citations, job retries, and failure handling before production use.
  • Review image vulnerabilities and update base images and dependencies regularly.

⁠Current Image Release

Release: v1.0.0

The four application images have been published to Docker Hub and pulled successfully in the local Docker Compose environment. The production-oriented stack has also been started locally, and the backend liveness endpoint has returned a successful response.

This confirms container startup and API health; complete AI workflow and public deployment verification should be performed separately.


Lenny Growth Assistant — a modular, containerized AI knowledge and writing application.

⁠Source Code

The source code, application configuration, and deployment files are available on GitHub.

GitHub Repository: https://github.com/Niranjan-Murugarasu024/Lenny-Growth-Assistant⁠

For local deployment, refer to the repository's compose.prod.yaml and .env.example files. Never publish secrets or your actual .env file.

Tag summary

Content type

Image

Digest

sha256:e38bd1856…

Size

161.2 MB

Last updated

6 days ago

docker pull niranjan024/lenny-growth-assistant:v1.0.0