Skip to content

harshitsinghal11/git-dna

Repository files navigation

🧬 Git DNA

A highly interactive platform that transforms a developer's GitHub activity into a stunning, dynamic "Developer Identity Card."

Next.js React TypeScript Tailwind CSS License: MIT


🌟 Overview

Git DNA analyzes a developer's GitHub activity to generate an interactive, beautifully animated identity card. It calculates experience points (XP), unlocks specialized achievements (Medals), and utilizes Google's Gemini AI to assign a unique Developer Archetype—providing an engaging and shareable snapshot of a user's coding journey.

✨ Key Features

  • Deep GitHub Analysis: Scans public repositories, language distribution, account age, stars, and follower ratios.
  • AI-Powered Archetypes: Personalized developer archetypes generated by Google Gemini 2.5 Flash.
  • Dynamic Achievement System: Calculates overall Level, XP, and unlocks specific Medals based on repository activity.
  • Immersive UI: Fully responsive UI built with Next.js and Framer Motion for smooth 3D card flips and animated backgrounds.
  • One-Click Export: Generates high-quality image exports via html-to-image for easy social sharing on platforms like LinkedIn.
  • Enterprise-Grade Caching: Utilizes Vercel KV (Upstash Redis) to prevent GitHub rate limits and ensure lightning-fast load times.

🛠 Tech Stack

Category Technology
Framework Next.js 16, React 19
Language TypeScript 5
Styling Tailwind CSS 4, Framer Motion
AI Integration Google Gemini API (@google/genai)
Database/Caching Upstash Redis / Vercel KV

📁 Project Structure

📦 app
 ┣ 📂 api
 ┃ ┣ 📂 analyze        # GitHub data fetching & Gemini AI profiling
 ┃ ┣ 📂 scan           # Directory/File scanning
 ┃ ┗ 📂 share          # Social media share endpoints
 ┣ 📂 components       # Reusable UI components (Cards, Animations)
 ┣ 📂 docs             # Project documentation & assets
 ┗ 📂 lib              # Core engine, types, and utilities
📦 public              # Static assets (fonts, images, levels, medals)
📜 README.md           # Project documentation

🚀 Getting Started

Prerequisites

  • Node.js: 18 or later recommended
  • Package Manager: npm, yarn, or pnpm
  • GitHub Token: A GitHub Personal Access Token (classic) with no scopes checked is highly recommended to increase API rate limits.

Installation

# Clone the repository
git clone https://github.com/harshitsinghal11/git-dna.git

# Navigate to the project directory
cd git-dna

# Install dependencies
npm install

Environment Variables

Create a .env.local file in the root directory and configure the following variables:

# Required: GitHub Personal Access Token (Increases limit: 60/hr -> 5000/hr)
GITHUB_TOKEN=your_github_token_here

# Required: Gemini API Key for generating developer descriptions
GEMINI_API_KEY=your_gemini_api_key_here

# Required: Vercel KV Database Caching (Upstash Redis)
KV_URL=your_kv_url
KV_REST_API_URL=your_kv_rest_api_url
KV_REST_API_TOKEN=your_kv_rest_api_token
KV_REST_API_READ_ONLY_TOKEN=your_kv_rest_read_only_token

Running Locally

npm run dev

Navigate to http://localhost:3000 in your browser to see the application.


📜 Available Scripts

  • npm run dev — Starts the local Next.js development server
  • npm run build — Creates an optimized production build
  • npm run start — Runs the production server
  • npm run lint — Runs ESLint to check for code quality

🌍 Deployment

This project is optimized for deployment on Vercel. Simply push your code to a GitHub repository, import it into your Vercel dashboard, and configure the Environment Variables.


📈 Project Status

Git DNA has reached a stable production-ready phase with all core features fully implemented:

  • Core Architecture: Profile analysis and metric aggregations are finalized.
  • AI Integration: Google Gemini integration accurately profiles developer tendencies.
  • UI/UX: A highly dynamic design system with 3D elements and canvas animations is implemented across the platform.
  • Performance: Upstash Redis caching layer successfully implemented on the main analysis API, securing a robust fallback against traffic spikes and rate limits.

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.


📞 Contact

Built by Harshit — B.Tech CSE, Manav Rachna University

GitHub LinkedIn

Feel free to reach out if you're building something similar or have questions about the implementation.



Released under the MIT License

About

A highly interactive web platform that analyzes your GitHub activity to calculate XP, unlock Medals, and use Google Gemini AI to reveal your true Developer Archetype.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors