DevMetrics, GitHub profilinizi analiz eden, yazılım geliştirme alışkanlıklarınızı RPG (Rol Yapma Oyunu) karakterine dönüştüren ve diğer geliştiricilerle Sözde Kod Savaşları (Mock Battles) yapmanızı sağlayan yeni nesil bir analiz platformudur. Yapay zeka desteği ile kod kalitenizi ölçer ve size özel tavsiyeler verir.
- 📊 Deep AI Analysis: Analyzes commit patterns, quality, and productivity using llama-3.3-70b.
- ⚔️ Battle Arena: AI-judged developer battles with cinematic animations.
- 🧙♂️ RPG Gamification: Turns stats into RPG classes (Code Ninja, Data Sorcerer).
- 📄 AI Resume Generator: Generates PDF resumes from GitHub data.
- 🌐 i18n Support: Full TR/EN localization.
| Dashboard | Battle Arena | RPG Card |
|---|---|---|
![]() |
![]() |
![]() |
- Clone repo:
git clone ... - Install:
npm install - Env: Create
.env.localwithGITHUB_TOKENandGROQ_API_KEY. - Run:
npm run dev
DevMetrics follows a modern Next.js 15 App Router architecture with a focus on modularity and "Screaming Architecture" (folders reveal intent).
devmetrics/
├── app/ # Next.js App Router (Pages & API)
│ ├── api/ # Backend API Routes (Serverless Functions)
│ │ ├── ai/ # AI logic (analyze, battle)
│ │ └── github/ # GitHub Data Fetching (user, repos, commits)
│ ├── battle/ # Battle Arena Page logic
│ └── dashboard/ # Dashboard Page logic
├── components/ # Reusable UI Components
│ ├── Charts/ # Recharts visualizations (Heatmap, Pie, Radar)
│ ├── RPG/ # Gamification components (DevCard)
│ └── UI/ # Atoms (Buttons, Skeleton, LanguageSwitcher)
├── context/ # React Contexts (Global State)
│ └── LanguageContext.tsx # i18n State Management
├── lib/ # Business Logic & Utilities (Core Brain)
│ ├── gamification.ts # RPG Math & Algorithms
│ ├── resumeGenerator.ts # PDF Generation Logic
│ └── i18n.ts # Translation Dictionary
└── public/assets/ # Static Images & Icons
This is the heart of the RPG system. It doesn't just count commits; it interprets them.
- Class Detection: It analyzes generic repository languages. If you write mostly Python, you become a "Data Sorcerer". If Rust/Go, a "Memory Warlord".
- Leveling Algorithm: Uses a weighted formula
(Commits^0.5 + Stars^0.5 + Followers^0.5)to calculate a fair level, balancing code volume with community impact.
A dedicated module for generating CVs. It uses jspdf but with Dynamic Imports to avoid bloating the initial bundle size. It only loads the heavy PDF libraries when the user clicks "Download".
analyze/route.ts: Sends user data to the LLM (Groq) with a strict JSON prompt to get structured feedback (Productivity Score, Code Quality). Includes a Smart Fallback engine if the API is down.battle/route.ts: The "Judge". It takes two profiles, analyzes their strengths, and asks the AI to declare a winner with a funny or serious verdict.
You downloaded the code, but you want to take it further? Here is the architect's guide to scaling DevMetrics primarily through Custom AI Models.
Currently, we use "Prompt Engineering" with pre-trained models (Llama-3.3).
- Upgrade Idea: Start saving the inputs (GitHub JSON) and outputs (AI Analysis) to a database (PostgreSQL/Supabase).
- Why? You need a dataset to train your own model.
- Upgrade Idea: Add "Thumbs Up/Down" buttons to the AI insights on the dashboard.
- Logic: If a user likes the analysis, tag that data as "High Quality". If they dislike it, tag as "Bad". This creates a dataset for Reinforcement Learning from Human Feedback (RLHF).
Instead of relying on generic models, train a specialized "DevMetrics Model".
- Format Data: Convert your saved JSONs into
{ "prompt": "User Stats...", "completion": "Analysis..." }pairs. - Fine-Tune: Use OpenAI or HuggingFace to fine-tune a small model (e.g., Llama-3-8B) specifically on developer profiles.
- Result: A model that understands code metrics 10x better and costs 10x less to run than GPT-4.
- Code Embedding: Instead of just text analysis, use Vector Databases (Pinecone/Weaviate) to embed users' actual code snippets.
- Semantic Search: Allow users to search "Who is the best React developer?" and match profiles based on code semantics, not just keywords.
- 📊 Derin AI Analizi: Commit alışkanlıklarını ve kod kalitesini analiz eder.
- ⚔️ Savaş Arenası: Geliştiricileri kapıştırır ve sinematik sonuçlar üretir.
- 🧙♂️ RPG Sistemi: İstatistikleri karakter sınıfına dönüştürür (Code Ninja vb.).
- 📄 AI CV Oluşturucu: Tek tıkla profesyonel PDF özgeçmiş yaratır.
- 🌐 Çoklu Dil: Tam Türkçe/İngilizce desteği.
(Yukarıdaki İngilizce bölüme bakınız)
DevMetrics, modern Next.js 15 App Router mimarisini kullanır ve "Screaming Architecture" (Klasör isimlerinin niyeti belli ettiği yapı) prensibini benimser.
devmetrics/
├── app/ # Uygulama Yönlendirmesi (Sayfalar ve API)
│ ├── api/ # Backend API Rotaları (Serverless)
│ │ ├── ai/ # Yapay Zeka Mantığı (Analiz, Savaş)
│ │ └── github/ # GitHub Veri Çekme İşlemleri
│ ├── battle/ # Savaş Arenası Sayfası
│ └── dashboard/ # Panel Sayfası
├── components/ # Tekrar Kullanılabilir UI Bileşenleri
│ ├── Charts/ # Grafikler (Isı Haritası, Pasta Grafik)
│ ├── RPG/ # Oyunlaştırma (DevCard)
│ └── UI/ # Temel Parçalar (Buton, İskelet, Dil Seçici)
├── context/ # Global Durum Yönetimi
│ └── LanguageContext.tsx # Çoklu Dil Yönetimi
├── lib/ # İş Mantığı ve Yardımcılar (Projenin Beyni)
│ ├── gamification.ts # RPG Matematiği ve Algoritmaları
│ ├── resumeGenerator.ts # PDF Oluşturma Mantığı
│ └── i18n.ts # Çeviri Sözlüğü
└── public/assets/ # Statik Görseller
RPG sisteminin kalbidir. Sadece commit sayılarını toplamaz, onları yorumlar.
- Sınıf Tespiti (Class Detection): Kullandığınız dillere bakar. Python ağırlıklıysa sizi "Data Sorcerer", Rust/Go ise "Memory Warlord" yapar.
- Seviye Algoritması: Adaletli bir seviye için
(Commits^0.5 + Stars^0.5 + Followers^0.5)formülünü kullanır.
Özgeçmiş oluşturmak için özel bir modüldür. jspdf kütüphanesini kullanır ancak Dinamik Import yaparak sayfa açılışını yavaşlatmaz. Kütüphane sadece "İndir" butonuna basınca yüklenir.
analyze/route.ts: Kullanıcı verisini alıp LLM'e (Groq) gönderir. JSON formatında çıktı almaya zorlar. Eğer API çökerse devreye giren bir Akıllı Yedek (Smart Fallback) sistemine sahiptir.battle/route.ts: "Hakem" modülü. İki profili kıyaslar, güçlü/zayıf yönlerini bulur ve kazananı belirler.
Projeyi indirdiniz ama "Bir sonraki adım ne?" diye düşünüyorsunuz. İşte projenin mimarından, özellikle Özel AI Modelleri üzerine bir yol haritası.
Şu an hazır modelleri (Llama-3.3) "Prompt Mühendisliği" ile kullanıyoruz.
- Geliştirme Fikri: Gelen GitHub verilerini (Girdi) ve AI analiz sonuçlarını (Çıktı) bir veritabanına (PostgreSQL) kaydetmeye başlayın.
- Neden? Kendi modelinizi eğitmek için ham veriye ihtiyacınız var.
- Geliştirme Fikri: AI analizlerinin altına "Beğendim/Beğenmedim" butonları ekleyin.
- Mantık: Kullanıcı analizi beğenirse bu "Kaliteli Veri", beğenmezse "Kötü Veri" olarak etiketlenir. Bu, RLHF (İnsan Geri Bildirimiyle Pekiştirmeli Öğrenme) için altın değerindedir.
Genel amaçlı modeller yerine, sadece bu iş için özelleşmiş bir "DevMetrics Modeli" eğitin.
- Formatlama: Kaydettiğiniz verileri
{ "prompt": "Kullanıcı İstatistikleri...", "completion": "İdeal Analiz..." }formatına çevirin. - Eğitim: OpenAI veya HuggingFace kullanarak küçük bir modeli (örn: Llama-3-8B) bu verilerle eğitin.
- Sonuç: GPT-4'ten 10 kat daha ucuza çalışan ve geliştirici metriklerinden 10 kat daha iyi anlayan bir modeliniz olur.
- Kod Vektörleri: Sadece metin analizi yerine, kullanıcıların gerçek kodlarını Vektör Veritabanlarına (Pinecone/Weaviate) gömün.
- Anlamsal Arama: "En iyi React geliştiricisi kim?" diye aratıldığında sadece anahtar kelimelere değil, kodlama tarzına (Semantik) göre eşleşme sağlayın.


