Skip to content

niy-ati/decision-intelligence-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Decision Intelligence Platform

A production-grade Decision Comparison Platform for AWS Builder Center that compares multiple technical options using AI-powered analysis.

🎯 Overview

The Decision Intelligence Platform helps technical teams make informed decisions by:

  • Comparing multiple technical options (APIs, cloud services, stacks, architectures)
  • Accepting constraints (budget, latency, scale, region, compliance, team skills)
  • Scoring each option with transparent methodology
  • Generating explicit trade-offs between options
  • Providing AI-powered explanations and recommendations
  • Never giving only one answer β€” always comparing multiple options

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      β”‚    β”‚    Backend      β”‚    β”‚   Kiro Agent    β”‚
β”‚   (Next.js)     │◄──►│   (FastAPI)     │◄──►│   (AI Analysis) β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚   Database      β”‚
                       β”‚   (SQLite)      β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Docker and Docker Compose
  • Git

1. Clone and Start

git clone <repository-url>
cd decision-intelligence-platform
docker-compose up --build

3. Try the Examples

The platform includes pre-loaded examples:

  • API Gateway Selection: Compare AWS API Gateway, Kong, and Nginx Plus
  • Database Selection: Compare RDS PostgreSQL, DynamoDB, and MongoDB Atlas

πŸ“Š How It Works

1. Input Your Decision

  • Use Case: Describe what you're building
  • Constraints: Set your budget, latency, scale, compliance, and team skill requirements
  • Options: Add 2+ technical options to compare

2. AI Analysis

The Kiro agent analyzes your options using:

  • Weighted Scoring: Each option scored across 6 dimensions
  • Trade-off Analysis: Identifies where options win/lose against each other
  • Risk Assessment: Highlights potential risks for each choice
  • Scenario Mapping: Shows which option is best for different situations

3. Get Results

  • Score Table: Transparent scoring across all dimensions
  • Trade-off Matrix: Visual comparison of strengths/weaknesses
  • AI Insights: Key findings and patterns
  • Multiple Recommendations: Context-dependent suggestions
  • Risk Factors: Potential issues to consider

πŸ”§ Configuration

Scoring Weights

Default weights (can be customized in backend/scoring.py):

  • Cost: 25%
  • Latency: 20%
  • Scalability: 20%
  • Compliance: 15%
  • Cloud Preference: 10%
  • Team Skills: 10%

Kiro Agent Settings

Configure the AI agent in .kiro/decision_agent.yaml:

  • Model parameters
  • Analysis prompts
  • Decision rules
  • Integration settings

πŸ› οΈ Development

Backend Development

cd backend
pip install -r requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend Development

cd frontend
npm install
npm run dev

Database Management

The SQLite database is automatically created. To reset:

docker-compose down -v
docker-compose up --build

πŸ“ Project Structure

decision-intelligence-platform/
β”œβ”€β”€ backend/                 # FastAPI backend
β”‚   β”œβ”€β”€ main.py             # API endpoints
β”‚   β”œβ”€β”€ decision_engine.py  # Core decision logic
β”‚   β”œβ”€β”€ scoring.py          # Scoring algorithms
β”‚   β”œβ”€β”€ tradeoffs.py        # Trade-off analysis
β”‚   β”œβ”€β”€ kiro_agent.py       # AI agent integration
β”‚   β”œβ”€β”€ models.py           # Data models
β”‚   β”œβ”€β”€ db.py               # Database operations
β”‚   β”œβ”€β”€ requirements.txt    # Python dependencies
β”‚   └── Dockerfile          # Backend container
β”œβ”€β”€ frontend/               # Next.js frontend
β”‚   β”œβ”€β”€ pages/index.tsx     # Main page
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”œβ”€β”€ styles.css          # Global styles
β”‚   β”œβ”€β”€ package.json        # Node dependencies
β”‚   └── Dockerfile          # Frontend container
β”œβ”€β”€ .kiro/                  # Kiro agent configuration
β”‚   └── decision_agent.yaml # Agent settings
β”œβ”€β”€ docker-compose.yml      # Container orchestration
└── README.md              # This file

πŸ” API Endpoints

Core Endpoints

  • POST /compare - Submit comparison request
  • GET /comparisons/{id} - Retrieve specific comparison
  • GET /comparisons - List recent comparisons
  • GET /health - Health check

Example API Usage

curl -X POST "http://localhost:8000/compare" \
  -H "Content-Type: application/json" \
  -d '{
    "use_case": "API Gateway Selection",
    "options": [...],
    "constraints": {...}
  }'

🎨 Customization

Adding New Scoring Dimensions

  1. Update models.py to add new fields
  2. Modify scoring.py to include new scoring logic
  3. Update frontend forms in CompareForm.tsx

Custom Decision Rules

Add rules in .kiro/decision_agent.yaml:

decision_rules:
  - name: "custom_rule"
    condition: "custom_condition"
    action: "custom_action"

Styling

  • Global styles: frontend/styles.css
  • Component styles: Inline JSX styles in components
  • Theme colors: Update CSS variables

πŸ”’ Security

  • Input validation on all API endpoints
  • CORS configuration for cross-origin requests
  • SQL injection protection via parameterized queries
  • Rate limiting (configurable)
  • Health checks for all services

πŸ“ˆ Monitoring

Health Checks

All services include health endpoints:

  • Backend: /health
  • Frontend: Built-in Next.js health
  • Database: Connection validation

Logging

  • Backend: FastAPI automatic logging
  • Frontend: Console logging for errors
  • Agent: Configurable log levels

πŸš€ Production Deployment

Environment Variables

# Backend
DATABASE_URL=sqlite:///app/data/decisions.db
CORS_ORIGINS=https://yourdomain.com

# Frontend  
NEXT_PUBLIC_API_URL=https://api.yourdomain.com
NODE_ENV=production

Production Profile

docker-compose --profile production up -d

This includes:

  • Nginx reverse proxy
  • SSL termination (configure certificates)
  • Production optimizations

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

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

πŸ†˜ Support

For issues and questions:

  1. Check the Issues page
  2. Review the API documentation at /docs
  3. Check Docker logs: docker-compose logs

πŸ”„ Updates

The platform is designed for easy updates:

  • Backend: Update Python packages in requirements.txt
  • Frontend: Update Node packages in package.json
  • Agent: Modify .kiro/decision_agent.yaml
  • Infrastructure: Update docker-compose.yml

Built for AWS Builder Center - Empowering technical teams to make better decisions through AI-powered analysis.

decision-intelligence-platform

018f462924f5c88daddadbe13eb658b5282f5ecb

About

A Decision Intelligence Platform that finally answers 'It Depends.' This deterministic engine ingests architectural options and evaluates them against strict constraints like budget or latency. Built with FastAPI, React, and a specialized AI agent, it delivers weighted scores, actionable tradeoff analysis instead of generic documentation summaries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors