How pranavkodin/ai-instant-repo-maker works
Project type and purpose
• From the README (“IRONY”): this is a tool that auto-generates README files, metadata, and directory structures for other projects.
• It includes an AI-based generator, file-management utilities (including GitHub integration), and a GUI front end.
File structure
Top-level:
• main.py – entry point
• ai/ – AI logic
• file_manager/ – project scaffolding + GitHub helpers
• gui/ – desktop interface
Details:
• ai/generator.py – encapsulates prompt-engineering and calls to an AI service
• file_manager/creator.py – builds folder trees & files
• file_manager/github_utils.py – interfaces with GitHub API
• gui/main_window.py – renders windows, collects user input
README for additional insights
• No detailed architecture section; the README is intentionally “unstructured.”
• We assume dependencies on an external AI API (e.g., OpenAI) and on GitHub’s API.
a. Main components:
• GUI Layer (gui/main_window.py)
• Orchestrator (main.py)
• AI Module (ai/generator.py)
• File Manager Module (file_manager/creator.py + github_utils.py)
• External Services: AI-as-a-Service, GitHub API
• Local File System (disk)
b. Relationships & interactions:
1. User interacts with GUI → events sent to Orchestrator
2. Orchestrator invokes:
– AI Module (generate README content)
– File Manager (create files/folders)
– GitHub Utils (optionally commit to repo)
3. AI Module → External AI Service → returns content → back to orchestrator
4. File Manager → writes to Local File System
5. GitHub Utils → GitHub API → push/metadata
6. Orchestrator → GUI updates / status messages
c. Architectural patterns/design principles:
• MVC-style separation:
– View: GUI
– Controller: main.py orchestrator
– Model: AI & file_manager modules
• Single responsibility: each module handles one domain (AI, FS, GitHub)
• Dependency inversion: orchestrator depends on interfaces, not on specific implementations
d. Key technologies/frameworks/libraries:
• Python 3.x
• GUI toolkit (e.g., PyQt, Tkinter, or similar)
• HTTP client (requests or httpx) for AI & GitHub API
• JSON/YAML parsing for metadata