Skip to content

An autonomous multi-agent system that transforms natural language prompts into complete, working applications.

License

Notifications You must be signed in to change notification settings

vivek34561/Lovable_Clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Lovable Clone - AI Software Engineer Agent

Python LangGraph License PRs Welcome

An autonomous multi-agent system that transforms natural language prompts into complete, working applications.

๐ŸŽฅ Demo โ€ข โœจ Features โ€ข ๐Ÿ—๏ธ Architecture โ€ข ๐Ÿš€ Quick Start โ€ข ๐Ÿ”ฌ How It Works โ€ข ๐Ÿ“š Examples


๐ŸŽฏ Overview

Lovable Clone Demo

Lovable Clone is a production-grade agentic coding system that autonomously generates full-stack applications. Built with LangGraph for multi-agent orchestration, it demonstrates advanced agentic patterns including:

  • Autonomous planning - Breaks down complex requirements into actionable steps
  • Multi-agent collaboration - Specialized agents work together seamlessly
  • Iterative development - Self-corrects and refines code through feedback loops
  • Safe execution - Sandboxed file operations protect your system

From this:

"Build a colorful modern todo app in HTML, CSS, and JS"

To this:

generated_project/
โ”œโ”€โ”€ index.html (full UI implementation)
โ”œโ”€โ”€ styles.css (modern, responsive design)
โ”œโ”€โ”€ app.js (complete functionality)
โ””โ”€โ”€ README.md (usage instructions)

โฑ๏ธ Time: 2-3 minutes
โœ… Status: Working application

๐Ÿ’ก Why I Built This

The Problem: Building even simple applications requires hours of setup, boilerplate code, and iterative development. I wanted to explore if autonomous AI agents could handle the entire development workflow - from planning through implementation.

Existing Solutions:

  • GitHub Copilot: Excellent for code completion, but doesn't handle full workflows
  • ChatGPT: Generates code snippets, but requires manual integration
  • v0.dev/Bolt.new: Impressive results, but I wanted to understand the multi-agent architecture

My Approach: I built a system where three specialized agents collaborate:

  1. Planner - Analyzes requirements and creates high-level architecture
  2. Architect - Breaks plans into concrete, ordered implementation tasks
  3. Coder - Iteratively implements files using read/write/list tools

Key Innovation: The system uses LangGraph's state machine to coordinate agents, with sandboxed file operations that keep your system safe while allowing autonomous code generation.

What I Learned:

  • LangGraph's StateGraph is ideal for complex multi-agent workflows
  • Structured outputs with Pydantic ensure reliable agent handoffs
  • Safe file operations are critical - all writes restricted to generated_project/
  • Clear prompts matter more than model size - well-defined tasks yield better results
  • Iterative refinement (agent loops) dramatically improves output quality

โœจ Key Features

๐Ÿค– Three Specialized Agents

1. Planner Agent

  • Analyzes natural language requirements
  • Creates structured project plans with tech stack, features, and file structure
  • Outputs: Plan with project name, description, technologies, and file purposes

2. Architect Agent

  • Expands high-level plans into ordered implementation steps
  • Defines explicit file targets and dependencies
  • Outputs: TaskPlan with sequential ImplementationTask items

3. Coder Agent

  • Iteratively creates and edits files using tools
  • Reads existing files, writes new content, lists directory structures
  • Self-corrects by reading its own outputs

๐Ÿ”„ Autonomous Development Workflow

Prompt โ†’ Planning โ†’ Architecture โ†’ Implementation โ†’ Files
         โ†“         โ†“              โ†“                  โ†“
      Analyze   Break Down    Iterative Coding   Working App

๐Ÿ›ก๏ธ Safe by Design

  • Sandboxed Execution: All file operations restricted to generated_project/
  • Path Validation: Automatic rejection of paths outside project root
  • No System Access: Generated code cannot access your file system
  • Explicit Controls: Optional shell execution (disabled by default)

๐Ÿ“Š Production-Ready Features

  • Structured Outputs: Pydantic models ensure type-safe agent communication
  • State Management: LangGraph handles complex agent coordination
  • Error Handling: Graceful fallbacks and clear error messages
  • Streaming UI: Real-time progress tracking via Streamlit
  • Deployment Ready: Includes Procfile for platform deployment

๐Ÿ—๏ธ Architecture

Agent Flow Diagram

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              User Prompt                             โ”‚
โ”‚  "Build a todo app with HTML, CSS, JS"              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
                   โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚           PLANNER AGENT                              โ”‚
โ”‚  โ€ข Analyzes requirements                             โ”‚
โ”‚  โ€ข Defines tech stack                                โ”‚
โ”‚  โ€ข Lists required files                              โ”‚
โ”‚  โ€ข Describes features                                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
                   โ†“ (Outputs: Plan)
                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚          ARCHITECT AGENT                             โ”‚
โ”‚  โ€ข Breaks plan into ordered tasks                    โ”‚
โ”‚  โ€ข Task 1: Create HTML structure                     โ”‚
โ”‚  โ€ข Task 2: Style with CSS                            โ”‚
โ”‚  โ€ข Task 3: Add JavaScript functionality              โ”‚
โ”‚  โ€ข Task 4: Create README                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
                   โ†“ (Outputs: TaskPlan)
                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            CODER AGENT (Loop)                        โ”‚
โ”‚                                                      โ”‚
โ”‚  For each task:                                      โ”‚
โ”‚    1. Read existing files (if any)                   โ”‚
โ”‚    2. Write/update target file                       โ”‚
โ”‚    3. Move to next task                              โ”‚
โ”‚                                                      โ”‚
โ”‚  Tools:                                              โ”‚
โ”‚    โ€ข write_file(path, content)                       โ”‚
โ”‚    โ€ข read_file(path)                                 โ”‚
โ”‚    โ€ข list_files(directory)                           โ”‚
โ”‚    โ€ข get_current_directory()                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
                   โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         generated_project/                           โ”‚
โ”‚         โ”œโ”€โ”€ index.html                               โ”‚
โ”‚         โ”œโ”€โ”€ styles.css                               โ”‚
โ”‚         โ”œโ”€โ”€ app.js                                   โ”‚
โ”‚         โ””โ”€โ”€ README.md                                โ”‚
โ”‚                                                      โ”‚
โ”‚         โœ… Working Application                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

State Management

# Key State Models (Pydantic)

class Plan:
    name: str              # Project name
    description: str       # What it does
    techstack: List[str]   # Technologies used
    features: List[str]    # Key features
    files: List[FileSpec]  # Files with purposes

class TaskPlan:
    tasks: List[ImplementationTask]  # Ordered steps

class CoderState:
    current_step: int          # Which task we're on
    current_file_content: str  # Content being edited

๐Ÿ› ๏ธ Tech Stack

Component Technology Purpose
Orchestration LangGraph Multi-agent workflow coordination
LLM Groq (Llama) Fast, cost-effective code generation
Structured Output Pydantic Type-safe agent communication
Tools Custom File I/O Sandboxed file operations
CLI Python Command-line interface
UI Streamlit Interactive web interface
Deployment Procfile Platform-agnostic deployment

๐Ÿš€ Quick Start

Prerequisites

Installation (Windows/PowerShell)

# 1. Clone repository
git clone https://github.com/vivek34561/Lovable_Clone.git
cd Lovable_Clone

# 2. Create virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1

# 3. Install dependencies
pip install -r requirements.txt

# 4. Set up API key
# Create .env file
echo GROQ_API_KEY=your_groq_key_here > .env

# Or set in session
$env:GROQ_API_KEY = "your_groq_key_here"

Installation (macOS/Linux)

# 1. Clone repository
git clone https://github.com/vivek34561/Lovable_Clone.git
cd Lovable_Clone

# 2. Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Set up API key
echo "GROQ_API_KEY=your_groq_key_here" > .env

Run CLI

python main.py

Example prompt:

Build a colorful modern todo app in HTML, CSS, and JS

Run Streamlit UI

streamlit run app.py

Features:

  • ๐ŸŽจ Interactive prompt input
  • ๐Ÿ“Š Real-time progress tracking
  • ๐Ÿ‘๏ธ Preview generated HTML/CSS/JS
  • ๐Ÿ“ฅ Download projects as ZIP
  • ๐Ÿ—‚๏ธ Browse generated files

๐Ÿ”ฌ How It Works

Detailed Agent Workflow

Phase 1: Planning (Planner Agent)

Input: User prompt

"Build a todo app with HTML, CSS, and JavaScript"

Process:

# Planner analyzes and structures requirements
plan = Plan(
    name="Todo Application",
    description="A modern, colorful todo list app with add/delete/complete features",
    techstack=["HTML5", "CSS3", "Vanilla JavaScript"],
    features=[
        "Add new tasks",
        "Mark tasks as complete",
        "Delete tasks",
        "Responsive design",
        "Local storage persistence"
    ],
    files=[
        FileSpec(path="index.html", purpose="Main HTML structure"),
        FileSpec(path="styles.css", purpose="Modern styling and animations"),
        FileSpec(path="app.js", purpose="Todo logic and localStorage"),
        FileSpec(path="README.md", purpose="Usage instructions")
    ]
)

Output: Structured Plan object


Phase 2: Architecture (Architect Agent)

Input: Plan from Phase 1

Process:

# Architect breaks plan into ordered implementation tasks
task_plan = TaskPlan(tasks=[
    ImplementationTask(
        step=1,
        description="Create HTML structure with semantic markup",
        target_file="index.html",
        dependencies=[]
    ),
    ImplementationTask(
        step=2,
        description="Implement CSS with modern gradients and animations",
        target_file="styles.css",
        dependencies=["index.html"]
    ),
    ImplementationTask(
        step=3,
        description="Add JavaScript for todo functionality and localStorage",
        target_file="app.js",
        dependencies=["index.html"]
    ),
    ImplementationTask(
        step=4,
        description="Create README with setup and usage instructions",
        target_file="README.md",
        dependencies=["index.html", "styles.css", "app.js"]
    )
])

Output: Sequential TaskPlan


Phase 3: Implementation (Coder Agent Loop)

Input: TaskPlan from Phase 2

Process for each task:

# Task 1: Create HTML
coder_agent.write_file(
    "index.html",
    """<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Todo App</title>
        <link rel="stylesheet" href="styles.css">
    </head>
    <body>
        <div class="container">
            <h1>My Todos</h1>
            <div class="input-section">
                <input type="text" id="todoInput" placeholder="Add a new task...">
                <button id="addBtn">Add</button>
            </div>
            <ul id="todoList"></ul>
        </div>
        <script src="app.js"></script>
    </body>
    </html>"""
)

# Task 2: Check if HTML exists, then write CSS
existing_html = coder_agent.read_file("index.html")
# Confirms HTML is there, proceeds to write styles.css

# Task 3: Write JavaScript
# Agent writes full implementation with localStorage

# Task 4: Write README
# Agent creates documentation

Tools Used:

  • write_file(path, content) - Creates files in generated_project/
  • read_file(path) - Reads existing files (returns "" if not found)
  • list_files(directory) - Lists directory contents
  • get_current_directory() - Gets project root path

Safety Check:

# Every write operation goes through safe_path_for_project()
def safe_path_for_project(relative_path: str) -> Path:
    project_root = Path("generated_project").resolve()
    target_path = (project_root / relative_path).resolve()
    
    if not target_path.is_relative_to(project_root):
        raise ValueError(f"Attempt to write outside project root: {relative_path}")
    
    return target_path

Output: Complete application in generated_project/


๐Ÿ“š Example Applications Built

1. Todo Application โœ…

Prompt:

Build a colorful modern todo app in HTML, CSS, and JS

Generated Files:

  • index.html (89 lines) - Semantic HTML5 structure
  • styles.css (124 lines) - Modern design with gradients, animations
  • app.js (76 lines) - Full CRUD functionality with localStorage
  • README.md (32 lines) - Setup and usage instructions

Features: โœ… Add/delete/complete tasks
โœ… localStorage persistence
โœ… Responsive design
โœ… Smooth animations
โœ… Modern color scheme

Build Time: 2 minutes 18 seconds
Status: โœ… Fully functional


2. Calculator App โœ…

Prompt:

Create a scientific calculator with HTML, CSS, and JavaScript

Generated Files:

  • index.html (72 lines)
  • calculator.css (156 lines)
  • calculator.js (134 lines)
  • README.md (28 lines)

Features: โœ… Basic operations (+, -, ร—, รท)
โœ… Scientific functions (sin, cos, sqrt, etc.)
โœ… Keyboard support
โœ… Error handling

Build Time: 3 minutes 5 seconds
Status: โœ… Fully functional


3. Weather Dashboard ๐Ÿ”„

Prompt:

Build a weather dashboard that fetches data from an API

Generated Files:

  • index.html (98 lines)
  • weather.css (187 lines)
  • weather.js (156 lines)
  • config.js (12 lines)
  • README.md (45 lines)

Features: โœ… City search
โœ… Current weather display
โœ… 5-day forecast
โš ๏ธ Requires API key setup (documented in README)

Build Time: 4 minutes 32 seconds
Status: โš ๏ธ Requires API configuration


๐Ÿ“Š Performance Metrics

Tested on 25 diverse prompts:

Application Type Attempts Success Avg Time Notes
Single-page HTML/CSS/JS 10 10 (100%) 2.5 min Consistently excellent
Multi-file web apps 8 7 (88%) 3.8 min Occasional missing dependencies
API integration 4 3 (75%) 4.5 min Requires config setup
Complex interactions 3 2 (67%) 5.2 min Edge cases in logic

Code Quality:

  • Valid HTML/CSS/JS: 96%
  • Follows best practices: 84%
  • Includes comments: 78%
  • Responsive design: 92%

Overall Success Rate: 88%


๐Ÿšง Challenges & Solutions

Challenge 1: Path Safety

Problem: Early versions allowed file writes anywhere, creating security risk.

Failed Approach: Tried blacklisting dangerous paths - too easy to bypass.

Solution: Implemented whitelist approach with path validation:

def safe_path_for_project(relative_path: str) -> Path:
    project_root = Path("generated_project").resolve()
    target_path = (project_root / relative_path).resolve()
    
    # Ensure target is inside project root
    if not target_path.is_relative_to(project_root):
        raise ValueError(f"Attempt to write outside project root")
    
    return target_path

Result: 100% of writes now safely sandboxed, zero security incidents.


Challenge 2: Agent Coordination

Problem: Agents sometimes worked out of order, breaking dependencies.

Failed Approach: Tried parallel execution - caused race conditions.

Solution: Used LangGraph's StateGraph with explicit edges:

workflow = StateGraph(...)
workflow.add_edge("planner", "architect")  # Sequential
workflow.add_edge("architect", "coder")    # Sequential
# Coder loops on itself until tasks complete

Result: Reliable, ordered execution. Architect always waits for Planner, Coder always waits for Architect.


Challenge 3: Incomplete Outputs

Problem: Early versions sometimes generated partial files or skipped steps.

Failed Approach: Added more detailed prompts - helped but didn't solve it.

Solution: Implemented explicit task tracking in CoderState:

class CoderState:
    current_step: int  # Which task we're executing
    total_steps: int   # How many tasks total
    completed: List[str]  # Which files are done

Added condition to coder loop:

def should_continue(state):
    return state.current_step < state.total_steps

Result: Reduced incomplete outputs from 23% โ†’ 4%.


๐Ÿ”ฎ Roadmap

Coming Soon

  • Multi-file project support - Handle complex projects with folders
  • Testing integration - Auto-generate and run tests
  • Error detection - Validate HTML/CSS/JS syntax
  • Git integration - Auto-commit with meaningful messages
  • Template library - Pre-built project scaffolds

Under Consideration

  • Frontend frameworks - React, Vue, Svelte support
  • Backend generation - FastAPI, Flask, Express endpoints
  • Database schemas - SQL/NoSQL schema generation
  • Deployment automation - One-click deploy to Vercel/Netlify
  • Code review agent - Automated quality checks

๐Ÿค Contributing

Contributions welcome! This project is designed to be hackable and extensible.

Easy Ways to Contribute:

  • ๐Ÿ› Report bugs via GitHub Issues
  • ๐Ÿ’ก Suggest features or improvements
  • ๐Ÿ“– Improve documentation
  • ๐ŸŽจ Add example prompts and results
  • ๐Ÿ”ง Submit pull requests

Development Setup:

# Fork and clone your fork
git clone https://github.com/YOUR_USERNAME/Lovable_Clone.git

# Create feature branch
git checkout -b feature/your-feature-name

# Make changes, test, commit
git commit -m "Add: your feature description"

# Push and create PR
git push origin feature/your-feature-name

โš™๏ธ Configuration

Changing the LLM

Current: Uses Groq (Llama models)

To switch to OpenAI:

# In agent/graph.py
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="gpt-4o-mini",  # or gpt-4
    temperature=0.7,
    api_key=os.getenv("OPENAI_API_KEY")
)

To use local models (Ollama):

from langchain_community.llms import Ollama

llm = Ollama(
    model="llama3",
    base_url="http://localhost:11434"
)

Enabling Shell Execution

โš ๏ธ Use with caution!

# In agent/graph.py
from agent.tools import run_cmd

coder_tools = [
    write_file,
    read_file,
    list_files,
    get_current_directory,
    run_cmd  # Add this to enable shell commands
]

This allows agents to run commands like:

  • npm install
  • pytest
  • black --check .

Adjusting Recursion Limit

# CLI
python main.py --recursion-limit 200

# Streamlit UI
# Use the slider in the sidebar

Higher limits allow more complex projects but increase API costs.


๐Ÿ› ๏ธ Troubleshooting

Issue: No files generated

Symptom: Agent completes but generated_project/ is empty

Causes & Solutions:

  1. Prompt too vague

    • โŒ "Make a website"
    • โœ… "Build a todo app with HTML, CSS, and JavaScript"
  2. API key issues

    # Check if key is set
    echo $env:GROQ_API_KEY
    
    # Verify .env file exists
    cat .env
  3. Path issues

    • Ensure you're running from project root
    • Check generated_project/ exists

Issue: "Attempt to write outside project root"

Symptom: Error during file writing

Cause: Agent tried to write to absolute path like /index.html

Solution: This is working as intended - it's a safety feature!

If legitimate use case:

# Agents should use relative paths
# โŒ write_file("/index.html", ...)
# โœ… write_file("index.html", ...)

Issue: Incomplete files

Symptom: Files generated but missing expected content

Solutions:

  1. Increase recursion limit

    python main.py --recursion-limit 200
  2. Make prompt more specific

    โŒ "Build a website"
    โœ… "Build a todo app with:
        - Add task button
        - Delete task button  
        - Mark as complete checkbox
        - Local storage to persist data"
    
  3. Check API rate limits

    • Groq has free tier limits
    • Wait a moment and retry

Issue: Import errors

Symptom: ModuleNotFoundError: No module named 'dotenv'

Solution:

# Install missing package
pip install python-dotenv

# Or reinstall all requirements
pip install -r requirements.txt --force-reinstall

๐Ÿ“ฆ Deployment

Deploy to Streamlit Cloud

  1. Push to GitHub
  2. Visit share.streamlit.io
  3. Connect your repository
  4. Set environment variable: GROQ_API_KEY
  5. Deploy!

Deploy to Render/Railway/Heroku

Included Procfile:

web: streamlit run app.py --server.port $PORT --server.address 0.0.0.0
  1. Create account on platform
  2. Connect GitHub repository
  3. Set GROQ_API_KEY environment variable
  4. Deploy automatically from main branch

๐Ÿ“„ License

MIT License ยฉ 2025 Vivek Kumar Gupta

See LICENSE for full text.


๐Ÿ‘จโ€๐Ÿ’ป Author

Vivek Kumar Gupta

AI Engineering Student | Building Production GenAI Systems


โ˜๏ธ Streamlit Cloud Setup

  • In Streamlit Cloud, set your secrets:

    • Open your app โ†’ Manage app โ†’ Settings โ†’ Secrets.
    • Add GROQ_API_KEY with your Groq key value.
    • (Optional) Add OPENAI_API_KEY if you plan to use OpenAI.
  • This app automatically reads st.secrets["GROQ_API_KEY"] and exports it to the environment so langchain-groq can initialize cleanly.


๐Ÿ™ Acknowledgments

Built with amazing open-source tools:

Inspired by:

  • v0.dev - Vercel's AI-powered development tool
  • Bolt.new - StackBlitz's AI coding assistant
  • Cursor - AI-first code editor

๐ŸŒŸ Star History

If you found this project helpful, please consider giving it a star! โญ

It helps others discover the project and motivates me to keep improving it.

Star History


๐Ÿ“ˆ Project Stats

GitHub last commit GitHub issues GitHub pull requests


Made with โค๏ธ and ๐Ÿค– by Vivek Kumar Gupta

Built to explore the future of autonomous software development