vibe_coder

Vibe Coder Agent

An AI-powered code generation tool that creates Python applications and HTML websites with minimal coding knowledge required. Leverages multiple LLM providers to assist in generating, managing, and executing projects through an interactive CLI interface.

Overview

The Vibe Coder Agent is designed for users who want to create projects with minimal or no coding experience. It uses artificial intelligence to automatically generate code, manage project environments, and handle dependency installation. The tool supports creating Streamlit applications, FastAPI services, and static HTML websites through conversational AI-driven requirements gathering.

Features

Installation

Prerequisites

Setup Instructions

  1. Clone the Repository
    git clone https://github.com/your-username/vibe_coder.git
    cd vibe_coder
    
  2. Install Dependencies
    pip install -r requirements.txt
    
  3. Configure Environment Variables
    cp .envcopy .env
    

    Edit the .env file with your API keys and configuration:

    nano .env  # or use your preferred editor
    
  4. Update LLM Client Configuration

    The openai_client.py file handles LLM provider connections. For most providers, you only need to update the .env file, but for custom setups, you may need to modify this file:

    # openai_client.py - Default configuration
    from openai import OpenAI
    import os
    from dotenv import load_dotenv
       
    load_dotenv()
       
    def get_client():
        client = OpenAI(
            api_key=os.getenv("OPENAI_API_KEY"), 
            base_url=os.getenv("BASE_URL_OPENAI")
        )
        return client
    

    For different providers, update the environment variables in .env accordingly.

  5. Verify Installation

    Test your setup by running:

    python latest_coding_agent.py
    

    You should see the main menu with three options. If you encounter errors, check the troubleshooting section below.

Complete Setup Example (OpenAI)

Here’s a complete setup example using OpenAI:

# 1. Clone and navigate
git clone https://github.com/your-username/vibe_coder.git
cd vibe_coder

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

# 3. Setup environment
cp .envcopy .env

# 4. Edit .env file (replace with your actual API key)
echo 'OPENAI_API_KEY=sk-proj-your-actual-openai-key-here' > .env
echo 'BASE_URL_OPENAI=https://api.openai.com/v1/' >> .env
echo 'MODEL_NAME=gpt-3.5-turbo' >> .env

# 5. Test the setup
python latest_coding_agent.py

For better dependency management, use a virtual environment:

# Create virtual environment
python -m venv vibe_coder_env

# Activate virtual environment
# On Windows:
vibe_coder_env\Scripts\activate
# On macOS/Linux:
source vibe_coder_env/bin/activate

# Install dependencies
pip install -r requirements.txt

# Continue with setup...

Configuration

Environment Variables

The application uses the following environment variables (defined in .env). These variables are based on the template provided in .envcopy:

# OpenAI Configuration
OPENAI_API_KEY=sk-proj-your-api-key-here
BASE_URL_OPENAI=https://api.openai.com/v1/

# DeepSeek Configuration  
BASE_URL_DEEPSEEK=https://api.deepseek.com/v1/

# Local LLM Configuration
LOCAL_URL=http://127.0.0.1:1234
LOCAL_API_KEY=your-local-api-key

# Model Configuration
MODEL_NAME=qwen2.5-coder-3b-instruct

Key Environment Variables:

Supported LLM Providers

OpenAI Configuration

DeepSeek Configuration

Local LLM Configuration

Ollama Configuration

Configuration Tips and Best Practices

Choosing the Right Provider

Model Selection Guidelines

Environment Variable Reference

Based on the .envcopy template, here are all available configuration options:

# Primary API Configuration
OPENAI_API_KEY=your-api-key-here          # Required for all providers
BASE_URL_OPENAI=provider-base-url         # Provider-specific base URL
MODEL_NAME=model-name                     # Model to use for generation

# Alternative URLs (from .envcopy)
BASE_URL_DEEPSEEK=https://api.deepseek.com/v1/
LOCAL_URL=http://127.0.0.1:1234          # Local LLM server URL
LOCAL_API_KEY=your-local-api-key         # Local server API key (if needed)

Provider Switching

To switch between providers, simply update these three variables in your .env file:

# Switch to DeepSeek
OPENAI_API_KEY=your-deepseek-key
BASE_URL_OPENAI=https://api.deepseek.com/v1/
MODEL_NAME=deepseek-coder

# Switch to Local LLM
OPENAI_API_KEY=local-placeholder
BASE_URL_OPENAI=http://127.0.0.1:1234/v1/
MODEL_NAME=qwen2.5-coder-3b-instruct

# Switch to Ollama
OPENAI_API_KEY=ollama-placeholder
BASE_URL_OPENAI=http://localhost:11434/v1/
MODEL_NAME=qwen2.5-coder:3b

Usage

Quick Start

Run the application:

python latest_coding_agent.py

Main Options

The application provides three main options:

  1. Create a new Python application - Generate Streamlit apps or FastAPI services
  2. Update an existing generated project - Modify and enhance previously created projects
  3. Create a static HTML website - Generate complete HTML/CSS/JavaScript websites

Example Workflow

================================================================================
Python Application Generator
================================================================================
Options:
1. Create a new Python application
2. Update an existing generated project
3. Create a static HTML website

Enter your choice (1, 2 or 3): 1
What would you like to build today? (Streamlit app or FastAPI service): streamlit app

Project Description: streamlit app

=== Gathering Requirements ===
Any Reference link eg doc: 

Question 1: What kind of application do you want to build with Streamlit?
Your response: data visualization dashboard

Question 2: What type of data will you be visualizing?
Your response: sales data with charts and graphs

βœ… Requirements gathered (2 questions answered)

=== Generating and Running Code ===
Generated 3 files: app.py, requirements.txt, README.md
βœ… Application started successfully!
🌐 You can access it at: http://localhost:8501
πŸ“‚ Project location: /path/to/generated_projects/project_20250107_143022

Project Structure

vibe_coder/
β”œβ”€β”€ latest_coding_agent.py      # Main application entry point
β”œβ”€β”€ models.py                   # Pydantic models for structured AI responses
β”œβ”€β”€ openai_client.py           # LLM client configuration
β”œβ”€β”€ application_executor.py    # Application execution handler
β”œβ”€β”€ project_analyzer.py        # Project analysis functionality
β”œβ”€β”€ project_manager.py         # Project creation and management
β”œβ”€β”€ file_manager.py            # File operations utilities
β”œβ”€β”€ requirements_manager.py    # Dependency management
β”œβ”€β”€ user_interaction.py        # User interface components
β”œβ”€β”€ scraper_doc.py            # Web scraping for reference docs
β”œβ”€β”€ utils.py                  # General utilities
β”œβ”€β”€ requirements.txt          # Project dependencies
β”œβ”€β”€ .envcopy                 # Environment variables template
β”œβ”€β”€ .gitignore              # Git ignore rules
β”œβ”€β”€ LICENSE                 # MIT License
β”œβ”€β”€ README.md              # This file
β”œβ”€β”€ run_command.txt        # Execution instructions
β”œβ”€β”€ generated_projects/    # Directory for generated projects
└── old_version/          # Previous versions
    β”œβ”€β”€ v0.1_latest_coding_agent.py
    └── v0_old_coder.py

Key Files Description

Core Application Files

Project Management Components

User Interface and Utilities

Configuration and Documentation Files

Directory Structure

Generated Project Structure

When the application creates a new project, it generates the following structure:

generated_projects/project_20250107_143022/
β”œβ”€β”€ app.py                    # Main application file (Streamlit/FastAPI)
β”œβ”€β”€ requirements.txt          # Project-specific dependencies
β”œβ”€β”€ README.md                # Project documentation
β”œβ”€β”€ run_command.txt          # Command to run the application
β”œβ”€β”€ static/                  # Static files (for web projects)
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ js/
β”‚   └── images/
└── templates/               # HTML templates (for FastAPI projects)
    └── index.html

Generated Project File Types

Usage Examples and Workflows

Feature 1: Creating New Python Applications

Example 1: Streamlit Data Visualization Dashboard

Complete User Interaction Flow:

$ python latest_coding_agent.py
================================================================================
Python Application Generator
================================================================================
Options:
1. Create a new Python application
2. Update an existing generated project
3. Create a static HTML website

Enter your choice (1, 2 or 3): 1
What would you like to build today? (Streamlit app or FastAPI service): streamlit dashboard

Project Description: streamlit dashboard

=== Gathering Requirements ===
Any Reference link eg doc: 

Question 1: What kind of data visualization dashboard do you want to create? What type of data will it display?
Your response: sales analytics dashboard with charts showing revenue trends, product performance, and customer demographics

Question 2: What specific chart types would you like to include? (e.g., line charts, bar charts, pie charts, scatter plots)
Your response: line charts for revenue trends, bar charts for product sales, pie charts for customer segments, and interactive filters

Question 3: Do you want the dashboard to use sample data or connect to a specific data source?
Your response: use sample sales data with realistic numbers

βœ… Requirements gathered (3 questions answered)

=== Generating and Running Code ===
Attempt 1/3
Generated 4 files: app.py, requirements.txt, README.md, sample_data.py
Run command: streamlit run app.py

Installing dependencies...
βœ… Dependencies installed successfully

Starting application...
βœ… Application started successfully!
🌐 You can access it at: http://localhost:8501
πŸ“‚ Project location: /path/to/generated_projects/project_20250107_143022
πŸ’» To run it again: streamlit run app.py

=== Success! ===
Your application has been generated and is ready to use.
Location: /path/to/generated_projects/project_20250107_143022

Generated Files:

Example 2: FastAPI REST API Service

Complete User Interaction Flow:

$ python latest_coding_agent.py
================================================================================
Python Application Generator
================================================================================
Options:
1. Create a new Python application
2. Update an existing generated project
3. Create a static HTML website

Enter your choice (1, 2 or 3): 1
What would you like to build today? (Streamlit app or FastAPI service): fastapi todo api

Project Description: fastapi todo api

=== Gathering Requirements ===
Any Reference link eg doc: 

Question 1: What kind of API endpoints do you want for your todo application?
Your response: CRUD operations - create, read, update, delete todos, plus list all todos and mark as complete

Question 2: What data fields should each todo item have?
Your response: id, title, description, completed status, created date, due date, priority level

Question 3: Do you want authentication, database integration, or just in-memory storage for now?
Your response: in-memory storage with Pydantic models, no authentication needed for now

βœ… Requirements gathered (3 questions answered)

=== Generating and Running Code ===
Attempt 1/3
Generated 5 files: main.py, models.py, requirements.txt, README.md, test_api.py
Run command: uvicorn main:app --reload

Installing dependencies...
βœ… Dependencies installed successfully

Starting application...
βœ… Application started successfully!
🌐 You can access it at: http://localhost:8000
πŸ“š API Documentation: http://localhost:8000/docs
πŸ“‚ Project location: /path/to/generated_projects/project_20250107_144530
πŸ’» To run it again: uvicorn main:app --reload

=== Success! ===
Your application has been generated and is ready to use.
Location: /path/to/generated_projects/project_20250107_144530

Generated Files:

Feature 2: Updating Existing Projects

Complete User Interaction Flow:

$ python latest_coding_agent.py
================================================================================
Python Application Generator
================================================================================
Options:
1. Create a new Python application
2. Update an existing generated project
3. Create a static HTML website

Enter your choice (1, 2 or 3): 2

Found existing projects:
1. project_20250107_143022 - Streamlit project (Created: 2025-01-07 14:30:22)
   Main files: app.py, sample_data.py
2. project_20250107_144530 - FastAPI project (Created: 2025-01-07 14:45:30)
   Main files: main.py, models.py

Select a project number to update (or 0 to create new): 1

Selected project: /path/to/generated_projects/project_20250107_143022

=== Analyzing Project ===
Project Type: Streamlit
Main Features: Sales analytics dashboard with revenue trends, product performance charts, and customer demographics visualization
Current Files: app.py, sample_data.py, requirements.txt, README.md

What updates would you like to make to this project?
Your input: add user authentication and the ability to upload custom CSV data files

=== Gathering Update Requirements ===
Question 1: What type of authentication do you want to implement? (simple password, user accounts, OAuth, etc.)
Your response: simple password protection with a login form

Question 2: What CSV file format should users be able to upload? What columns are expected?
Your response: CSV files with columns: date, product, revenue, customer_segment, region

Question 3: Should the uploaded data replace the sample data or be added alongside it?
Your response: replace the sample data and allow users to switch between different uploaded datasets

βœ… Update requirements gathered (3 questions answered)

=== Generating Updated Code ===
Generated 6 files: app.py, auth.py, data_handler.py, requirements.txt, README.md, sample_data.py
Updated/Added files:
- app.py (enhanced with authentication and file upload)
- auth.py (new - authentication functions)
- data_handler.py (new - CSV processing)
- requirements.txt (updated with new dependencies)

βœ… Updated application started successfully!
🌐 You can access it at: http://localhost:8501
πŸ“‚ Updated project location: /path/to/generated_projects/project_20250107_143022_updated_20250107_150015

=== Update Summary ===
Original project: /path/to/generated_projects/project_20250107_143022
Updated project: /path/to/generated_projects/project_20250107_143022_updated_20250107_150015
Updated/Added files:
- app.py
- auth.py
- data_handler.py
- requirements.txt

Feature 3: Creating HTML Websites

Complete User Interaction Flow:

$ python latest_coding_agent.py
================================================================================
Python Application Generator
================================================================================
Options:
1. Create a new Python application
2. Update an existing generated project
3. Create a static HTML website

Enter your choice (1, 2 or 3): 3
What kind of website would you like to build? portfolio website for a web developer

Website Description: portfolio website for a web developer

=== Gathering Requirements ===
Any Reference link eg doc: 

Question 1: What sections do you want on your portfolio website?
Your response: header with navigation, about me section, skills showcase, project portfolio with images, contact form, and footer

Question 2: What color scheme and design style do you prefer?
Your response: modern dark theme with blue accents, clean minimalist design, responsive layout

Question 3: Do you want any interactive features or animations?
Your response: smooth scrolling, hover effects on project cards, animated skill bars, and a working contact form

βœ… Requirements gathered (3 questions answered)

=== Generating and Running Code ===
Attempt 1/3
Generated 8 files: index.html, styles.css, script.js, images/placeholder.jpg, README.md, contact.php, projects.json, favicon.ico
Run command: python -m http.server 8000

Starting application...
βœ… Application started successfully!
🌐 You can access it at: http://localhost:8000
πŸ“‚ Project location: /path/to/generated_projects/project_20250107_151245
πŸ’» To run it again: python -m http.server 8000

=== Success! ===
Your application has been generated and is ready to use.
Location: /path/to/generated_projects/project_20250107_151245

Generated Files:

Sample Inputs and Expected Outputs

Input Examples for Different Project Types

Streamlit Applications:

FastAPI Services:

HTML Websites:

Expected Output Structure

For Streamlit Projects:

generated_projects/project_YYYYMMDD_HHMMSS/
β”œβ”€β”€ app.py                 # Main Streamlit application
β”œβ”€β”€ requirements.txt       # streamlit, pandas, plotly, etc.
β”œβ”€β”€ README.md             # Usage instructions
β”œβ”€β”€ run_command.txt       # streamlit run app.py
└── data/                 # Sample data files (if needed)
    └── sample_data.csv

For FastAPI Projects:

generated_projects/project_YYYYMMDD_HHMMSS/
β”œβ”€β”€ main.py               # FastAPI application
β”œβ”€β”€ models.py             # Pydantic models
β”œβ”€β”€ requirements.txt      # fastapi, uvicorn, pydantic
β”œβ”€β”€ README.md            # API documentation
β”œβ”€β”€ run_command.txt      # uvicorn main:app --reload
└── tests/               # API tests (if generated)
    └── test_main.py

For HTML Projects:

generated_projects/project_YYYYMMDD_HHMMSS/
β”œβ”€β”€ index.html           # Main HTML file
β”œβ”€β”€ styles.css           # CSS styling
β”œβ”€β”€ script.js            # JavaScript functionality
β”œβ”€β”€ README.md           # Deployment instructions
β”œβ”€β”€ run_command.txt     # python -m http.server 8000
β”œβ”€β”€ images/             # Image assets
β”‚   └── placeholder.jpg
└── assets/             # Additional assets
    β”œβ”€β”€ fonts/
    └── icons/

CLI Interface Navigation

Main Menu Options:

  1. Option 1: Create new Python application β†’ Choose Streamlit or FastAPI β†’ Requirements gathering β†’ Code generation
  2. Option 2: Update existing project β†’ Select from list β†’ Describe changes β†’ Enhanced code generation
  3. Option 3: Create HTML website β†’ Describe website type β†’ Requirements gathering β†’ Static site generation

Requirements Gathering Process:

Code Generation and Execution:

Troubleshooting

Common Issues and Solutions

Dependency Installation Failures

Problem: pip install -r requirements.txt fails or packages don’t install correctly

Solutions:

API Key Configuration Problems

Problem: Authentication errors, invalid API key, or connection failures

Solutions:

Model Compatibility Issues

Problem: Model not found, unsupported features, or generation failures

Solutions:

Application Won’t Start

Problem: Generated applications fail to launch or crash immediately

Solutions:

Code Generation Issues

Problem: AI generates incomplete, incorrect, or non-functional code

Solutions:

File Permission and Path Issues

Problem: Cannot create files, permission denied, or path not found errors

Solutions:

Environment and System Issues

Problem: Import errors, module not found, or system-specific failures

Solutions:

Limitations

Known System Limitations

Dependency Installation Issues

Programming Knowledge Requirements

Model and AI Limitations

Application Complexity Constraints

Technical Infrastructure Requirements

Functional Limitations

Project Types and Features

Code Generation Scope

Update and Maintenance

Performance and Reliability Limitations

Generation Speed and Reliability

Resource Usage

Security and Privacy Considerations

Ideal For:

Not Recommended For:

Architecture Overview

User Input β†’ Requirements Gathering β†’ AI Code Generation β†’ Project Creation β†’ Dependency Installation β†’ Application Execution

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   CLI       β”‚    β”‚ Requirements β”‚    β”‚    LLM      β”‚    β”‚   Project    β”‚
β”‚ Interface   │───▢│  Gathering   │───▢│  Generation │───▢│  Creation    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚                                       β”‚
                           β–Ό                                       β–Ό
                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚   Document   β”‚                      β”‚ Dependency   β”‚
                   β”‚   Scraping   β”‚                      β”‚ Management   β”‚
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                                 β”‚
                                                                 β–Ό
                                                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                        β”‚ Application  β”‚
                                                        β”‚  Execution   β”‚
                                                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why Streamlit and FastAPI?

Streamlit and FastAPI provide the best combination for rapid application development:

Architecture Overview

System Architecture

The Vibe Coder Agent follows a modular architecture designed for extensibility and maintainability. The system is organized into distinct layers that handle different aspects of the code generation workflow.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           VIBE CODER AGENT ARCHITECTURE                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚   CLI Interface β”‚    β”‚  User Interface β”‚    β”‚   Input Handler β”‚         β”‚
β”‚  β”‚                 β”‚    β”‚   Components    β”‚    β”‚                 β”‚         β”‚
β”‚  β”‚ β€’ Main Menu     │◄──►│ β€’ Prompts       │◄──►│ β€’ Validation    β”‚         β”‚
β”‚  β”‚ β€’ Option Select β”‚    β”‚ β€’ Progress      β”‚    β”‚ β€’ Sanitization  β”‚         β”‚
β”‚  β”‚ β€’ Error Display β”‚    β”‚ β€’ Formatting    β”‚    β”‚ β€’ Type Checking β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚           β”‚                       β”‚                       β”‚                β”‚
β”‚           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
β”‚                                   β”‚                                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚                    CORE ORCHESTRATION LAYER                       β”‚     β”‚
β”‚  β”‚                                                                    β”‚     β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚     β”‚
β”‚  β”‚  β”‚ Requirements    β”‚    β”‚   AI Conversationβ”‚    β”‚  Project        β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ Gathering       β”‚    β”‚   Manager        β”‚    β”‚  Analyzer       β”‚ β”‚     β”‚
β”‚  β”‚  β”‚                 β”‚    β”‚                  β”‚    β”‚                 β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Question Flow │◄──►│ β€’ Context Mgmt   │◄──►│ β€’ Type Detectionβ”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ User Responsesβ”‚    β”‚ β€’ Message Historyβ”‚    β”‚ β€’ File Analysis β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Validation    β”‚    β”‚ β€’ Model Selectionβ”‚    β”‚ β€’ Update Logic  β”‚ β”‚     β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                   β”‚                                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚                      LLM INTEGRATION LAYER                        β”‚     β”‚
β”‚  β”‚                                                                    β”‚     β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚     β”‚
β”‚  β”‚  β”‚   OpenAI        β”‚    β”‚   DeepSeek      β”‚    β”‚   Local LLM     β”‚ β”‚     β”‚
β”‚  β”‚  β”‚   Client        β”‚    β”‚   Client        β”‚    β”‚   Client        β”‚ β”‚     β”‚
β”‚  β”‚  β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ GPT Models    β”‚    β”‚ β€’ Coder Models  β”‚    β”‚ β€’ LM Studio     β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ API Handling  β”‚    β”‚ β€’ API Handling  β”‚    β”‚ β€’ Ollama        β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Rate Limiting β”‚    β”‚ β€’ Rate Limiting β”‚    β”‚ β€’ Custom Serversβ”‚ β”‚     β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                   β”‚                                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚                    CODE GENERATION & PROCESSING                   β”‚     β”‚
β”‚  β”‚                                                                    β”‚     β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚     β”‚
β”‚  β”‚  β”‚  Pydantic       β”‚    β”‚   Code          β”‚    β”‚   File          β”‚ β”‚     β”‚
β”‚  β”‚  β”‚  Models         β”‚    β”‚   Generator     β”‚    β”‚   Manager       β”‚ β”‚     β”‚
β”‚  β”‚  β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ File Model    │◄──►│ β€’ Template Mgmt │◄──►│ β€’ File Creation β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Event Models  β”‚    β”‚ β€’ Code Validationβ”‚    β”‚ β€’ Directory Mgmtβ”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Type Safety   β”‚    β”‚ β€’ Multi-attempt β”‚    β”‚ β€’ Path Handling β”‚ β”‚     β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                   β”‚                                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚                    PROJECT MANAGEMENT LAYER                       β”‚     β”‚
β”‚  β”‚                                                                    β”‚     β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚     β”‚
β”‚  β”‚  β”‚   Project       β”‚    β”‚  Requirements   β”‚    β”‚  Application    β”‚ β”‚     β”‚
β”‚  β”‚  β”‚   Manager       β”‚    β”‚  Manager        β”‚    β”‚  Executor       β”‚ β”‚     β”‚
β”‚  β”‚  β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Dir Creation  │◄──►│ β€’ Dependency    │◄──►│ β€’ App Startup   β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Timestamping  β”‚    β”‚   Installation  β”‚    β”‚ β€’ Process Mgmt  β”‚ β”‚     β”‚
β”‚  β”‚  β”‚ β€’ Organization  β”‚    β”‚ β€’ Pip Managementβ”‚    β”‚ β€’ URL Detection β”‚ β”‚     β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚     β”‚
β”‚  └─────────────────────────────────────────────────────────────────────     β”‚
β”‚                                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Workflow Diagram

The application follows a structured workflow from user input to application execution:

USER INPUT WORKFLOW
═══════════════════

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   START     β”‚
β”‚ Application β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Main Menu  β”‚
β”‚  Selection  β”‚
β”‚             β”‚
β”‚ 1. New App  β”‚
β”‚ 2. Update   β”‚
β”‚ 3. HTML     β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Option 1  β”‚    β”‚   Option 2  β”‚    β”‚   Option 3  β”‚
β”‚  New Python β”‚    β”‚   Update    β”‚    β”‚    HTML     β”‚
β”‚ Application β”‚    β”‚  Existing   β”‚    β”‚   Website   β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚                  β”‚                  β”‚
       β–Ό                  β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Choose    β”‚    β”‚   Select    β”‚    β”‚  Describe   β”‚
β”‚ Streamlit/  β”‚    β”‚  Project    β”‚    β”‚   Website   β”‚
β”‚   FastAPI   β”‚    β”‚ from List   β”‚    β”‚ Requirementsβ”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚                  β”‚                  β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ REQUIREMENTSβ”‚
                 β”‚  GATHERING  β”‚
                 β”‚   PHASE     β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Reference   β”‚
                 β”‚ Doc Input   β”‚
                 β”‚ (Optional)  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Web Scraper │◄─── scraper_doc.py
                 β”‚ Processing  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ AI Question │◄─── models.py
                 β”‚ Generation  β”‚     (RequirementsGatheringEvent)
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ User Input  │◄─── user_interaction.py
                 β”‚ Collection  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Sufficient  β”‚
                 β”‚Requirements?β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”
                   β”‚   NO    β”‚
                   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Continue    β”‚
                 β”‚ Questioning β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        └─────────┐
                                  β”‚
                   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”    β”‚
                   β”‚   YES   β”‚    β”‚
                   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜    β”‚
                        β”‚         β”‚
                        β–Ό         β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
                 β”‚    CODE     β”‚  β”‚
                 β”‚ GENERATION  β”‚  β”‚
                 β”‚   PHASE     β”‚  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚
                        β”‚         β”‚
                        β–Ό         β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
                 β”‚ LLM Client  │◄─┼─── openai_client.py
                 β”‚ Selection   β”‚  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚
                        β”‚         β”‚
                        β–Ό         β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
                 β”‚ AI Code     │◄─┼─── models.py
                 β”‚ Generation  β”‚  β”‚     (CodeGenerationEvent)
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚
                        β”‚         β”‚
                        β–Ό         β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
                 β”‚ Code        β”‚  β”‚
                 β”‚ Validation  β”‚  β”‚
                 β”‚ & Retry     β”‚  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β”‚
                        β”‚         β”‚
                   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”    β”‚
                   β”‚ Success?β”‚    β”‚
                   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜    β”‚
                        β”‚         β”‚
                   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”    β”‚
                   β”‚   NO    β”‚    β”‚
                   β”‚(Retry)  β”‚    β”‚
                   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜    β”‚
                        β”‚         β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        
                   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”
                   β”‚   YES   β”‚
                   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚   PROJECT   β”‚
                 β”‚  CREATION   β”‚
                 β”‚    PHASE    β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Create      │◄─── project_manager.py
                 β”‚ Project     β”‚
                 β”‚ Directory   β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Generate    │◄─── file_manager.py
                 β”‚ Files       β”‚
                 β”‚ Structure   β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Write Code  β”‚
                 β”‚ Files to    β”‚
                 β”‚ Disk        β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ DEPENDENCY  β”‚
                 β”‚INSTALLATION β”‚
                 β”‚    PHASE    β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Install     │◄─── requirements_manager.py
                 β”‚ Python      β”‚
                 β”‚ Packages    β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Handle      β”‚
                 β”‚ Install     β”‚
                 β”‚ Errors      β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚APPLICATION  β”‚
                 β”‚ EXECUTION   β”‚
                 β”‚   PHASE     β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Start       │◄─── application_executor.py
                 β”‚ Application β”‚
                 β”‚ Process     β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Detect      β”‚
                 β”‚ Application β”‚
                 β”‚ URL & Port  β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ Display     β”‚
                 β”‚ Success     β”‚
                 β”‚ Message     β”‚
                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                        β”‚
                        β–Ό
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚    END      β”‚
                 β”‚ Application β”‚
                 β”‚  Ready to   β”‚
                 β”‚    Use      β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Component Interaction Flow

The major components interact in a coordinated manner to deliver the complete functionality:

COMPONENT INTERACTION DIAGRAM
════════════════════════════

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                            INTERACTION FLOW                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

latest_coding_agent.py (Main Controller)
    β”‚
    β”œβ”€β–Ί user_interaction.py ──────► Collect user input and display prompts
    β”‚
    β”œβ”€β–Ί scraper_doc.py ───────────► Process reference documentation URLs
    β”‚
    β”œβ”€β–Ί openai_client.py ─────────► Initialize LLM client connection
    β”‚
    β”œβ”€β–Ί models.py ────────────────► Structure AI requests and responses
    β”‚                                β”‚
    β”‚                                β”œβ”€β–Ί RequirementsGatheringEvent
    β”‚                                β”œβ”€β–Ί CodeGenerationEvent  
    β”‚                                └─► ProjectAnalysisEvent
    β”‚
    β”œβ”€β–Ί project_analyzer.py ──────► Analyze existing projects (Option 2)
    β”‚
    β”œβ”€β–Ί project_manager.py ───────► Create and organize project directories
    β”‚                                β”‚
    β”‚                                └─► file_manager.py ──► Create files
    β”‚
    β”œβ”€β–Ί requirements_manager.py ───► Install Python dependencies
    β”‚
    └─► application_executor.py ───► Start and manage applications

Data Flow:
User Input β†’ Requirements Gathering β†’ AI Processing β†’ Code Generation β†’ 
File Creation β†’ Dependency Installation β†’ Application Execution

Key Architectural Decisions

Modular Design

LLM Provider Abstraction

Project Management Strategy

Error Handling and Resilience

File System Organization

Data Models and Flow

The application uses Pydantic models to ensure type safety and structured communication:

DATA MODEL HIERARCHY
═══════════════════

File Model
β”œβ”€β”€ name: str (filename)
└── content: str (file contents)

RequirementsGatheringEvent
β”œβ”€β”€ all_details_gathered: bool
β”œβ”€β”€ question: str
β”œβ”€β”€ project_type: str
└── requirements: str

CodeGenerationEvent
β”œβ”€β”€ generated_code: List[File]
└── run_command: str

ProjectAnalysisEvent
β”œβ”€β”€ project_structure: str
β”œβ”€β”€ project_type: str
β”œβ”€β”€ main_features: str
└── suggested_updates: List[str]

This architecture ensures maintainability, extensibility, and reliable operation while providing a smooth user experience from initial input to running application.

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For questions, issues, or contributions, please:


Demo Screenshots

FastAPI Application

FastAPI Demo

HTML Website

HTML Demo