# Docker kurulu olmalı
docker --version
docker-compose --version
# Git kurulu olmalı
git --version# Repository'yi clone et
git clone https://github.com/Tehlikeli107/universal-ai-dev-assistant.git
cd universal-ai-dev-assistant# Tüm servisleri başlat
docker-compose up -d
# Servislerin durumunu kontrol et
docker-compose ps
# Logları izle
docker-compose logs -f# Health check
curl http://localhost:8080/health
# API test
curl -X POST http://localhost:8080/api/v1/complete \
-H "Content-Type: application/json" \
-d '{
"prompt": "def fibonacci(n):",
"language": "python",
"max_tokens": 100
}'# Rust kurulumu
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Backend'i derle
cd backend
cargo build --release
# Veritabanını başlat
docker-compose up -d postgres redis
# Migration'ları çalıştır
cargo sqlx migrate run
# Backend'i çalıştır
cargo run --release# Node.js kurulumu (18+)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# Frontend'i derle
cd frontend
npm install
npm run build
# Development server
npm run dev# Kubernetes cluster'ında deploy et
cd k8s
kubectl apply -f namespace.yaml
kubectl apply -f configmap.yaml
kubectl apply -f postgres.yaml
kubectl apply -f backend.yaml
kubectl apply -f frontend.yaml
kubectl apply -f ingress.yaml# AWS EKS
eksctl create cluster --name uaida-cluster
# Google GKE
gcloud container clusters create uaida-cluster
# Azure AKS
az aks create --name uaida-clustercurl http://localhost:8080/healthcurl -X POST http://localhost:8080/api/v1/complete \
-H "Content-Type: application/json" \
-d '{
"prompt": "function calculateSum(a, b) {",
"language": "javascript",
"max_tokens": 50,
"temperature": 0.7,
"provider": "openai"
}'curl -X POST http://localhost:8080/api/v1/analyze \
-H "Content-Type: application/json" \
-d '{
"code": "def unsafe_function(user_input): exec(user_input)",
"language": "python",
"analysis_types": ["security", "performance"]
}'curl -X POST http://localhost:8080/api/v1/search \
-H "Content-Type: application/json" \
-d '{
"query": "authentication function",
"language": "rust",
"limit": 10
}'curl http://localhost:8080/api/v1/providers# Birden fazla dosyayı analiz et
for file in *.py; do
curl -X POST http://localhost:8080/api/v1/analyze \
-H "Content-Type: application/json" \
-d "{\"code\": \"$(cat $file)\", \"language\": \"python\"}"
done# Streaming kod tamamlama
curl -X POST http://localhost:8080/api/v1/complete/stream \
-H "Content-Type: application/json" \
-d '{
"prompt": "class DatabaseManager:",
"language": "python",
"stream": true
}'# API key ile
curl -X POST http://localhost:8080/api/v1/complete \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "code here", "language": "python"}'# quick_start.sh oluştur
cat > quick_start.sh << 'EOF'
#!/bin/bash
echo "🚀 Universal AI Dev Assistant - Quick Start"
# Docker kontrol
if ! command -v docker &> /dev/null; then
echo "❌ Docker not found. Please install Docker first."
exit 1
fi
# Servisleri başlat
echo "📦 Starting services..."
docker-compose up -d
# Health check
echo "🔍 Checking health..."
sleep 10
curl -s http://localhost:8080/health | jq '.' || echo "⚠️ Service starting..."
echo "✅ Universal AI Dev Assistant is ready!"
echo "🌐 Web UI: http://localhost:3000"
echo "📡 API: http://localhost:8080"
EOF
chmod +x quick_start.sh
./quick_start.sh# test_api.sh oluştur
cat > test_api.sh << 'EOF'
#!/bin/bash
echo "🧪 Testing Universal AI Dev Assistant API"
BASE_URL="http://localhost:8080"
# Test 1: Health
echo "1️⃣ Testing health endpoint..."
curl -s "$BASE_URL/health" | jq '.'
# Test 2: Completion
echo "2️⃣ Testing completion..."
curl -s -X POST "$BASE_URL/api/v1/complete" \
-H "Content-Type: application/json" \
-d '{"prompt": "def hello():", "language": "python"}' | jq '.'
# Test 3: Providers
echo "3️⃣ Testing providers..."
curl -s "$BASE_URL/api/v1/providers" | jq '.'
echo "✅ API tests completed!"
EOF
chmod +x test_api.sh
./test_api.sh# dev_helper.sh oluştur
cat > dev_helper.sh << 'EOF'
#!/bin/bash
case "$1" in
"start")
echo "🚀 Starting development environment..."
docker-compose up -d postgres redis
cd backend && cargo run &
cd frontend && npm run dev &
;;
"stop")
echo "🛑 Stopping services..."
docker-compose down
pkill -f "cargo run"
pkill -f "npm run dev"
;;
"logs")
echo "📋 Showing logs..."
docker-compose logs -f
;;
"test")
echo "🧪 Running tests..."
./test_api.sh
;;
*)
echo "Usage: $0 {start|stop|logs|test}"
;;
esac
EOF
chmod +x dev_helper.sh# Tüm servislerin logları
docker-compose logs -f
# Sadece backend logları
docker-compose logs -f uaida-backend
# Sadece database logları
docker-compose logs -f postgres# Resource kullanımı
docker stats
# API response times
curl -w "@curl-format.txt" -s http://localhost:8080/health
# curl-format.txt dosyası:
cat > curl-format.txt << 'EOF'
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
EOF# Port kontrolü
netstat -tulpn | grep :8080
# Service durumu
docker-compose ps
# Container içine gir
docker-compose exec uaida-backend bash
# Database bağlantısı test et
docker-compose exec postgres psql -U uaida -d uaida -c "SELECT 1;"# 1. Projeyi başlat
./quick_start.sh
# 2. Kod yaz ve AI'dan yardım al
curl -X POST http://localhost:8080/api/v1/complete \
-H "Content-Type: application/json" \
-d '{"prompt": "// TODO: implement user authentication", "language": "javascript"}'
# 3. Kodu analiz et
curl -X POST http://localhost:8080/api/v1/analyze \
-H "Content-Type: application/json" \
-d '{"code": "$(cat myfile.js)", "language": "javascript"}'# GitHub Actions'da kullanım
- name: Code Analysis
run: |
curl -X POST ${{ secrets.UAIDA_URL }}/api/v1/analyze \
-H "Authorization: Bearer ${{ secrets.UAIDA_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"code": "$(cat src/main.rs)", "language": "rust"}'# Team için shared instance
docker-compose -f docker-compose.production.yml up -d
# Load balancer ile
nginx -c nginx.conf# 1. Servisler çalışıyor mu?
curl http://localhost:8080/health
# Beklenen: {"status": "healthy", "version": "6.4.0"}
# 2. AI providers mevcut mu?
curl http://localhost:8080/api/v1/providers
# Beklenen: 8 provider listesi
# 3. Kod tamamlama çalışıyor mu?
curl -X POST http://localhost:8080/api/v1/complete \
-H "Content-Type: application/json" \
-d '{"prompt": "def test():", "language": "python"}'
# Beklenen: AI suggestions
# 4. Web UI erişilebilir mi?
curl http://localhost:3000
# Beklenen: React app HTML🎉 Tüm kontroller başarılıysa Universal AI Development Assistant kullanıma hazır!