Skip to content

motoraif/TorWAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ TorWAR - AWS Well-Architected Review Tool

Toraif's Well-Architected Review Tool - A streamlined, user-friendly web application for conducting comprehensive AWS Well-Architected Framework reviews with advanced report generation and management capabilities.

Author: Mohamed Toraif
Created: 2024 License: MIT

Python Flask AWS Bootstrap

🌟 Features

πŸ” Authentication & Security

  • AWS Profile Authentication: Secure authentication using AWS CLI profiles
  • Session Management: Persistent sessions with automatic timeout
  • Multi-Account Support: Switch between different AWS accounts seamlessly

πŸ—οΈ Workload Management

  • Create Workloads: Set up new Well-Architected workloads
  • Workload Selection: Easy workload switching and management
  • Account Integration: Direct integration with AWS Well-Architected Tool

πŸ“‹ Review Process

  • Interactive Questionnaire: User-friendly interface for framework questions
  • Pillar-based Reviews: Comprehensive coverage of all 6 Well-Architected pillars:
    • πŸ›οΈ Operational Excellence
    • πŸ”’ Security
    • πŸ›‘οΈ Reliability
    • ⚑ Performance Efficiency
    • πŸ’° Cost Optimization
    • ♻️ Sustainability
  • Progress Tracking: Real-time completion status and progress indicators
  • Risk Assessment: Automatic risk level calculation and categorization

πŸ“Š Report Generation & Management

  • Professional Reports: Clean, print-ready reports with comprehensive analysis
  • Multiple Formats: Optimized for both web viewing and printing
  • Report Versioning: Track changes and improvements over time
  • Report Comparison: Side-by-side comparison of different report versions
  • Export Options: Print-friendly layouts with professional styling

🎨 User Experience

  • Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
  • Intuitive Navigation: Clean, organized interface with logical flow
  • Real-time Feedback: Instant validation and progress updates
  • Accessibility: WCAG-compliant design for inclusive access

πŸš€ Quick Start

Prerequisites

  • Python 3.8+ installed on your system
  • AWS CLI configured with valid credentials
  • AWS Account with Well-Architected Tool access
  • Modern Web Browser (Chrome, Firefox, Safari, Edge)

Installation

  1. Clone the repository:
git clone https://github.com/your-username/TorWAF.git
cd TorWAF
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure AWS credentials:
# Option 1: Using AWS CLI
aws configure --profile torwar-profile

# Option 2: Using environment variables
export AWS_ACCESS_KEY_ID=your-access-key
export AWS_SECRET_ACCESS_KEY=your-secret-key
export AWS_DEFAULT_REGION=us-east-1
  1. Set up environment (optional):
cp .env.example .env
# Edit .env with your preferred settings

Running the Application

  1. Start the server:
python3 app.py
  1. Access the application:

    • Open your browser and navigate to: http://localhost:5000
    • Or access via network: http://your-ip:5000
  2. Begin your review:

    • Authenticate with your AWS profile
    • Create or select a workload
    • Start your Well-Architected review

πŸ”§ Configuration

Environment Variables

Create a .env file in the root directory:

# Application Settings
SECRET_KEY=your-secret-key-here
DEBUG=False
PORT=5000

# AWS Settings (optional - can use AWS CLI profiles instead)
AWS_DEFAULT_REGION=us-east-1
AWS_PROFILE=torwar-profile

# Application Behavior
AUTO_SAVE_INTERVAL=300  # Auto-save every 5 minutes
MAX_REPORTS_PER_WORKLOAD=10

AWS Permissions

Your AWS user/role needs the following permissions:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "wellarchitected:*"
            ],
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "sts:GetCallerIdentity",
                "iam:ListAccountAliases"
            ],
            "Resource": "*"
        }
    ]
}

πŸ“ Project Structure

TorWAF/
β”œβ”€β”€ πŸ“„ app.py                      # Main Flask application
β”œβ”€β”€ πŸ” aws_auth.py                 # AWS authentication logic
β”œβ”€β”€ πŸ›£οΈ aws_auth_routes.py          # Authentication routes
β”œβ”€β”€ πŸ”§ aws_helper.py               # AWS session management
β”œβ”€β”€ πŸ“Š report_manager.py           # Report generation & management
β”œβ”€β”€ πŸ“‹ requirements.txt            # Python dependencies
β”œβ”€β”€ βš™οΈ .env.example                # Environment configuration template
β”œβ”€β”€ 🎨 templates/                  # HTML templates
β”‚   β”œβ”€β”€ 🏠 index.html              # Homepage
β”‚   β”œβ”€β”€ πŸ“ answer_question.html    # Question interface
β”‚   β”œβ”€β”€ πŸ“Š generate_report.html    # Report generation
β”‚   β”œβ”€β”€ πŸ’Ύ saved_reports.html      # Report management
β”‚   β”œβ”€β”€ πŸ” compare_reports.html    # Report comparison
β”‚   └── 🎯 base.html               # Base template
β”œβ”€β”€ 🎨 static/                     # Static assets
β”‚   └── πŸ–ΌοΈ logo.svg               # TorWAR logo
β”œβ”€β”€ πŸ’Ύ data/                       # Application data
β”‚   β”œβ”€β”€ πŸ“Š reports/                # Saved reports
β”‚   β”‚   β”œβ”€β”€ metadata/              # Report metadata
β”‚   β”‚   └── workloads/             # Workload data
β”‚   └── πŸ—οΈ workloads/             # Workload configurations
β”œβ”€β”€ πŸ§ͺ testing/                    # Test files and documentation
└── πŸ“ logs/                       # Application logs

🎯 Usage Guide

1. Initial Setup

  • Launch the application and navigate to the homepage
  • Click "AWS Login" to authenticate with your AWS credentials
  • Select your preferred AWS region and profile

2. Workload Management

  • Create a new workload or select an existing one
  • Provide workload details (name, description, environment)
  • Configure workload-specific settings

3. Conducting Reviews

  • Select pillars to review (or choose "All Pillars")
  • Answer questions for each pillar systematically
  • Use the help hints and best practices provided
  • Save progress automatically or manually

4. Report Generation

  • Generate comprehensive reports after completing reviews
  • Customize report names and add notes
  • View reports in clean, professional format
  • Print or export reports as needed

5. Report Management

  • Access all saved reports from the Reports menu
  • Compare different versions of reports
  • Track improvements and changes over time
  • Delete outdated reports when needed

πŸ” Key Features Explained

Simplified Report Viewing

  • Clean, chart-free interface for easy reading
  • Color-coded risk indicators (Red=High, Yellow=Medium, Blue=Low, Green=None)
  • Print-optimized layouts
  • No auto-scrolling or animations

Report Comparison

  • Side-by-side comparison of any two reports
  • Highlight changes and improvements
  • Track risk reduction over time
  • Identify areas needing attention

Responsive Design

  • Works on all device sizes
  • Touch-friendly interface for tablets
  • Keyboard navigation support
  • High contrast mode available

πŸ› οΈ Development

Running in Development Mode

# Enable debug mode
export FLASK_ENV=development
export DEBUG=True
python3 app.py

Testing

# Run basic functionality tests
cd testing/
python3 -m pytest

# Manual testing endpoints
curl http://localhost:5000/health
curl http://localhost:5000/saved_reports

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and test thoroughly
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to the branch: git push origin feature/amazing-feature
  6. Open a Pull Request

πŸ› Troubleshooting

Common Issues

Q: "Error loading saved reports" or template errors

  • A: All template issues have been resolved in the latest version. Ensure you're using the updated codebase.

Q: AWS authentication fails

  • A: Check your AWS credentials and permissions. Ensure the Well-Architected service is available in your region.

Q: Reports not saving

  • A: Verify write permissions to the data/reports/ directory.

Q: Page keeps scrolling or charts not loading

  • A: The UI has been simplified to remove problematic animations and charts.

Getting Help

  • πŸ“§ Issues: Open an issue on GitHub
  • πŸ“– Documentation: Check the testing/ directory for detailed guides
  • πŸ”§ Configuration: Review the .env.example file for all options

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • AWS Well-Architected Framework for the comprehensive review methodology
  • Flask Community for the excellent web framework
  • Bootstrap Team for the responsive UI components
  • Contributors who helped improve and test the application

πŸš€ What's Next?

  • πŸ“Š Enhanced analytics and trending
  • πŸ”„ Automated report scheduling
  • πŸ‘₯ Multi-user collaboration features
  • πŸ“± Mobile app companion
  • πŸ”— Integration with other AWS services

Created by Mohamed Toraif with ❀️ in Bahrain πŸ‡§πŸ‡­

TorWAR - Making AWS Well-Architected Reviews Simple and Effective

Β© 2024 Mohamed Toraif. Licensed under MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published