Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Repository files navigation

DevDNA

GitHub Developer Personality Graph — generate a futuristic, embeddable SVG “DNA card” from real GitHub contribution data.

Stars Forks Issues LICENSE Last Commit

Next.js React GraphQL Satori

DevDNA - Turn your GitHub activity into a Developer Personality Card | Product Hunt


What is DevDNA?FeaturesHow it worksAPI usageLocal developmentConfigurationSecurity & privacy


✨ What is DevDNA?

DevDNA is a modern Next.js app that generates a dynamic SVG profile card (an “AI-styled developer personality graph”) by analyzing a developer’s real GitHub history using the official GitHub GraphQL API.

Unlike simple REST-based widgets, DevDNA is built to fetch accurate totals and derive “traits” (Builder, Collaborator, Impact, Problem Solver, Consistency) and an archetype label (e.g. Relentless Shipper, Bug Hunter Elite).


🧩 Features

🧬 SVG DevDNA Card

Generates an embeddable image/svg+xml card that can be used in README files, profiles, or websites.

  • Fast to embed
  • Looks great in dark GitHub UI
  • Shareable & linkable

📊 Real GitHub Stats (GraphQL)

Uses GitHub’s GraphQL API so totals align with GitHub’s own contribution view.

  • Commit contribution totals across years
  • PR counts + issue counts
  • Repo stats (stars, topics, languages)

🎨 Themes

Switch card aesthetics via query params:

  • dark — deep space
  • light — clean studio
  • neon — cyberpunk

🧱 Modern Stack

  • Next.js (App Router)
  • React
  • Satori for SVG rendering
  • Lucide icons in the UI

🧠 How it works

1) Client UI (Generator page)

The homepage provides a simple form to choose:

  • username
  • theme

It then previews the SVG by pointing an <img> at:

/api/dev-dna?username=<user>&theme=<theme>

2) API route generates the SVG

The API endpoint is implemented using Next.js route handlers:

  • GET /api/dev-dna
  • It fetches GitHub data via GraphQL
  • It computes “traits” and an archetype
  • It renders the final SVG using Satori + a React component card layout

3) Traits calculation

DevDNA derives a personality-like summary from:

  • commits / PRs / issues
  • stars + follower count
  • language distribution (top languages)

🖼 API usage

Endpoint

GET /api/dev-dna?username=<github_login>&theme=<theme>

Parameters

  • username (string, optional): GitHub login. Defaults to torvalds.
  • theme (string, optional): dark | light | neon. Defaults to dark.

Example URLs

  • Dark:
    • https://devdna.netlify.app/api/dev-dna?username=akshitsutharr&theme=dark
  • Light:
    • https://devdna.netlify.app/api/dev-dna?username=akshitsutharr&theme=light
  • Neon:
    • https://devdna.netlify.app/api/dev-dna?username=akshitsutharr&theme=neon

Embed in a README (Markdown)

[![DevDNA](https://devdna.netlify.app/api/dev-dna?username=YOUR_USERNAME&theme=dark)](https://devdna.netlify.app)

🧑‍💻 Local development

Prerequisites

  • Node.js (recommended: latest LTS)
  • A GitHub Personal Access Token (PAT) for GraphQL

Install

npm install

Configure environment variables

Create .env.local in the project root:

GITHUB_TOKEN=ghp_your_personal_access_token_here

Run dev server

npm run dev

Open:


⚙️ Configuration

Environment variables

Variable Required Description
GITHUB_TOKEN GitHub PAT used to call the GitHub GraphQL API.

Why a token is required

GitHub’s GraphQL API requires authentication for reliable contribution and history queries. DevDNA uses the token to fetch accurate totals (commits/issues/PRs), and to avoid anonymous API limitations.


🎭 Themes

Use the theme query parameter:

  • dark — deep space look (default)
  • light — minimal bright layout
  • neon — high-contrast cyberpunk accent

Example:

/api/dev-dna?username=torvalds&theme=neon

🧱 Project structure

High-level layout (App Router):

  • src/app/ — Next.js app router pages, layout, global styles
  • src/app/api/dev-dna/route.js — SVG generation endpoint
  • src/lib/ — GitHub GraphQL fetch + trait calculation logic
  • src/components/ — SVG card React component rendered by Satori

🛡 Security & privacy

Important notes

  • Do not expose your GITHUB_TOKEN to the browser.
  • DevDNA reads GITHUB_TOKEN on the server (API route) using process.env.
  • Prefer a token with the minimum necessary scopes.

Recommended token scopes

This project typically needs:

  • read:user
  • repo (only if needed for private repo insights; for public-only data you may be able to reduce scopes)

🧾 Caching

The SVG response is served with edge-friendly caching headers:

  • Cache-Control: public, s-maxage=14400, stale-while-revalidate=86400

This helps the card load quickly when embedded across GitHub READMEs.


🗺 Roadmap ideas (optional)

  • More themes (glass, mono, sunset)
  • “Compact” card size variant (e.g. 600×360)
  • Additional traits (reviews, discussions, community)
  • Rate-limit safe batching + backoff
  • Optional unauthenticated mode with graceful fallback (less accurate)

🤝 Contributing

PRs and suggestions are welcome.

  1. Fork the repo
  2. Create a feature branch
  3. Commit with clear messages
  4. Open a Pull Request

📄 License

License: Open Source


Built with Next.js + GitHub GraphQL + Satori.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.