An AI-powered tool that helps generate comprehensive solution architectures with detailed reasoning using Google's Gemini 2.0 Flash API.
✨ Interactive Requirements Gathering
- Chat with AI to explore and refine requirements
- Ask clarifying questions automatically
- Extract structured requirements from conversations
📄 Document Processing
- Support for multiple formats: PDF, DOCX, TXT, Markdown
- Automatic content extraction
- Context integration into architecture generation
🏗️ Comprehensive Architecture Generation
- Detailed architecture patterns with reasoning
- Technology stack recommendations
- Component design with justifications
- Scalability and security considerations
- Deployment strategies
- Trade-off analysis
- Clone the repository:
git clone https://github.com/dewminawijekoon/SoftwareEngineeringWorkbench.git
cd SoftwareEngineeringWorkbench- Install dependencies using
uv:
uv syncOr using pip:
pip install -e .- Set up your Gemini API key:
- Get an API key from Google AI Studio
- Copy
.env.exampleto.env - Add your API key to the
.envfile:
GEMINI_API_KEY=your_api_key_here
Launch the interactive web application:
uv run streamlit run streamlit_app.pyOr if you've activated the virtual environment:
streamlit run streamlit_app.pyThe web app will open at http://localhost:8501 with the following features:
- Chat Tab - Interactive requirements gathering with Ada (AI assistant)
- Summary Tab - Review chat history and extract requirements
- Documents Tab - Upload supporting documents (PDF, DOCX, TXT, MD)
- Architecture Tab - Generate and download solution architecture
Run the command-line interface:
uv run python main.pyOr if you've activated the virtual environment:
python main.pyThe CLI offers the following options:
- Chat with AI - Interactive requirements gathering
- Add Requirements Manually - Direct requirement input
- Upload Supporting Documents - Process PDFs, DOCX, etc.
- Review Requirements - View all collected information
- Generate Architecture - Create the solution architecture
- Exit - Close the application
from architecture_generator import ArchitectureGenerator
from document_processor import DocumentProcessor
from models import UserRequirement, SupportingDocument
# Initialize
generator = ArchitectureGenerator()
doc_processor = DocumentProcessor()
# Define requirements
requirements = [
UserRequirement(
requirement="Build a scalable e-commerce platform",
priority="High",
category="Functional"
),
UserRequirement(
requirement="Support 10,000 concurrent users",
priority="High",
category="Non-functional"
)
]
# Process documents (optional)
docs = doc_processor.process_multiple_documents([
"requirements.pdf",
"api_spec.docx"
])
# Generate architecture
architecture = generator.generate_architecture(
requirements=requirements,
supporting_docs=docs
)
print(architecture)
# Save to file
generator.export_architecture(architecture, "solution_architecture.md")from architecture_generator import ArchitectureGenerator
generator = ArchitectureGenerator()
generator.start_chat_session()
# Interactive conversation
response = generator.chat("I want to build a social media platform")
print(response)
response = generator.chat("It should support real-time messaging")
print(response)SoftwareEngineeringWorkbench/
├── streamlit_app.py # Web interface (Streamlit)
├── main.py # CLI entry point
├── cli.py # Interactive CLI interface
├── automated_architecture.py # Batch/automated processing
├── architecture_generator.py # Core architecture generation logic
├── document_processor.py # Document processing utilities
├── models.py # Pydantic data models
├── config.py # Configuration settings
├── .env.example # Environment variables template
├── .streamlit/config.toml # Streamlit theme configuration
├── pyproject.toml # Project dependencies
└── README.md # This file
Edit config.py to customize:
- Model Selection: Change
GEMINI_MODEL(default: gemini-2.0-flash-exp) - Generation Settings: Adjust temperature, top_p, max_tokens
- Safety Settings: Configure content filtering
- File Support: Modify supported document formats
The generated architecture includes:
- Executive Summary - High-level overview
- Architecture Pattern - Chosen pattern with detailed reasoning
- System Components - Each component with technology choices and rationale
- Technology Stack - Frontend, backend, database, infrastructure
- Data Architecture - Storage strategy and data flow
- Non-Functional Requirements - Scalability, security, performance
- Deployment Strategy - CI/CD, environments, deployment approach
- Integration Points - APIs, external systems, auth
- Trade-offs - Decisions made, risks, mitigation strategies
- Architecture Diagram Description - Textual component relationships
- Python 3.13+
- Gemini API key
- Dependencies (auto-installed):
- google-generativeai
- streamlit
- python-dotenv
- rich
- pydantic
- pypdf
- python-docx
- Be Specific: Provide detailed requirements with context
- Use Chat Mode: Interactive conversations help clarify ambiguities
- Add Documents: Supporting docs provide valuable context
- Specify Constraints: Mention budget, timeline, team size, existing systems
- Review Generated Architecture: AI suggestions should be validated by experts
API Key Issues:
- Verify your API key in
.envfile - Check key permissions at Google AI Studio
Document Processing Errors:
- Ensure files are not password-protected
- Check file size limits (default: 10MB)
- Verify file format is supported
Import Errors:
- Run
uv syncorpip install -e .to install dependencies - Ensure Python 3.13+ is installed
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - See LICENSE file for details
Powered by Google Gemini 2.5 Flash