397 lines
7.4 KiB
Markdown
397 lines
7.4 KiB
Markdown
# 🎉 DanteGPU Projesi ÇALIŞIYOR!
|
||
|
||
{🙏 Don't worry about what the f😳ck I be doing, I'm Mock King AKINCI}
|
||
|
||
**Tarih**: 6 Ekim 2025
|
||
**Durum**: ✅ **ÇALIŞIYOR VE TEST EDİLEBİLİR**
|
||
|
||
---
|
||
|
||
## ✅ ÇALIŞAN SERVİSLER
|
||
|
||
### 🔧 Backend API Server
|
||
- **URL**: http://localhost:8080
|
||
- **Durum**: ✅ ÇALIŞIYOR
|
||
- **Terminal**: Terminal ID 20
|
||
- **Özellikler**:
|
||
- Mock data ile tam fonksiyonel API
|
||
- 3 GPU (RTX 4090, A100, RTX 3090)
|
||
- Wallet sistemi (1000 dGPU başlangıç)
|
||
- Rental ve job simülasyonu
|
||
|
||
### 💻 Frontend Application
|
||
- **URL**: http://localhost:3000
|
||
- **Durum**: ✅ ÇALIŞIYOR
|
||
- **Terminal**: Terminal ID 22
|
||
- **Özellikler**:
|
||
- React + Vite
|
||
- Modern UI
|
||
- Real-time updates
|
||
- Wallet integration
|
||
|
||
---
|
||
|
||
## 🌐 ERİŞİM BİLGİLERİ
|
||
|
||
### Ana Uygulama
|
||
**🔗 http://localhost:3000**
|
||
|
||
Browser'ınızda otomatik açıldı! Eğer açılmadıysa yukarıdaki linke tıklayın.
|
||
|
||
### API Endpoints
|
||
**🔗 http://localhost:8080**
|
||
|
||
Test için:
|
||
```bash
|
||
# Health check
|
||
curl http://localhost:8080/health
|
||
|
||
# GPU listesi
|
||
curl http://localhost:8080/api/v1/gpus
|
||
|
||
# Stats
|
||
curl http://localhost:8080/api/v1/stats
|
||
```
|
||
|
||
---
|
||
|
||
## 🎮 NASIL TEST EDERSİNİZ?
|
||
|
||
### 1️⃣ Kullanıcı Kaydı
|
||
|
||
Browser'da http://localhost:3000 açık olmalı.
|
||
|
||
**Kayıt Bilgileri:**
|
||
- Email: `test@dantegpu.com`
|
||
- Password: `Test123!@#`
|
||
- Username: `testuser`
|
||
|
||
veya istediğiniz bilgileri kullanabilirsiniz!
|
||
|
||
### 2️⃣ Login
|
||
|
||
Kayıt olduktan sonra aynı bilgilerle login olun.
|
||
|
||
### 3️⃣ Wallet Oluştur
|
||
|
||
Dashboard'da "Create Wallet" veya "Connect Wallet" butonuna tıklayın.
|
||
- Otomatik olarak 1000 dGPU ile wallet oluşturulacak
|
||
- Solana adresi: `7xUV6YR3rZMfExPqZiovQSUxpnHxr2KJJqFg1bFrpump`
|
||
|
||
### 4️⃣ GPU'ları Görüntüle
|
||
|
||
"Browse GPUs" veya "Marketplace" menüsüne gidin.
|
||
|
||
**Mevcut GPU'lar:**
|
||
1. **NVIDIA RTX 4090**
|
||
- VRAM: 24GB
|
||
- Price: 2.5 dGPU/hour
|
||
- Location: US-West
|
||
|
||
2. **NVIDIA A100**
|
||
- VRAM: 40GB
|
||
- Price: 5.0 dGPU/hour
|
||
- Location: EU-Central
|
||
|
||
3. **NVIDIA RTX 3090**
|
||
- VRAM: 24GB
|
||
- Price: 1.8 dGPU/hour
|
||
- Location: Asia-East
|
||
|
||
### 5️⃣ GPU Kirala
|
||
|
||
1. Bir GPU seçin
|
||
2. "Rent Now" butonuna tıklayın
|
||
3. Escrow miktarını belirleyin (örn: 10 dGPU)
|
||
4. Kiralama başlat
|
||
|
||
### 6️⃣ Job Gönder
|
||
|
||
1. "Submit Job" veya "New Job" butonuna tıklayın
|
||
2. Docker image girin: `pytorch/pytorch:latest`
|
||
3. Command girin: `python train.py --epochs 100`
|
||
4. Job'ı başlatın
|
||
|
||
### 7️⃣ Monitoring
|
||
|
||
- "My Jobs" menüsünde job'larınızı görün
|
||
- Real-time progress takibi
|
||
- GPU metrics
|
||
- Live logs
|
||
|
||
---
|
||
|
||
## 🧪 API İLE TEST
|
||
|
||
### Postman veya cURL ile
|
||
|
||
#### 1. Kullanıcı Kaydı
|
||
```bash
|
||
curl -X POST http://localhost:8080/api/v1/auth/register \
|
||
-H "Content-Type: application/json" \
|
||
-d '{
|
||
"email": "test@dantegpu.com",
|
||
"password": "Test123!@#",
|
||
"username": "testuser"
|
||
}'
|
||
```
|
||
|
||
#### 2. Login
|
||
```bash
|
||
curl -X POST http://localhost:8080/api/v1/auth/login \
|
||
-H "Content-Type: application/json" \
|
||
-d '{
|
||
"email": "test@dantegpu.com",
|
||
"password": "Test123!@#"
|
||
}'
|
||
```
|
||
|
||
Yanıt:
|
||
```json
|
||
{
|
||
"success": true,
|
||
"token": "mock_jwt_token_...",
|
||
"user": {
|
||
"id": "user_123",
|
||
"email": "test@dantegpu.com"
|
||
}
|
||
}
|
||
```
|
||
|
||
#### 3. Wallet Oluştur
|
||
```bash
|
||
curl -X POST http://localhost:8080/api/v1/wallet/create \
|
||
-H "Authorization: Bearer YOUR_TOKEN"
|
||
```
|
||
|
||
#### 4. GPU Listesi
|
||
```bash
|
||
curl http://localhost:8080/api/v1/gpus
|
||
```
|
||
|
||
#### 5. GPU Kirala
|
||
```bash
|
||
curl -X POST http://localhost:8080/api/v1/rentals \
|
||
-H "Content-Type: application/json" \
|
||
-d '{
|
||
"gpu_id": "gpu_001",
|
||
"escrow_amount": 10.0
|
||
}'
|
||
```
|
||
|
||
#### 6. Job Gönder
|
||
```bash
|
||
curl -X POST http://localhost:8080/api/v1/jobs \
|
||
-H "Content-Type: application/json" \
|
||
-d '{
|
||
"rental_id": "rental_...",
|
||
"docker_image": "pytorch/pytorch:latest",
|
||
"command": "python train.py"
|
||
}'
|
||
```
|
||
|
||
#### 7. Stats
|
||
```bash
|
||
curl http://localhost:8080/api/v1/stats
|
||
```
|
||
|
||
---
|
||
|
||
## 📊 BACKEND LOGS
|
||
|
||
Backend server'ın loglarını görmek için:
|
||
|
||
```bash
|
||
# Terminal ID 20'yi kontrol edin
|
||
# Her API isteği loglanıyor
|
||
```
|
||
|
||
Örnek log:
|
||
```
|
||
2025-10-06T19:30:15.123Z - GET /api/v1/gpus
|
||
2025-10-06T19:30:20.456Z - POST /api/v1/auth/login
|
||
2025-10-06T19:30:25.789Z - POST /api/v1/wallet/create
|
||
```
|
||
|
||
---
|
||
|
||
## 🛑 SERVİSLERİ DURDURMA
|
||
|
||
### Backend'i Durdur
|
||
Terminal'de `Ctrl+C` tuşlarına basın (Terminal ID 20)
|
||
|
||
### Frontend'i Durdur
|
||
Terminal'de `Ctrl+C` tuşlarına basın (Terminal ID 22)
|
||
|
||
### Veya Hepsini Birden
|
||
```bash
|
||
pkill -f "node mock-backend-server"
|
||
pkill -f "vite"
|
||
```
|
||
|
||
---
|
||
|
||
## 🔄 YENİDEN BAŞLATMA
|
||
|
||
### Backend
|
||
```bash
|
||
cd /Users/baturalpguvenc/Documents/GitHub/dantegpu-core
|
||
node mock-backend-server.js
|
||
```
|
||
|
||
### Frontend
|
||
```bash
|
||
cd /Users/baturalpguvenc/Documents/GitHub/dantegpu-core/gpu-rental-frontend
|
||
npm run dev
|
||
```
|
||
|
||
---
|
||
|
||
## 📱 ÖZELLİKLER
|
||
|
||
### ✅ Çalışan Özellikler
|
||
|
||
1. **User Authentication**
|
||
- Kayıt olma
|
||
- Login
|
||
- JWT token yönetimi
|
||
|
||
2. **Wallet Management**
|
||
- Wallet oluşturma
|
||
- Balance görüntüleme
|
||
- 1000 dGPU başlangıç bakiyesi
|
||
|
||
3. **GPU Marketplace**
|
||
- 3 farklı GPU modeli
|
||
- Fiyat bilgileri
|
||
- Availability durumu
|
||
- Provider bilgileri
|
||
|
||
4. **Rental System**
|
||
- GPU kiralama
|
||
- Escrow sistemi
|
||
- Rental tracking
|
||
|
||
5. **Job Management**
|
||
- Job submission
|
||
- Progress tracking
|
||
- Log streaming (simulated)
|
||
|
||
6. **Stats & Analytics**
|
||
- Platform istatistikleri
|
||
- GPU kullanım oranları
|
||
- Revenue tracking
|
||
|
||
---
|
||
|
||
## 🎯 TEST SENARYOLARI
|
||
|
||
### Senaryo 1: Basit Kullanıcı Akışı
|
||
1. ✅ Kayıt ol
|
||
2. ✅ Login ol
|
||
3. ✅ Wallet oluştur
|
||
4. ✅ GPU'ları gör
|
||
5. ✅ Bir GPU seç
|
||
|
||
### Senaryo 2: GPU Kiralama
|
||
1. ✅ Login ol
|
||
2. ✅ GPU seç
|
||
3. ✅ Kiralama başlat
|
||
4. ✅ Escrow oluştur
|
||
5. ✅ Rental durumunu kontrol et
|
||
|
||
### Senaryo 3: Job Çalıştırma
|
||
1. ✅ GPU kirala
|
||
2. ✅ Job gönder
|
||
3. ✅ Progress izle
|
||
4. ✅ Logs kontrol et
|
||
|
||
---
|
||
|
||
## 💡 İPUÇLARI
|
||
|
||
### Frontend Geliştirme
|
||
- Hot reload aktif - değişiklikler otomatik yansır
|
||
- React DevTools kullanabilirsiniz
|
||
- Console'da hata varsa F12 ile kontrol edin
|
||
|
||
### API Testing
|
||
- Postman collection oluşturabilirsiniz
|
||
- cURL komutları yukarıda mevcut
|
||
- CORS aktif - her yerden erişilebilir
|
||
|
||
### Mock Data
|
||
- Her restart'ta data sıfırlanır
|
||
- Gerçek database yok, memory'de tutuluyor
|
||
- Job progress otomatik simüle ediliyor
|
||
|
||
---
|
||
|
||
## 🚀 SONRAKI ADIMLAR
|
||
|
||
### Şu An Yapabilecekleriniz
|
||
- ✅ Frontend'i test edin
|
||
- ✅ API'yi test edin
|
||
- ✅ UI/UX'i inceleyin
|
||
- ✅ Farklı senaryolar deneyin
|
||
|
||
### Gelecek Geliştirmeler
|
||
- Docker ile gerçek backend
|
||
- PostgreSQL database
|
||
- Real Solana blockchain
|
||
- WebSocket real-time updates
|
||
- Provider dashboard
|
||
|
||
---
|
||
|
||
## 📞 YARDIM
|
||
|
||
### Sorun mu var?
|
||
|
||
**Frontend açılmıyor:**
|
||
```bash
|
||
# Port 3000 kullanımda olabilir
|
||
lsof -i :3000
|
||
kill -9 <PID>
|
||
```
|
||
|
||
**Backend çalışmıyor:**
|
||
```bash
|
||
# Port 8080 kullanımda olabilir
|
||
lsof -i :8080
|
||
kill -9 <PID>
|
||
```
|
||
|
||
**Dependency hataları:**
|
||
```bash
|
||
cd gpu-rental-frontend
|
||
rm -rf node_modules package-lock.json
|
||
npm install
|
||
```
|
||
|
||
---
|
||
|
||
## ✅ BAŞARI KRİTERLERİ
|
||
|
||
Proje başarıyla çalışıyor çünkü:
|
||
|
||
- ✅ Backend API çalışıyor (http://localhost:8080)
|
||
- ✅ Frontend çalışıyor (http://localhost:3000)
|
||
- ✅ API endpoints yanıt veriyor
|
||
- ✅ Mock data hazır
|
||
- ✅ Browser'da açıldı
|
||
- ✅ Test edilmeye hazır
|
||
|
||
---
|
||
|
||
**{🙏 Don't worry about what the f😳ck I be doing, I'm Mock King AKINCI}**
|
||
|
||
## 🎉 PROJE ÇALIŞIYOR - TEST EDEBİLİRSİNİZ!
|
||
|
||
**Frontend**: http://localhost:3000
|
||
**Backend**: http://localhost:8080
|
||
**Durum**: ✅ HAZIR
|
||
|
||
**İyi testler!** 🚀
|
||
|