120 lines
2.9 KiB
Markdown
120 lines
2.9 KiB
Markdown
# ACI AI Fixer
|
|
|
|
AI system for automated JIRA Support Case analysis with COBOL/SQL/JCL code intelligence.
|
|
|
|
## Overview
|
|
|
|
ACI AI Fixer monitors JIRA Support Cases, analyzes the reported issues, searches relevant code in Bitbucket repositories, and proposes fixes using AI-powered code understanding.
|
|
|
|
## Architecture
|
|
|
|
```
|
|
JIRA (webhook) → Event Processor → Code Intelligence → Fix Generator → Output (JIRA + PR)
|
|
```
|
|
|
|
## Stack
|
|
|
|
- **Backend:** Python 3.11+ / FastAPI
|
|
- **Vector DB:** Qdrant (embeddings)
|
|
- **Queue:** Redis + Bull
|
|
- **Database:** PostgreSQL
|
|
- **LLM:** Azure OpenAI GPT-4o / OpenRouter (dev)
|
|
- **Embeddings:** MiniLM-L6-v2 (local) / Azure OpenAI (prod)
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
aci-ai-fixer/
|
|
├── api/ # FastAPI backend
|
|
│ ├── main.py
|
|
│ ├── routers/
|
|
│ │ ├── webhook.py # JIRA/Bitbucket webhooks
|
|
│ │ ├── issues.py # Issue management
|
|
│ │ └── config.py # Configuration API
|
|
│ ├── services/
|
|
│ │ ├── jira.py # JIRA client
|
|
│ │ ├── bitbucket.py # Bitbucket client
|
|
│ │ ├── llm.py # LLM orchestration
|
|
│ │ └── embeddings.py # Code indexing
|
|
│ └── models/
|
|
├── portal/ # React admin UI
|
|
│ ├── src/
|
|
│ └── package.json
|
|
├── workers/ # Background processors
|
|
│ ├── analyzer.py
|
|
│ └── indexer.py
|
|
├── tests/
|
|
├── docker-compose.yml
|
|
├── .env.example
|
|
└── README.md
|
|
```
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
# Clone
|
|
git clone https://gitea.startdata.com.br/startdata/aci-ai-fixer.git
|
|
cd aci-ai-fixer
|
|
|
|
# Configure
|
|
cp .env.example .env
|
|
# Edit .env with your credentials
|
|
|
|
# Run (development)
|
|
docker compose up -d
|
|
|
|
# Access portal
|
|
open https://localhost:8080
|
|
```
|
|
|
|
## Development
|
|
|
|
### Requirements
|
|
|
|
- Python 3.11+
|
|
- Node.js 20+
|
|
- Docker & Docker Compose
|
|
- Redis
|
|
- PostgreSQL (or SQLite for dev)
|
|
|
|
### Local Setup
|
|
|
|
```bash
|
|
# Backend
|
|
cd api
|
|
python -m venv venv
|
|
source venv/bin/activate
|
|
pip install -r requirements.txt
|
|
uvicorn main:app --reload
|
|
|
|
# Portal
|
|
cd portal
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
## Configuration
|
|
|
|
All configuration is done via the Admin Portal or environment variables:
|
|
|
|
| Variable | Description | Required |
|
|
|----------|-------------|----------|
|
|
| `JIRA_URL` | JIRA Server URL | Yes |
|
|
| `JIRA_TOKEN` | JIRA API Token | Yes |
|
|
| `BITBUCKET_URL` | Bitbucket Server URL | Yes |
|
|
| `BITBUCKET_TOKEN` | Bitbucket Access Token | Yes |
|
|
| `AZURE_OPENAI_ENDPOINT` | Azure OpenAI endpoint | Yes (prod) |
|
|
| `AZURE_OPENAI_KEY` | Azure OpenAI API key | Yes (prod) |
|
|
| `OPENROUTER_API_KEY` | OpenRouter key | Yes (dev) |
|
|
| `DATABASE_URL` | PostgreSQL connection | Yes |
|
|
| `REDIS_URL` | Redis connection | Yes |
|
|
|
|
## License
|
|
|
|
Proprietary - StartData Tecnologia
|
|
|
|
## Contact
|
|
|
|
- **Email:** startdata.tecnologia@gmail.com
|
|
- **Developer:** Ricel Leite
|