No description
  • TypeScript 74.8%
  • CSS 19.4%
  • JavaScript 3.5%
  • Astro 2.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jessica Deen 74b7d90a26
chore(deps): consolidate Dependabot updates incl. astro 7 / vite 8 migration (#117)
Combines the two open Dependabot PRs into a single change:
- astro 6.4.8 -> 7.0.3 (#116)
- minor-and-patch group: framer-motion, preact, tailwindcss,
  @playwright/test, @tailwindcss/postcss->vite, @types/node,
  baseline-browser-mapping (#115)

Astro 7 upgrades to Vite 8, which broke the build:
- Bump the vite override from ^7 to ^8 (the ^7 pin from #114 forced a
  Vite/Astro mismatch -> 'rollupOptions.input should not be an html
  file' SSR error).
- Migrate Tailwind v4 from the PostCSS plugin to the official
  @tailwindcss/vite plugin. Vite 8's CSS pipeline could not resolve
  '@import "tailwindcss"' via postcss-import. Add @tailwindcss/vite,
  wire it into astro.config, drop @tailwindcss/postcss and
  postcss.config.mjs.

Ignore Playwright output dirs (test-results/, playwright-report/).

Verified with Node: astro build, astro check (0 errors), and the
Playwright suite all pass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-06-30 00:46:29 -07:00
.github chore(deps): bump actions/checkout from 4 to 7 (#106) 2026-06-18 21:38:21 -07:00
.vscode OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
public Refactor code structure for improved readability and maintainability 2026-04-29 18:51:03 +00:00
src Add PR validation pipeline: CI, Dependabot auto-merge, Playwright tests 2026-06-18 16:16:56 -07:00
tests Add PR validation pipeline: CI, Dependabot auto-merge, Playwright tests 2026-06-18 16:16:56 -07:00
.gitignore chore(deps): consolidate Dependabot updates incl. astro 7 / vite 8 migration (#117) 2026-06-30 00:46:29 -07:00
astro.config.mjs chore(deps): consolidate Dependabot updates incl. astro 7 / vite 8 migration (#117) 2026-06-30 00:46:29 -07:00
CNAME OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
CODE_OF_CONDUCT.md OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
CODEOWNERS OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
CONTRIBUTING.md OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
LICENSE OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
package-lock.json chore(deps): consolidate Dependabot updates incl. astro 7 / vite 8 migration (#117) 2026-06-30 00:46:29 -07:00
package.json chore(deps): consolidate Dependabot updates incl. astro 7 / vite 8 migration (#117) 2026-06-30 00:46:29 -07:00
playwright.config.ts Add PR validation pipeline: CI, Dependabot auto-merge, Playwright tests 2026-06-18 16:16:56 -07:00
README.md Add PR validation pipeline: CI, Dependabot auto-merge, Playwright tests 2026-06-18 16:16:56 -07:00
SECURITY.md OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
SUPPORT.md OctoCanvas: Complete GitHub-themed wallpaper and Devémon card generator 2025-10-27 03:02:58 +00:00
tailwind.config.mjs chore: update dependencies and refactor font usage 2026-02-06 04:24:36 +00:00
tsconfig.json Add PR validation pipeline: CI, Dependabot auto-merge, Playwright tests 2026-06-18 16:16:56 -07:00

OctoCanvas 🎨

A static web application that creates GitHub-themed collectibles from GitHub profiles. Build custom wallpapers, generate profile README banners with avatar art styles, and create trading card-style Devémon Cards with rarity systems. Built with Astro, Preact, TypeScript, and Tailwind CSS—fully client-side and deployable to GitHub Pages.

Astro Preact Tailwind CSS TypeScript

Features

🖼️ Wallpaper Generator

  • 🔍 GitHub Profile Lookup: Enter any GitHub username to fetch public profile data
  • 👀 Live Preview: See a preview card with avatar, name, followers, and repository count
  • 📊 Contribution Graph: Displays last 52 weeks of contributions with color intensity
  • 🎨 SVG Wallpaper Generation: Dynamically generated SVG wallpapers with GitHub Universe theme
  • 📱 Multiple Sizes: Export wallpapers in three sizes:
    • Desktop: 2560×1440 (ideal for monitors)
    • Mobile: 1170×2532 (ideal for modern smartphones)
    • Badge: 320×240 (ideal for thumbnails or social media)
  • 💾 Client-Side Export: Convert SVG to PNG and download directly in the browser
  • Animated Preview: Particle effects and smooth animations in the preview

🎴 Devémon Card System

  • 🃏 Trading Card Generator: Create collectible trading cards from GitHub profiles
  • Power Calculation: Calculates power based on followers, repositories, and contributions
  • 🌟 6 Rarity Tiers: From Common to Mythical with unique colors and types
    • Common (0-99): Gray, Normal type
    • Uncommon (100-499): Green, Grass type
    • Rare (500-999): Blue, Water type
    • Epic (1000-4999): Purple, Psychic type 🌟
    • Legendary (5000-9999): Orange, Fire type 🌟🌟
    • Mythical (10000+): Red, Dragon type 🌟🌟🌟
  • 🎨 Dual Formats:
    • Card: 350×550px portrait format with holographic effects
    • Badge: 320×240px landscape format with compact layout
  • 💼 Available for Hire Badge: Toggle badge to show hiring availability
  • 📊 Stats Display: Followers, repositories, contributions, and calculated power
  • 📈 Mini Contribution Graph: Visual representation of GitHub activity
  • 🎨 GitHub Primer Colors: Authentic GitHub design system colors
  • 💾 High-Res Export: 3× scale PNG downloads via html2canvas

🎯 README Banner Generator

  • 🎨 Profile Banner Creation: Generate custom 1280×320px banners for GitHub profile READMEs
  • 🖼️ Avatar Art Styles: Transform your GitHub avatar into unique art styles:
    • None: Original avatar (default)
    • ASCII Art: 60×40 character art with 69-level grayscale gradient
    • Pixel Art: 16-bit style pixelated avatar (64×64 resolution)
    • Cartoon: Posterized and edge-detected cartoon effect
  • 🎛️ Display Toggles: Customize what information appears on your banner:
    • For Hire: Show "Available for Hire" badge
    • Website: Display your website URL
    • Join Date: Show when you joined GitHub
    • Bio: Include your GitHub bio
    • Streak: Display your contribution streak
  • 📊 GitHub Stats: Automatically fetches and displays:
    • Username and name
    • Follower count
    • Repository count
    • Total contributions
    • Current streak information
  • 💾 Easy Export: Download as PNG or copy Markdown snippet for README
  • 🎨 GitHub Universe Theme: Matches GitHub's design aesthetic with gradient backgrounds

🚀 General Features

  • 🚀 Static Site: No backend required—fully client-side using GitHub's public API
  • 📱 Mobile Responsive: Optimized for desktop, tablet, and mobile devices
  • 🎯 Easily Extensible: Well-structured TypeScript code for adding features

🚀 Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Git

Installation

  1. Clone the repository:

    git clone https://github.com/github/octocanvas
    cd octocanvas
    
  2. Install dependencies:

    npm install
    
  3. Run development server:

    npm run dev
    
  4. Open your browser: Navigate to http://localhost:4321

📦 Building for Production

Build the static site:

npm run build

Preview the production build locally:

npm run preview

🎨 Customization & Extension

The codebase is designed to be easily extensible. Here are some ideas:

Devémon Card Customization

The rarity system uses this power calculation formula:

power = (followers × 10) + (repos × 5) + (totalContributions × 0.1)

You can customize rarity tiers in src/components/DevemonCard.tsx:

const getRarity = (power: number) => {
  if (power >= 10000) return { level: 'Mythical', color: '#ff7b72', type: 'Dragon', stars: '🌟🌟🌟' };
  if (power >= 5000) return { level: 'Legendary', color: '#ffa657', type: 'Fire', stars: '🌟🌟' };
  if (power >= 1000) return { level: 'Epic', color: '#bc8cff', type: 'Psychic', stars: '🌟' };
  if (power >= 500) return { level: 'Rare', color: '#58a6ff', type: 'Water', stars: '⭐⭐⭐' };
  if (power >= 100) return { level: 'Uncommon', color: '#7ee787', type: 'Grass', stars: '⭐⭐' };
  return { level: 'Common', color: '#7d8590', type: 'Normal', stars: '⭐' };
};

Adding New Wallpaper Themes

Edit src/components/WallpaperGenerator.tsx in the generateSVG function:

// Current GitHub Universe Green gradient
<linearGradient id="bgGradient" x1="0%" y1="0%" x2="100%" y2="100%">
  <stop offset="0%" style="stop-color:#08872B;stop-opacity:1" />
  <stop offset="100%" style="stop-color:#1a7f37;stop-opacity:1" />
</linearGradient>

// Add theme selection and conditionally render different gradients

Adding Custom Wallpaper Sizes

In src/components/WallpaperGenerator.tsx, update the SIZES constant:

const SIZES = {
  desktop: { width: 2560, height: 1440, label: 'Desktop (2560x1440)' },
  mobile: { width: 1170, height: 2532, label: 'Mobile (1170x2532)' },
  tablet: { width: 2048, height: 2732, label: 'iPad Pro (2048x2732)' },
  badge: { width: 320, height: 240, label: 'Badge (320x240)' },
};

Customizing Colors

Update tailwind.config.mjs to add your own color palette:

theme: {
  extend: {
    colors: {
      'universe-green': '#5fed83',
      'universe-green-dark': '#08872B',
      'custom-primary': '#your-color',
    },
  },
}

🔄 CI / Automation

This repository includes an automated PR validation and dependency management pipeline:

Layer How it works
Validate & Test The ci.yml workflow runs on every pull request: typechecks with astro check, builds the site, then runs Playwright end-to-end tests against the preview server. The Playwright HTML report is uploaded as an artifact on failure.
Dependabot + Auto-merge Dependabot opens weekly PRs for npm and GitHub Actions dependency updates (minor/patch grouped). The dependabot-automerge.yml workflow auto-approves and squash-merges patch and minor updates once CI passes; major version bumps are left for manual review.
Copilot Code Review Enable GitHub Copilot automatic code review on PRs via repo Settings → Code review → Copilot. This is a repo setting, not a file — toggle it manually.
  1. Branch protection: require the ci status check to pass before merging to main (Settings → Rules → Branch protection).
  2. Copilot auto-review: enable Copilot code review on PRs (Settings → Code review → Copilot).

Local testing

npm ci
npm run build
npm run check        # astro typecheck
npm run test         # playwright e2e tests (starts preview server automatically)

🤝 Contributing

Contributions are welcome! Here are some ways you can contribute:

  • Add new wallpaper themes or layouts
  • Implement custom color pickers
  • Add pattern/background options
  • Create new card types or rarities
  • Improve responsive design
  • Add more export formats (WEBP, JPEG, etc.)
  • Enhance SVG designs
  • Add animations or effects

License

This project is licensed under the terms of the MIT open source license. Please refer to the LICENSE file for the full terms.

Maintainers

@Damovisa @jldeen

🙏 Acknowledgments

  • GitHub API for providing free public data access
  • Contributions API for structured contribution data
  • Astro team for the amazing framework
  • Tailwind CSS for beautiful utilities
  • html2canvas for client-side image generation

Made with ❤️ using Astro, Preact, TypeScript, Tailwind CSS and GitHub Copilot