HUB
Sign inSign up

yogsaa/repolens

By yogsaa

•Updated 5 months ago

RepoLens a multi AI agent tool for scanning GitHub repositories

Image
Machine learning & AI
Developer tools
Web analytics
5

1.9K

yogsaa/repolens repository overview

⁠Docker Overview

🌐 Live Demo: https://repolens-0su3.onrender.com⁠

RepoLENS uses a multi-stage Docker architecture to package the React frontend and Flask backend into a single production-ready container. This approach reduces image size, simplifies deployment, and ensures a consistent runtime environment across local and cloud platforms.


⁠Container Architecture

  [React Frontend] (Vite Production Build)
         ↓ (Serves Static HTML/JS/CSS Chunks)
  [Flask Backend] (WSGI Routing & Process Queue)
         ↓ (Executes Codebase & PDF Analysis)
  [LLM Runtime Layer] (Gemini / NVIDIA NIM Models)
LayerComponentTechnical Payload
FrontendReact ClientProduction compiled static SPA assets (HTML, CSS, JS) served from the backend's static context.
BackendFlask API ServerHandles REST router paths, task queues, and runs the ReAct codebase analysis loop.
AI ModelsLLM InterfaceIntegrates token calls via Google Gemini or NVIDIA NIM OpenAI-compatible APIs.

⁠Multi-Stage Build Process

The Dockerfile follows a two-stage build strategy to optimize the final image size and runtime performance.

⁠Stage 1: Frontend Build
FROM node:20 AS frontend-builder

Responsibilities:

  • Install Node.js dependencies
  • Execute the Vite production build
  • Optimize static assets
  • Generate the frontend/dist directory

⁠Stage 2: Backend Runtime
FROM python:3.11-slim

Responsibilities:

  • Install Python dependencies
  • Configure Flask services
  • Copy compiled frontend assets
  • Load environment variables
  • Expose application port 5000

⁠Build Workflow

  [Source Code] (Vite React + Python Flask code)
         ↓
  [Stage 1: Frontend Build] (Vite compilation in Node.js)
         ↓
  [Static Assets] (frontend/dist production bundles)
         ↓
  [Stage 2: Backend Build] (Assets copied to Flask directory)
         ↓
  [Production Image] (Unified server container exposed on Port 5000)

⁠Container Features

  • Multi-stage image optimization
  • Single-port deployment for frontend and backend
  • Environment-based LLM provider selection
  • Production-ready static asset serving
  • Independent Python and Node.js dependency management
  • Portable execution across local and cloud environments

⁠Build and Run

⁠Build Docker Image
docker build -t repolens:latest .
⁠Run Container
docker run -p 5000:5000 \
  --env-file ./backend/.env \
  repolens:latest
⁠View Running Containers
docker ps
⁠View Container Logs
docker logs <container_id>
⁠Stop Container
docker stop <container_id>

⁠Environment Configuration

LLM_PROVIDER=nvidia

API_KEY=<your_api_key>
MODEL=<model_name>

# NVIDIA Configuration
NVIDIA_API_KEY=<your_api_key>
NVIDIA_MODEL=meta/llama-3.1-8b-instruct

⁠Deployment Compatibility

The Docker-based deployment model supports:

  • Render (Docker Runtime)
  • Railway
  • Google Cloud Run
  • AWS ECS
  • Azure Container Apps
  • DigitalOcean App Platform
  • Self-hosted Docker environments

Tag summary
Recent tags
Content type
Image
Digest
sha256:2e37fc8e6…
Size
124 MB
Last updated
5 months ago
docker pull yogsaa/repolens:latest