A powerful AI-powered Streamlit application that automatically generates comprehensive technical documentation for code changes. Leveraging CrewAI agents, this tool analyzes differences between original and modified code to produce professional Word documents with detailed explanations.
📋 Project Overview The Technical Document Generator transforms code changes into well-structured technical documentation. It's designed for developers, technical writers, and teams who need to maintain clear records of code modifications with minimal effort.
Primary Features:
- AI-Powered Analysis: Utilizes CrewAI with Llama-3.3-70B model for intelligent code change analysis
- Professional Documentation: Generates Microsoft Word documents with proper formatting
- Context-Aware Processing: Extracts relevant code sections for focused analysis
- User Story Integration: Connects code changes to user requirements and stories
- Customizable Instructions: Accepts additional context for tailored documentation
- Streamlit Interface: User-friendly web application accessible to technical and non-technical users
🚀 Installation and Setup
Prerequisites
- Python 3.8 or higher
- Groq API account (for LLM access)
- Git
Installation Steps
- Clone the repository
- git clone https://github.com/CodeHub5199/Technical-Document-Generator.git
- cd Technical-Document-Generator
- Create a virtual environment (recommended)
- python -m venv venv
- source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
- pip install -r requirements.txt
- Set up environment variables
- Create a .env file in the root directory:
- GROQ_API_KEY=your_groq_api_key_here
- Run the application
- streamlit run app.py
Required Python Packages The application requires the following packages (included in requirements.txt):
- streamlit
- crewai
- python-docx
- python-dotenv
- langchain
💻 Usage Guidelines Basic Usage
- Start the application by running streamlit run app.py
- Fill in user story details (name and description)
- Provide additional context in the instructions section (optional but recommended)
- Upload original code file (if available)
- Paste the modified code in the text area
- Click "Explain Code Changes" to generate documentation
- Download the Word document with the analysis
Example Suppose you've modified a function to improve performance:
- User Story Name: "Optimize data processing performance"
- User Story Description: "Reduce processing time for large datasets by implementing caching."
- Additional Instructions: "Focus on memory vs performance tradeoffs and thread safety considerations"
- Upload original data_processor.py
- Paste the optimized function code
- Generate and download the analysis
The resulting document will include:
- User story context
- Technical explanation of changes
- Performance impact analysis
- Implementation details
- Potential side effects
Advanced Features
- Code Chunking: Automatically handles large files by splitting them into manageable chunks
- Smart Context Extraction: Identifies relevant parts of the original code for comparison
- Custom Formatting: Generates professionally formatted Word documents with proper headings
- Adaptive Analysis: Incorporates additional instructions for targeted documentation
Areas for Contribution
- Additional LLM provider integrations
- Support for more programming languages
- Enhanced document templates and formatting options
- Test suite development
- UI/UX improvements
- Documentation translations
Acknowledgments
- Built with Streamlit
- Powered by CrewAI
- LLM services provided by Groq
- Documentation generation with python-docx
Screenshots





