Skip to content

enigma-137/github-worth

Repository files navigation

GitHub Worth Calculator πŸš€

A fun and interactive web application that calculates the "worth" of your GitHub profile in Nigerian Naira (NGN). Discover your GitHub value based on your contributions, followers, stars, and other metrics!

GitHub Worth Calculator TypeScript License

✨ Features

  • πŸ” Real-time GitHub Profile Search - Instantly search any public GitHub username

  • πŸ’° Intelligent Scoring Algorithm - Comprehensive scoring based on:

    • Followers count
    • Total stars received
    • Number of active repositories
    • Original vs forked repositories
    • Account age
    • Programming language diversity
    • Bonus and penalty calculations
  • πŸ“Š Detailed Score Breakdown - See exactly how your GitHub score is calculated

  • 🎨 Beautiful Dark/Light Theme - Toggle between dark and light modes

  • πŸ“± Fully Responsive Design - Works perfectly on desktop, tablet, and mobile

  • πŸ”— Share Your Worth - Share your GitHub worth on social media or copy to clipboard

  • 🏷️ Affordability Tiers - Humorous categorization of your GitHub value with relevant descriptions

🎯 Affordability Tiers

Your calculated value falls into one of these fun categories:

  • πŸ“± Vibes & Data (₦0 - ₦50,000) - Snacks and good vibes
  • πŸ’Έ Small Bills (₦50,000 - ₦200,000) - Nice meals and utilities
  • 🍽️ Medium Chops (₦200,000 - ₦500,000) - Proper restaurant vibes
  • πŸ’Ž Big Boy Energy (₦500,000 - ₦1,000,000) - Luxury items
  • πŸ‘‘ Billionaire Status (₦1,000,000+) - Your GitHub is worth serious money!

πŸ› οΈ Tech Stack

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm/yarn

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/github-worth-calculator.git
    cd github-worth-calculator
  2. Install dependencies

    pnpm install
    # or
    npm install
  3. Run the development server

    pnpm dev
    # or
    npm run dev
  4. Open http://localhost:3000 in your browser to see the application.

Build for Production

pnpm build
pnpm start

πŸ“ Project Structure

.
β”œβ”€β”€ app/                          # Next.js app directory
β”‚   β”œβ”€β”€ api/github-worth/         # API endpoint for GitHub calculations
β”‚   β”‚   └── route.ts
β”‚   β”œβ”€β”€ layout.tsx                # Root layout
β”‚   β”œβ”€β”€ page.tsx                  # Home page
β”‚   └── globals.css               # Global styles
β”‚
β”œβ”€β”€ components/                   # React components
β”‚   β”œβ”€β”€ github-search-form.tsx    # Search input form
β”‚   β”œβ”€β”€ github-worth-result.tsx   # Results display card
β”‚   β”œβ”€β”€ theme-provider.tsx        # Theme context provider
β”‚   β”œβ”€β”€ theme-toggle.tsx          # Dark/light mode toggle
β”‚   └── ui/                       # Reusable UI components (Radix UI based)
β”‚
β”œβ”€β”€ lib/                          # Utility functions
β”‚   β”œβ”€β”€ github-scoring.ts         # Core scoring algorithm
β”‚   └── utils.ts                  # Helper utilities
β”‚
β”œβ”€β”€ hooks/                        # Custom React hooks
β”‚   β”œβ”€β”€ use-mobile.ts             # Mobile detection hook
β”‚   └── use-toast.ts              # Toast notification hook
β”‚
β”œβ”€β”€ public/                       # Static assets
β”œβ”€β”€ styles/                       # Additional stylesheets
β”œβ”€β”€ package.json                  # Project dependencies
└── tsconfig.json                 # TypeScript configuration

πŸ”§ API Endpoint

/api/github-worth

Method: GET

Query Parameters:

  • username (string, required) - GitHub username to calculate worth for

Response:

{
  "username": "octocat",
  "avatarUrl": "https://...",
  "name": "The Octocat",
  "hustleScore": 1250,
  "nairaValue": 312500,
  "affordabilityTier": {
    "label": "Small Bills",
    "emoji": "πŸ’Έ",
    "description": "Can settle small bills..."
  },
  "message": "You're a solid contributor!",
  "breakdown": {
    "followers": 100,
    "stars": 500,
    "activeRepos": 50,
    "originalRepos": 35,
    "accountAge": 200,
    "languageDiversity": 150,
    "bonuses": 50,
    "penalties": 0
  },
  "stats": {
    "followers": 100,
    "totalStars": 500,
    "totalForks": 250,
    "publicRepos": 50,
    "originalRepos": 35,
    "activeRepos": 40,
    "languages": ["JavaScript", "TypeScript", "Python"],
    "accountAgeDays": 2500
  }
}

πŸ“Š Scoring Algorithm

The GitHub Worth Calculator uses a sophisticated algorithm that considers:

  1. Followers - Direct metric of community recognition
  2. Stars - Quality and value of your repositories
  3. Active Repositories - Repositories updated in the last 6 months
  4. Original Repositories - Created vs forked repositories
  5. Account Age - Years and months of GitHub presence
  6. Language Diversity - Number of different programming languages used
  7. Bonuses - Additional points for milestones (e.g., 100+ followers)
  8. Penalties - Deductions for archived or inactive accounts

Each metric is converted to a Hustle Score (0-5000), which is then multiplied by ₦250 to get the final Naira value.

🎨 Customization

Theme Colors

Modify the theme in components/theme-provider.tsx to change the color scheme:

const THEMES = {
  light: {
    primary: "#YOUR_COLOR",
    // ...
  },
  dark: {
    // ...
  }
}

Scoring Weights

Adjust scoring weights in lib/github-scoring.ts:

const SCORING_WEIGHTS = {
  followersWeight: 10,
  starsWeight: 5,
  // ...
}

Affordability Tiers

Add or modify affordability tiers in lib/github-scoring.ts:

const AFFORDABILITY_TIERS: AffordabilityTier[] = [
  {
    label: "Your Tier",
    emoji: "πŸŽ‰",
    description: "Description here",
    minValue: 0,
    maxValue: 50000,
  },
  // ...
]

πŸ“ Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ› Bug Reports

Found a bug? Please open an issue with:

  • Clear description of the issue
  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Screenshots if applicable

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • GitHub API for providing comprehensive GitHub data
  • Radix UI for beautiful, accessible components
  • Tailwind CSS for utility-first styling
  • All contributors and users of this project

πŸ’¬ Disclaimer

This application calculates "GitHub worth" for entertainment purposes only. The Naira values are not based on real market valuations or professional assessments. It's a fun way to celebrate your GitHub contributions!

πŸ“ž Contact

Have questions or suggestions? Feel free to reach out:

  • πŸ“§ Email: [rune.notstatic2gmaill.com]
  • 🐦 Twitter: [@nigmaQx]

⭐ If you enjoy this project, please consider giving it a star! ⭐

About

A fun and interactive web application that calculates the "worth" of your GitHub profile in Nigerian Naira (NGN). Discover your GitHub value based on your contributions, followers, stars, and other metrics!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors