Skip to content

kishanrathor/github-avatar-frame-api

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿ–ผ๏ธ GitHub Avatar Frame API

Officially accepted for GSSoC!

GSSOC


๐Ÿ–ผ๏ธ GitHub Avatar Frame API

๐ŸŒŸ Stars ๐Ÿด Forks ๐Ÿ› Issues ๐Ÿ”” Open PRs ๐Ÿ”• Closed PRs ๐Ÿ› ๏ธ Languages ๐Ÿ‘ฅ Contributors
Stars Forks Issues Open PRs Closed PRs Languages Count Contributors Count




๐Ÿ“š Table of Contents


โœจ Vision

Democratize creative avatar customization by providing a free, open-source API that transforms GitHub profiles into engaging visual experiences for developers worldwide.

๐ŸŽฏ Mission

  • ๐Ÿ—๏ธ Build the most comprehensive and user-friendly avatar framing API
  • ๐Ÿ’ช Empower developers to personalize their GitHub presence with minimal effort
  • ๐ŸŽจ Foster creative expression through customizable themes, text, and emoji overlays
  • ๐Ÿ†“ Maintain a free, accessible service that supports the open-source community

๐ŸŽจ About GitHub Avatar Frame API

A free and open-source API to frame your GitHub avatar using creative themes. Perfect for README files, portfolios, or social media.

๐ŸŒ Live API: https://github-avatar-frame-api.onrender.com


โš™๏ธ Setup & Local Development

Follow these steps to run the GitHub Avatar Frame API locally for development or testing:

๐Ÿงฉ Prerequisites

  • ๐ŸŸข Node.js 16+ and npm installed
  • ๐Ÿ™ Git for version control
  • ๐Ÿ–ฅ๏ธ Code editor (VS Code recommended)
  • ๐Ÿ“ฆ Optional: TypeScript knowledge for contributing

๐Ÿ’ป Steps

1. Clone the Repository

git clone https://github.com/TechQuanta/github-avatar-frame-api.git
cd github-avatar-frame-api

2. Install Backend Dependencies

npm install

3. Setup Frontend

cd client
npm install
cd ..

Running the Application

Start Backend (Terminal 1)

npm run dev

The backend will start on http://localhost:3000

Start Frontend (Terminal 2)

cd client
npm run dev

The frontend will start on http://localhost:5173 (or another port if 5173 is in use)

Verify Everything Works

  1. Open your browser and go to http://localhost:5173
  2. You should see the GitHub Avatar Frames interface
  3. Enter a GitHub username (e.g., "torvalds")
  4. Select a theme and click "Generate"
  5. If successful, your framed avatar will appear

๐Ÿ“‚ Project Structure

๐Ÿ“ฆ github-avatar-frame-api
โ”œโ”€โ”€ ๐Ÿ–ฅ๏ธ api
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FRAMETHEMES.md
โ”‚   โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ collage.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ frames.js
โ”‚   โ”œโ”€โ”€ ๐Ÿš€ server.ts
โ”‚   โ””โ”€โ”€ ๐ŸŽจ themes.js
โ”œโ”€โ”€ ๐ŸŒ client
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”‚   โ”œโ”€โ”€ components
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿงฉ ThemeSlider.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ pages
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ NotFound.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŽจ App.css
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ App.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŽจ index.css
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿš€ main.jsx
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ index.html
โ”‚   โ”œโ”€โ”€ โšก vite.config.js
โ”‚   โ””โ”€โ”€ ๐ŸŒ vercel.json
โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ public
โ”‚   โ””โ”€โ”€ assets
โ”‚       โ””โ”€โ”€ ๐Ÿ–ผ๏ธ gssoc.png
โ”œโ”€โ”€ ๏ฟฝ cli
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ package.json
โ”‚   โ”œโ”€โ”€ โš™๏ธ tsconfig.json
โ”‚   โ””โ”€โ”€ ๐Ÿš€ src/index.ts
โ”œโ”€โ”€ ๏ฟฝ๐Ÿ“„ README.md
โ”œโ”€โ”€ ๐Ÿ“„ LICENSE
โ”œโ”€โ”€ ๐Ÿ“„ CODE_OF_CONDUCT.md
โ”œโ”€โ”€ ๐Ÿ“„ CONTRIBUTING.md
โ”œโ”€โ”€ ๐Ÿ“„ CUSTOMIZATION_FEATURE.md
โ”œโ”€โ”€ ๐Ÿ“ TODO.md
โ”œโ”€โ”€ ๐Ÿ“ฆ package.json
โ”œโ”€โ”€ โš™๏ธ render.yml
โ””โ”€โ”€ ๐Ÿ“„ tsconfig.server.json

๐Ÿ’ป CLI Usage

The GitHub Avatar Frame API comes with a command-line interface (CLI) for easy avatar generation directly from your terminal. Perfect for developers who prefer working in code editors and terminals.

๐Ÿš€ Installation

Option 1: Install globally from npm

```bash npm install -g github-avatar-frame-cli ```

Option 2: Use locally (from project root)

```bash # Build the CLI npm run build:cli

Use the CLI

npm run cli --


<h3 style="color:#ff4081;">๐Ÿ“– Usage</h3>

<p style="font-size: 1.05em;"><b>Generate an avatar:</b></p>
```bash
github-avatar-frame generate <username> [options]

Examples:

# Basic usage
github-avatar-frame generate octocat

# With custom theme and size
github-avatar-frame generate octocat --theme flamingo --size 512

# With text overlay
github-avatar-frame generate octocat --text "GitHub User" --text-color "#ff0000"

# With emojis
github-avatar-frame generate octocat --emojis "๐Ÿš€,๐Ÿ’ป,๐Ÿ”ฅ" --emoji-position corners

# Save to custom file
github-avatar-frame generate octocat --output my-avatar.png

# Use local API server
github-avatar-frame generate octocat --url http://localhost:3000

โš™๏ธ CLI Options

Option Default Description
--theme, -tbaseFrame theme (base, classic, darkmode, eternity, flamingo, gitblaze, macros, minimal, neon, ocean, starry)
--size, -s256Avatar size in pixels (64-1024)
--canvas, -clightBackground color (light, dark)
--shape, -shcircleAvatar shape (circle, rounded)
--radius, -r25Corner radius for rounded shape
--text, -txnoneCustom text to display
--text-color, -tc#ffffffText color in HEX format
--text-size, -ts20Text size in pixels (8-100)
--text-position, -tpbottomText position (top, bottom, center)
--emojis, -enoneComma-separated list of emojis
--emoji-size, -es40Emoji size in pixels (16-120)
--emoji-position, -eptopEmoji position (top, bottom, corners)
--output, -oavatar.pngOutput file path
--url, -uhttps://github-avatar-frame-api.onrender.comAPI base URL

๐Ÿ“‹ Other Commands

# List available themes
github-avatar-frame themes

# Show API information
github-avatar-frame info

# Show help
github-avatar-frame --help

๐Ÿค– AI-Powered Frame Suggestions

The CLI also supports AI-powered frame suggestions that analyze your GitHub profile and recommend the perfect theme:

# Get AI-powered frame suggestion
github-avatar-frame suggest <username>

# Example
github-avatar-frame suggest octocat

The AI analyzes:

  • ๐ŸŽจ Avatar colors and brightness
  • ๐Ÿ“Š Contribution activity and patterns
  • ๐Ÿ‘ฅ Follower-to-repository ratios
  • ๐Ÿ”„ Consistency of activity

And suggests themes like:

  • Dark avatars โ†’ Starry/Galaxy themes
  • Professional photos โ†’ Minimal themes
  • High contributions โ†’ Pro/Advanced themes
  • Beginners โ†’ Classic themes

๐Ÿ’ก Why GitHub Avatar Frame API?

  • ๐Ÿ†“ Zero Setup: No registration, API keys, or complex configurations needed
  • โšก Instant Results: Real-time avatar processing with customizable themes
  • ๐Ÿ‘จโ€๐Ÿ’ป Developer-Friendly: Simple REST API with comprehensive documentation
  • ๐ŸŽญ Creative Freedom: Text overlays, emojis, multiple themes, and shape options
  • ๐Ÿ”“ Open Source: Community-driven development with transparent contributions
  • ๐Ÿ’– Always Free: No usage limits or premium tiersโ€”built for the community

๐Ÿ“Œ API Usage

๐Ÿ”— Base Endpoint:

https://github-avatar-frame-api.onrender.com/api/framed-avatar/{username}?theme={theme}&size={size}&canvas={canvas}&shape={shape}&radius={radius}

๐Ÿงญ Flowchart

Untitled diagram-2025-10-14-005556

๐Ÿงฎ Query Parameters:

Parameter Type Default Description Example
usernamestringrequiredGitHub usernameoctocat
themestringbaseFrame theme (eternity, base, flamingo)flamingo
sizeinteger256Avatar size in px (64โ€“1024)300
canvasstringlightBackground color of avatar canvas: light / darkdark
shapestringcircleAvatar shape: circle or roundedrounded
radiusinteger25Corner radius for rounded shape in px50
textstringoptionalCustom text to display on avatarHello World
textColorstring#ffffffColor of text in HEX format#ff0000
textSizeinteger20Size of text in pixels (8-100)24
textPositionstringbottomPosition of text: top / bottom / centertop
emojisstringoptionalComma-separated list of emojis๐Ÿš€,๐Ÿ’ป,๐Ÿ”ฅ
emojiSizeinteger40Size of emojis in pixels (16-120)30
emojiPositionstringtopPosition of emojis: top / bottom / cornerscorners

๐Ÿงฑ Canvas, Shape & Radius Explained

  • ๐ŸŽจ canvas: Sets the avatar background color. Options: light or dark.
  • ๐Ÿ”ท shape: Sets the avatar outline. Options: circle or rounded.
  • ๐Ÿ“ radius: Controls corner rounding in px when shape=rounded. 0 = square, higher = more rounded.

Combine all three to customize your avatar:

โœ๏ธ Text & Emoji Overlays

Add personalized text and emojis to make your avatar more expressive:

  • ๐Ÿ“ text: Add custom text like your name, role, or tagline.
  • ๐ŸŽจ textColor: Set text color using HEX format (e.g., #ff0000 for red).
  • ๐Ÿ”  textSize: Control text size from 8-100 pixels.
  • ๐Ÿ“ textPosition: Place text at top, bottom, or center of the avatar.
  • ๐Ÿ˜€ emojis: Add multiple emojis separated by commas (e.g., ๐Ÿš€,๐Ÿ’ป,๐Ÿ”ฅ).
  • ๐Ÿ“ emojiSize: Control emoji size from 16-120 pixels.
  • ๐Ÿ“ emojiPosition: Place emojis at top, bottom, or in corners.

๐Ÿ“Œ Example with text and emojis:

https://github-avatar-frame-api.onrender.com/api/framed-avatar/octocat?theme=base&text=GitHub%20User&textColor=%23ffffff&textSize=20&textPosition=bottom&emojis=%F0%9F%9A%80%2C%F0%9F%92%BB%2C%F0%9F%94%A5&emojiSize=30&emojiPosition=top
Canvas Shape Radius Example URL Preview
light circle - URL
dark circle - URL
light rounded 20 URL
dark rounded 50 URL

๐Ÿงช Live Examples by Theme

Theme Canvas / Shape / Radius Preview Description
eternity light / circle / 0 Classic eternity theme, light background, circular avatar
eternity dark / circle / 0 Dark canvas version of eternity theme
base light / rounded / 20 Base theme, light background, rounded corners 20px
base light / rounded / 50 Base theme, light background, rounded corners 50px
flamingo dark / circle / 0 Flamingo theme, dark canvas
flamingo light / rounded / 30 Flamingo theme, light canvas, rounded corners 30px

๐Ÿ“ฅ Embed in README

![My Avatar](https://github-avatar-frame-api.onrender.com/api/framed-avatar/your-username?theme=flamingo&size=256&canvas=dark&shape=rounded&radius=20)

๐Ÿงฉ Prerequisites

    For API Usage:
  • Any modern web browser or HTTP client
  • Valid GitHub username
  • Basic understanding of URL parameters
  • For Development/Contributing:

  • Node.js 16+ and npm
  • TypeScript knowledge
  • Git for version control
  • Code editor (VS Code recommended)

๐Ÿค Contributing

  • ๐ŸŽจ Add new themes in public/frames/
  • ๐Ÿ› Bug fixes
  • โœจ New features
  • ๐Ÿ“š Improve documentation

โš™ Tech Stack

  • ๐ŸŸข Node.js & Express.js (TypeScript)
  • ๐Ÿ–ผ๏ธ Sharp (image processing)
  • โ˜๏ธ Render (hosting)
  • ๐Ÿ“˜ TypeScript

๐Ÿ–ผ๏ธ Screenshot

Screenshot 2025-10-14 113128

๐Ÿ”— Links

๐ŸŒŸ Show Your Support

  • โญ Star the repository
  • ๐Ÿ› Report bugs or suggest features
  • ๐Ÿค Contribute new themes
  • ๐Ÿ“ข Share with the community

๐Ÿ› ๏ธ Troubleshooting

๐Ÿงฉ API Issues:

๐Ÿ–ผ๏ธ Avatar not loading

  • Check if GitHub username is valid
  • Verify theme name spelling (eternity, base, flamingo)
  • Ensure size is between 64-1024 pixels

๐Ÿข Slow response times

  • API may be cold-starting (hosted on Render free tier)
  • Wait 10-15 seconds for first request
  • Subsequent requests will be faster

๐Ÿ”ง Development Issues: ๐Ÿงฐ Installation problems

npm cache clean --force rm -rf node_modules package-lock.json npm install

๐Ÿ”Œ Port conflicts ๐Ÿ”Ž Check if port 3000 is in use netstat -ano | findstr :3000 Kill process or change port in server config

๐Ÿ“œ License

MIT License
Typing SVG


About

Live Project Link (Check of updates) !

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.7%
  • TypeScript 29.2%
  • CSS 2.8%
  • HTML 0.3%