/ai-architect-planner

An AI-based architecht and planner for planning development of new projects

Primary LanguagePythonMIT LicenseMIT

codecov

๐Ÿ—๏ธ AI Architect Planner

๐Ÿค– Your AI-powered companion for architecting enterprise-ready applications

โœจ Features

๐ŸŽฏ Smart Architecture Planning

  • Enterprise-grade application scaffolding
  • Best practices implementation
  • Technology stack optimization
  • Project structure generation

๐Ÿง  AI-Powered Design

  • Architecture pattern recommendations
  • Technology stack suggestions
  • Security considerations
  • Scalability strategies

๐ŸŽจ Interactive Experience

  • User-friendly CLI interface
  • Guided project setup
  • Detailed documentation generation
  • Clear project organization

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.11 or higher
  • Git
  • PowerShell 7+

Installation

Option 1: Manual Setup

1๏ธโƒฃ Clone the repository:

git clone https://github.com/w3bdesign/ai-architect-planner.git
cd ai-architect-planner

2๏ธโƒฃ Create and activate virtual environment:

python -m venv venv

# Windows
venv\Scripts\activate

# Unix/MacOS
source venv/bin/activate

3๏ธโƒฃ Install in development mode:

pip install -e ".[dev]"

Option 2: Automated Setup (Windows PowerShell)

After cloning the repository, you can use our automated setup script:

pwsh setup.ps1

This script will automatically:

  • Verify Python 3.11+ is installed
  • Create and activate a virtual environment
  • Install the package in development mode

๐Ÿ’ป Usage

Start the interactive planning session:

python -m ai_architect_planner

The tool will:

  1. Guide you through project setup
  2. Generate project structure
  3. Create detailed architecture documentation
  4. Provide technology recommendations

Generated Project Structure

For each project, the tool creates:

your-project/
โ”œโ”€โ”€ src/           # Source code
โ”œโ”€โ”€ docs/          # Documentation
โ”‚   โ””โ”€โ”€ ARCHITECT.md  # Architecture document
โ””โ”€โ”€ tests/         # Test files

๐Ÿ›๏ธ Project Structure

ai_architect_planner/
โ”œโ”€โ”€ core/          # Core functionality
โ”‚   โ”œโ”€โ”€ interaction.py  # User interaction
โ”‚   โ””โ”€โ”€ project.py      # Project operations
โ”œโ”€โ”€ services/      # Service modules
โ”‚   โ””โ”€โ”€ llm.py         # AI service (mock)
โ”œโ”€โ”€ utils/         # Utilities
โ”‚   โ”œโ”€โ”€ config.py          # Configuration
โ”‚   โ”œโ”€โ”€ constants.py       # Constants
โ”‚   โ””โ”€โ”€ type_definitions.py # Type hints
โ””โ”€โ”€ cli/           # CLI interface
    โ””โ”€โ”€ cli.py          # Main CLI

Module Overview

Core

  • interaction.py: User interaction handling
  • project.py: Project structure operations

Services

  • llm.py: AI service for architecture analysis (currently mocked)

Utils

  • config.py: Project-wide configuration
  • constants.py: Shared constants
  • type_definitions.py: TypeScript-like type hints

CLI

  • cli.py: Main CLI interface

๐Ÿงช Testing

The project uses pytest for testing and maintains code coverage through Codecov integration.

Running Tests Locally

# Run all tests with coverage
pytest --cov=ai_architect_planner --cov-report=term

# Run specific test file
pytest tests/cli/test_cli.py -v

Continuous Integration

Our GitHub Actions workflow automatically runs on push and pull requests to the main branch, performing:

  1. Environment Setup

    • Python 3.11 setup
    • Installation of dependencies
  2. Code Quality

    • Linting with Ruff
    • Format checking with Ruff (non-blocking)
  3. Testing

    • Runs pytest with multiple coverage reports:
      • XML report for Codecov
      • HTML report for local viewing
      • Terminal output for immediate feedback
    • Generates JUnit XML test results
  4. Artifacts

    • Uploads test results and coverage reports as artifacts
    • Pushes coverage data to Codecov for tracking

View the latest coverage reports on Codecov.

Test Structure

tests/
โ”œโ”€โ”€ cli/          # CLI tests
โ”œโ”€โ”€ core/         # Core module tests
โ”œโ”€โ”€ services/     # Service tests
โ””โ”€โ”€ utils/        # Utility tests

๐Ÿ“š Generated Documentation

The tool generates a comprehensive ARCHITECT.md in your project containing:

  • ๐Ÿ“ System Architecture
  • ๐Ÿ”ง Technology Stack
  • ๐Ÿ› ๏ธ Implementation Guidelines
  • ๐Ÿ”’ Security Considerations
  • ๐Ÿ“ˆ Scaling Strategies

๐Ÿ”„ Development Workflow

  1. Create feature branch
  2. Make changes
  3. Run tests and linting:
    # Run tests with coverage
    pytest --cov=ai_architect_planner --cov-report=term
    
    # Run Ruff for linting and formatting
    ruff check
    ruff format
  4. Submit pull request

๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE file for details.


Made with โค๏ธ by AI enthusiasts for AI developers