|
|
|
import os
|
|
|
|
|
|
project_structure = {
|
|
"product_feature_agent": {
|
|
"app.py": "# Main Gradio application with MCP server",
|
|
"mcp_server.py": "# FastAPI MCP server implementation",
|
|
"requirements.txt": "# Project dependencies",
|
|
"data_collectors": {
|
|
"__init__.py": "",
|
|
"app_store_scraper.py": "# App Store review collection",
|
|
"reddit_collector.py": "# Reddit sentiment collection",
|
|
"news_collector.py": "# News API integration"
|
|
},
|
|
"analyzers": {
|
|
"__init__.py": "",
|
|
"sentiment_analyzer.py": "# Claude-powered sentiment analysis",
|
|
"feature_validator.py": "# Core validation logic"
|
|
},
|
|
"modal_functions": {
|
|
"__init__.py": "",
|
|
"gpu_processing.py": "# Modal Labs GPU-accelerated processing"
|
|
},
|
|
"utils": {
|
|
"__init__.py": "",
|
|
"config.py": "# Configuration and API keys",
|
|
"helpers.py": "# Utility functions"
|
|
}
|
|
}
|
|
}
|
|
|
|
def create_project_structure(structure, base_path=""):
|
|
for name, content in structure.items():
|
|
path = os.path.join(base_path, name)
|
|
if isinstance(content, dict):
|
|
os.makedirs(path, exist_ok=True)
|
|
create_project_structure(content, path)
|
|
else:
|
|
with open(path, "w") as f:
|
|
f.write(content)
|
|
|
|
|
|
create_project_structure(project_structure)
|
|
|
|
print("β
Project structure created successfully!")
|
|
print("\nπ Project Structure:")
|
|
for root, dirs, files in os.walk("product_feature_agent"):
|
|
level = root.replace("product_feature_agent", "").count(os.sep)
|
|
indent = " " * 2 * level
|
|
print(f"{indent}{os.path.basename(root)}/")
|
|
subindent = " " * 2 * (level + 1)
|
|
for file in files:
|
|
print(f"{subindent}{file}") |