Conversation
|
@narcisonunez Can you please look into this. |
|
While doing some deep testing on the dual-fetch strategy, I discovered a rare but critical edge-case with how GitHub calculates rankings. Because GitHub's exact stats API ( This creates a "Ranking Pollution" (Place Steal) bug: If a user is actually rank To prevent this, we have two options moving forward: Option 1: Only show the Top 100 UsersWe drop the pagination entirely and strictly use the accurate
Option 2: Show everyone, but accept slight inaccuraciesWe drop the dual-fetch strategy and purely rely on the paginated
Let me know which direction you'd prefer and I'll update the PR! |
Description
This PR adds a new
/contributorspage to highlight the open-source developers supporting Dokploy. By showcasing their names and contributions directly on the website, the goal is to show appreciation, encourage the community to come up with new solutions, and drive overall engagement. The PR also includes a few minor layout and navigation fixes.Main Feature: The New Contributors Page
/api/contributors) that parses GitHub'sLinkheader to dynamically fetch every single contributor across unlimited pages (bypassing the standard 100-user API limit)./stats/contributorsas a correction dictionary. This ensures the top users' commit counts match the GitHub Web UI by merging data from both endpoints.202 Acceptedcalculation status with a retry loop, and filters out non-human "bot" accounts. If the GitHub API fails or rate-limits, it falls back to a 1-hour stale memory cache.hidden md:flex) to instantly hide the bottom 20 items, resulting in zero React hydration mismatch errors. Added slicing checks to eliminate runtime crashes during HMR reloads.avatars.githubusercontent.comtonext.config.jsto support remote avatars.Minor Fixes & Navigation Cleanup:
Header.tsx) to make room for the new "Contributors" link. The "Jobs" link remains intact inside the "Resources" dropdown.Footer.tsx), and updated the AI documentation file (llms.txt) to reference "Jobs" instead of "Careers".Note for Reviewers (Architectural Judgements)
api/contributorsroute is set up to match the existing caching patterns used ingithub-starsandgithub-contributors. It uses a 1-hour in-memory cache, combined with a fallback helper that serves stale data and forces a cooldown if GitHub goes down./contributorsendpoint returns all 365+ users, but it inflates commit counts for top users. The/stats/contributorsendpoint returns the accurate commit counts (matching the GitHub Web UI) but is capped at 100 users. Fetching both and merging them resolves the limitations of each endpoint.window.innerWidth) to limit the initial load to 20 on mobile (which causes hydration layout jumps), the server sends 40 items. The browser's native CSS engine hides the bottom 20 instantly on mobile before React even loads. This is a solid approach for jump-free responsive SSR design.xl? : The desktop navbar requires approximately1060pxof horizontal space. Changing the collapse breakpoint toxlguarantees the desktop navbar only renders when there is at least1216pxof container width. This completely eliminates the horizontal over-scroll bug while safely displaying the hamburger menu on anything smaller.Checklist
llms.txt) is updated to reflect these changespnpm run website:devand changes were verifiedbiome checkScreenshots
1. The New Contributors Page:
2. Navbar Layout Fix (less screen width):