Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d32dee489 | ||
|
|
0835c64a63 | ||
|
|
60ff6ac7df | ||
|
|
01afeeda4e | ||
|
|
d4b4a8bc52 | ||
|
|
d907815f19 | ||
|
|
b737a0171e | ||
|
|
53ae54fe98 | ||
|
|
e47a67d1a1 | ||
|
|
f5fab0d6c3 | ||
|
|
98547a3f33 | ||
|
|
c0eba0b5a4 | ||
|
|
3653ef66a5 | ||
|
|
74a8146779 | ||
|
|
02e7270440 | ||
|
|
9b5a13f26b | ||
|
|
a25ae33f29 | ||
|
|
27645048f1 | ||
|
|
107273a1c8 | ||
|
|
12f6890f57 | ||
|
|
584306beb0 | ||
|
|
319f37761c | ||
|
|
faf41ad952 | ||
|
|
0904c4bb9f | ||
|
|
769cde552d | ||
|
|
06ab1c878e | ||
|
|
eea1734a04 | ||
|
|
fe4bb4e87e | ||
|
|
0586f83a33 | ||
|
|
d1e89fb1c3 | ||
|
|
e53d1cfbe0 | ||
|
|
c54b5ac6ff | ||
|
|
ceac269738 | ||
|
|
78299fa2b9 | ||
|
|
410b503877 | ||
|
|
61b8090c64 | ||
|
|
a1d1813a51 | ||
|
|
f66088e5d6 | ||
|
|
99c40cb0ce | ||
|
|
e7a0521ff6 | ||
|
|
2be8dc1ca3 | ||
|
|
369d42bb5f | ||
|
|
151f330d31 | ||
|
|
01927b2173 | ||
|
|
d4cbbae82a | ||
|
|
ef48d2581b | ||
|
|
00bf46968a | ||
|
|
ab7c9b32aa | ||
|
|
05efac8fd2 | ||
|
|
9d15dd6c94 | ||
|
|
8f7b27f806 | ||
|
|
99378e13cd | ||
|
|
9639051398 | ||
|
|
8dbbd16cf9 | ||
|
|
6edf98334c | ||
|
|
673eb5b39d | ||
|
|
4a1d31ffdd | ||
|
|
50dd73a0de | ||
|
|
954f259b8f | ||
|
|
7f1e53cfad | ||
|
|
5102a36238 | ||
|
|
9cc9de2147 | ||
|
|
a4ca81eab9 | ||
|
|
118c8b7cc4 | ||
|
|
113e4747cf | ||
|
|
a06bd2a20c | ||
|
|
8941ed2f15 | ||
|
|
048756c787 | ||
|
|
fc4e8e4da5 | ||
|
|
b5bba19d46 | ||
|
|
795f49d0a8 | ||
|
|
451cb45788 | ||
|
|
96dc98142f | ||
|
|
b66f966adb | ||
|
|
599c1ed672 | ||
|
|
fdd6b61172 | ||
|
|
13cc2b4eed | ||
|
|
a88561073a | ||
|
|
58fd6fbe67 | ||
|
|
39d07fb7e0 | ||
|
|
bd59910e54 | ||
|
|
e60acaca74 | ||
|
|
ca795f7e71 | ||
|
|
4febce9fca | ||
|
|
f43beb2ef6 | ||
|
|
b98b32f030 | ||
|
|
1d0fd3013e | ||
|
|
788470cae0 | ||
|
|
f23449a17e | ||
|
|
cb7a00d7c4 | ||
|
|
3b00a0aeac | ||
|
|
7fb1ba3e01 | ||
|
|
dd4a3d50d8 | ||
|
|
5a2bc11840 | ||
|
|
fa96adb5d1 | ||
|
|
728f3f038d | ||
|
|
f9caa61c77 | ||
|
|
9e837519cc | ||
|
|
be8823c4cf | ||
|
|
ccdd8231ce | ||
|
|
cd927e686f | ||
|
|
8ccc0af1cf | ||
|
|
b2baded94a | ||
|
|
8b7f999adc | ||
|
|
0cd7bf339d | ||
|
|
91f6328efd | ||
|
|
4ee71e0b86 | ||
|
|
eb4b68bf0d | ||
|
|
98c40ff993 | ||
|
|
a6356d4d1d | ||
|
|
232812b3a0 | ||
|
|
4602bb9494 | ||
|
|
ccd0f63fa8 | ||
|
|
ec9d4c3672 | ||
|
|
22483aea19 | ||
|
|
57b782ceaf | ||
|
|
4822272b49 | ||
|
|
1501139143 | ||
|
|
58e794fd57 | ||
|
|
ca74e91e3e | ||
|
|
016583c9f3 | ||
|
|
3ecb6ad67b | ||
|
|
3e70e4b4ef | ||
|
|
5198eab86a | ||
|
|
12fb6c331b | ||
|
|
89a05f2a59 | ||
|
|
3aebd40279 | ||
|
|
eadd074402 | ||
|
|
dd45d49c22 | ||
|
|
8ac657b874 | ||
|
|
7b2301cec0 | ||
|
|
f9c59d934d | ||
|
|
3ffb2cfb6f | ||
|
|
79b9c31197 | ||
|
|
f0c6edacf6 | ||
|
|
a63c1891a0 | ||
|
|
873ca512bd | ||
|
|
19a357d92b | ||
|
|
a96b0d0b3f | ||
|
|
181668a3b3 | ||
|
|
83c4227d5f | ||
|
|
814bbf7d8d | ||
|
|
74047b28fc | ||
|
|
a2e7a52169 | ||
|
|
2ff5d21b1c | ||
|
|
3e0b69cacd | ||
|
|
917ad098f7 | ||
|
|
f93c39d022 | ||
|
|
4edc66d1bb | ||
|
|
5ba5ec4f4b | ||
|
|
a3c17a15da | ||
|
|
c0401a8a28 | ||
|
|
c50393467e | ||
|
|
d448825bed | ||
|
|
961a3330e1 | ||
|
|
07221a1329 | ||
|
|
97ad1c2b39 | ||
|
|
540d172011 | ||
|
|
a0c5e8a86e | ||
|
|
361c938985 | ||
|
|
3525144aeb | ||
|
|
cb3ace8dcd | ||
|
|
d77dea20bc | ||
|
|
1a3caff269 | ||
|
|
15ad9c81aa | ||
|
|
832f94c1b9 | ||
|
|
f0e6d9439e | ||
|
|
7aa5f9d5a0 | ||
|
|
9feae9ff35 |
@@ -0,0 +1,14 @@
|
|||||||
|
# Copy to .env and fill in. Only these two matter.
|
||||||
|
|
||||||
|
# A GitHub personal access token. Classic or fine-grained, no scopes needed
|
||||||
|
# for public data - it is only used to raise your GitHub API rate limit.
|
||||||
|
# Create one at https://github.com/settings/tokens
|
||||||
|
GITHUB_PAT=
|
||||||
|
|
||||||
|
# Shared secret the three services use to talk to each other. Any random
|
||||||
|
# string; it never leaves your machine. Generate one with:
|
||||||
|
# openssl rand -hex 32
|
||||||
|
FETCHER_INTERNAL_TOKEN=
|
||||||
|
|
||||||
|
# Port the card service listens on (http://localhost:PORT).
|
||||||
|
#GHSTATS_PORT=5003
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
name: build and deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: build ${{ matrix.service }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
service: [fetcher, generator, edge]
|
||||||
|
outputs:
|
||||||
|
image_tag: ${{ steps.tag.outputs.value }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to GHCR
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Compute image tag (sha-<short>)
|
||||||
|
id: tag
|
||||||
|
env:
|
||||||
|
SHA: ${{ github.sha }}
|
||||||
|
run: echo "value=sha-${SHA:0:7}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Compute image name (lowercase)
|
||||||
|
id: img
|
||||||
|
env:
|
||||||
|
OWNER: ${{ github.repository_owner }}
|
||||||
|
SERVICE: ${{ matrix.service }}
|
||||||
|
run: echo "name=${REGISTRY}/${OWNER,,}/ghstats-${SERVICE}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Extract metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ steps.img.outputs.name }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ steps.tag.outputs.value }}
|
||||||
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.service }} image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ./${{ matrix.service }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: ${{ github.event_name == 'push' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha,scope=${{ matrix.service }}
|
||||||
|
cache-to: type=gha,mode=max,scope=${{ matrix.service }}
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
name: deploy to mini PC
|
||||||
|
needs: build
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Deploy compose stack
|
||||||
|
env:
|
||||||
|
IMAGE_TAG: ${{ needs.build.outputs.image_tag }}
|
||||||
|
GITHUB_PAT: ${{ secrets.FETCHER_GITHUB_PAT }}
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${{ secrets.FETCHER_INTERNAL_TOKEN }}
|
||||||
|
GH_OAUTH_CLIENT_ID: ${{ secrets.GH_OAUTH_CLIENT_ID }}
|
||||||
|
GH_OAUTH_CLIENT_SECRET: ${{ secrets.GH_OAUTH_CLIENT_SECRET }}
|
||||||
|
GENERATOR_SECRET_KEY: ${{ secrets.GENERATOR_SECRET_KEY }}
|
||||||
|
ALLOWED_ORIGINS: ${{ secrets.ALLOWED_ORIGINS }}
|
||||||
|
DEV_DASHBOARD_USER: ${{ secrets.DEV_DASHBOARD_USER }}
|
||||||
|
DEV_DASHBOARD_PASSWORD: ${{ secrets.DEV_DASHBOARD_PASSWORD }}
|
||||||
|
run: ./deploy/deploy.sh
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
name: health check
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
# Every 15 minutes — matches the refresh cron cadence
|
||||||
|
- cron: '*/15 * * * *'
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: health-check-${{ github.ref }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
name: pytest-${{ matrix.service }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Scheduled runs are an uptime probe only — skip the test matrix.
|
||||||
|
if: github.event_name != 'schedule'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
service: [fetcher, generator, edge]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
cache: pip
|
||||||
|
cache-dependency-path: ${{ matrix.service }}/requirements.txt
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: ${{ matrix.service }}
|
||||||
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Run pytest
|
||||||
|
id: pytest
|
||||||
|
working-directory: ${{ matrix.service }}
|
||||||
|
run: |
|
||||||
|
set -o pipefail
|
||||||
|
pytest -v --tb=short --color=no 2>&1 | tee "/tmp/pytest-${SERVICE}.log"
|
||||||
|
env:
|
||||||
|
SERVICE: ${{ matrix.service }}
|
||||||
|
|
||||||
|
- name: Upload pytest log
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: pytest-${{ matrix.service }}
|
||||||
|
path: /tmp/pytest-${{ matrix.service }}.log
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
|
site-health:
|
||||||
|
name: site-health
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Only probe production on schedule / manual / push to main — not on
|
||||||
|
# PRs, where failures wouldn't indicate a prod incident.
|
||||||
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
|
||||||
|
steps:
|
||||||
|
- name: Check edge homepage
|
||||||
|
id: check-edge
|
||||||
|
run: |
|
||||||
|
echo "GET https://gh-stats.com/"
|
||||||
|
HTTP_CODE=$(curl -sSL -o /tmp/edge-home.html -w "%{http_code}" --max-time 30 https://gh-stats.com/)
|
||||||
|
echo "HTTP $HTTP_CODE"
|
||||||
|
if [ "$HTTP_CODE" != "200" ]; then
|
||||||
|
echo "::error::Edge homepage returned HTTP $HTTP_CODE"
|
||||||
|
head -c 500 /tmp/edge-home.html || true
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Check widget SVG endpoint
|
||||||
|
id: check-widget
|
||||||
|
run: |
|
||||||
|
# Cloudflare routes /api/* to the generator directly. The bare
|
||||||
|
# /<user> and /<user>/<widget>.svg paths land on the SPA shell
|
||||||
|
# in prod, so we probe the canonical /api/<user>/<widget>.svg.
|
||||||
|
URL="https://gh-stats.com/api/ShayManor/grade.svg"
|
||||||
|
echo "GET $URL"
|
||||||
|
HTTP_CODE=$(curl -sS -D /tmp/widget-headers.txt -o /tmp/widget-body.svg \
|
||||||
|
-w "%{http_code}" --max-time 30 "$URL")
|
||||||
|
echo "HTTP $HTTP_CODE"
|
||||||
|
cat /tmp/widget-headers.txt
|
||||||
|
if [ "$HTTP_CODE" != "200" ]; then
|
||||||
|
echo "::error::Widget endpoint returned HTTP $HTTP_CODE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
CT=$(grep -i '^content-type:' /tmp/widget-headers.txt | tail -n1 | awk '{print $2}' | tr -d '\r' || true)
|
||||||
|
case "$CT" in
|
||||||
|
image/svg+xml*) : ;;
|
||||||
|
*) echo "::error::Unexpected Content-Type='$CT' (expected image/svg+xml)"; exit 1;;
|
||||||
|
esac
|
||||||
|
if ! head -c 200 /tmp/widget-body.svg | grep -q '<svg'; then
|
||||||
|
echo "::error::Response body does not look like SVG"
|
||||||
|
head -c 200 /tmp/widget-body.svg; echo
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
STATUS=$(grep -i '^x-widget-status:' /tmp/widget-headers.txt | tail -n1 | awk '{print $2}' | tr -d '\r' || true)
|
||||||
|
# ready / building / rate_limited are healthy; absent is fine
|
||||||
|
# on cache hits; not_found is a failure.
|
||||||
|
case "$STATUS" in
|
||||||
|
""|ready|building|rate_limited) echo "X-Widget-Status='${STATUS:-<absent>}' (ok)";;
|
||||||
|
*) echo "::error::Unhealthy X-Widget-Status='$STATUS'"; exit 1;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
- name: Check generator health pipeline
|
||||||
|
id: check-api
|
||||||
|
run: |
|
||||||
|
# Generator's purpose-built liveness probe, routed through
|
||||||
|
# Cloudflare's /api/* rule.
|
||||||
|
URL="https://gh-stats.com/api/health"
|
||||||
|
echo "GET $URL"
|
||||||
|
BODY=$(curl -sS --max-time 30 -w "\n%{http_code}" "$URL")
|
||||||
|
HTTP_CODE=$(printf '%s\n' "$BODY" | tail -n1)
|
||||||
|
JSON=$(printf '%s\n' "$BODY" | sed '$d')
|
||||||
|
echo "HTTP $HTTP_CODE"
|
||||||
|
echo "$JSON"
|
||||||
|
if [ "$HTTP_CODE" != "200" ]; then
|
||||||
|
echo "::error::/api/health returned HTTP $HTTP_CODE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
STATUS=$(printf '%s' "$JSON" | python3 -c 'import json,sys; print(json.load(sys.stdin).get("status",""))' 2>/dev/null || echo "")
|
||||||
|
if [ "$STATUS" != "ok" ]; then
|
||||||
|
echo "::error::/api/health reports status='$STATUS' (expected 'ok')"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "generator pipeline healthy"
|
||||||
|
|
||||||
|
notify:
|
||||||
|
name: notify-on-failure
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [tests, site-health]
|
||||||
|
if: always() && (needs.tests.result == 'failure' || needs.site-health.result == 'failure')
|
||||||
|
env:
|
||||||
|
TESTS_RESULT: ${{ needs.tests.result }}
|
||||||
|
HEALTH_RESULT: ${{ needs.site-health.result }}
|
||||||
|
EVENT_NAME: ${{ github.event_name }}
|
||||||
|
REF_NAME: ${{ github.ref_name }}
|
||||||
|
COMMIT_SHA: ${{ github.sha }}
|
||||||
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
SERVER_URL: ${{ github.server_url }}
|
||||||
|
RUN_ID: ${{ github.run_id }}
|
||||||
|
steps:
|
||||||
|
- name: Download pytest logs
|
||||||
|
if: needs.tests.result == 'failure'
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: logs
|
||||||
|
pattern: pytest-*
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Assemble email body
|
||||||
|
run: |
|
||||||
|
NOW=$(date -u '+%Y-%m-%d %H:%M:%S UTC')
|
||||||
|
RUN_URL="${SERVER_URL}/${REPO}/actions/runs/${RUN_ID}"
|
||||||
|
{
|
||||||
|
echo "gh-stats.com — health check failed"
|
||||||
|
echo "===================================="
|
||||||
|
echo ""
|
||||||
|
case "$EVENT_NAME" in
|
||||||
|
schedule) echo "Trigger: scheduled uptime probe";;
|
||||||
|
push) echo "Trigger: push to ${REF_NAME} (${COMMIT_SHA})";;
|
||||||
|
pull_request) echo "Trigger: PR #${PR_NUMBER} → main";;
|
||||||
|
workflow_dispatch) echo "Trigger: manual run";;
|
||||||
|
*) echo "Trigger: ${EVENT_NAME}";;
|
||||||
|
esac
|
||||||
|
echo "Time: $NOW"
|
||||||
|
echo "Repo: ${REPO}"
|
||||||
|
echo ""
|
||||||
|
echo "Job results"
|
||||||
|
echo "-----------"
|
||||||
|
printf " %-14s %s\n" "pytest:" "${TESTS_RESULT}"
|
||||||
|
printf " %-14s %s\n" "site-health:" "${HEALTH_RESULT}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
if [ "$HEALTH_RESULT" = "failure" ]; then
|
||||||
|
echo "Site health"
|
||||||
|
echo "-----------"
|
||||||
|
echo " One or more endpoints on https://gh-stats.com are not"
|
||||||
|
echo " responding as expected. See the run logs for the failing"
|
||||||
|
echo " step and its HTTP code."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$TESTS_RESULT" = "failure" ] && [ -d logs ]; then
|
||||||
|
echo "Failing tests"
|
||||||
|
echo "-------------"
|
||||||
|
for dir in logs/pytest-*; do
|
||||||
|
[ -d "$dir" ] || continue
|
||||||
|
service=${dir#logs/pytest-}
|
||||||
|
log="$dir/pytest-${service}.log"
|
||||||
|
[ -f "$log" ] || continue
|
||||||
|
# Did this service actually fail? pytest prints FAILED lines
|
||||||
|
# per failure and a summary like "=== 3 failed ...". If
|
||||||
|
# neither appears, skip it.
|
||||||
|
if ! grep -qE '^(FAILED |=+ .* failed)' "$log"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
echo "[$service]"
|
||||||
|
grep -E '^(FAILED |=+ .* (failed|error))' "$log" | head -n 20
|
||||||
|
echo "..."
|
||||||
|
tail -n 60 "$log"
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Full logs"
|
||||||
|
echo "---------"
|
||||||
|
echo " $RUN_URL"
|
||||||
|
echo ""
|
||||||
|
echo "--"
|
||||||
|
echo "github-readme-stats automated monitor"
|
||||||
|
} > /tmp/email-body.txt
|
||||||
|
|
||||||
|
echo "----- email body -----"
|
||||||
|
cat /tmp/email-body.txt
|
||||||
|
echo "----------------------"
|
||||||
|
|
||||||
|
- name: Send email via ntfy
|
||||||
|
env:
|
||||||
|
NTFY_TOKEN: ${{ secrets.NTFY_ACCESS_TOKEN }}
|
||||||
|
NTFY_TOPIC: ${{ secrets.NTFY_TOPIC }}
|
||||||
|
NOTIFY_EMAIL: ${{ secrets.NOTIFY_EMAIL }}
|
||||||
|
run: |
|
||||||
|
missing=()
|
||||||
|
[ -z "$NTFY_TOKEN" ] && missing+=("NTFY_ACCESS_TOKEN")
|
||||||
|
[ -z "$NTFY_TOPIC" ] && missing+=("NTFY_TOPIC")
|
||||||
|
[ -z "$NOTIFY_EMAIL" ] && missing+=("NOTIFY_EMAIL")
|
||||||
|
if [ ${#missing[@]} -gt 0 ]; then
|
||||||
|
echo "::error::Missing required secret(s): ${missing[*]}"
|
||||||
|
echo "::error::Configure at: Settings → Secrets and variables → Actions"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$HEALTH_RESULT" = "failure" ] && [ "$TESTS_RESULT" = "failure" ]; then
|
||||||
|
SUBJECT="gh-stats.com is DOWN and tests are failing"
|
||||||
|
elif [ "$HEALTH_RESULT" = "failure" ]; then
|
||||||
|
SUBJECT="gh-stats.com is DOWN"
|
||||||
|
else
|
||||||
|
SUBJECT="gh-stats.com tests failed on ${REF_NAME}"
|
||||||
|
fi
|
||||||
|
RUN_URL="${SERVER_URL}/${REPO}/actions/runs/${RUN_ID}"
|
||||||
|
|
||||||
|
curl -fsS \
|
||||||
|
-H "Title: $SUBJECT" \
|
||||||
|
-H "Priority: high" \
|
||||||
|
-H "Tags: warning,rotating_light,gh-stats" \
|
||||||
|
-H "Email: $NOTIFY_EMAIL" \
|
||||||
|
-H "Click: $RUN_URL" \
|
||||||
|
-H "Authorization: Bearer $NTFY_TOKEN" \
|
||||||
|
--data-binary @/tmp/email-body.txt \
|
||||||
|
"https://ntfy.sh/$NTFY_TOPIC"
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
name: tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pytest:
|
||||||
|
name: ${{ matrix.service }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
service: [fetcher, generator, edge]
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ${{ matrix.service }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
cache: pip
|
||||||
|
cache-dependency-path: ${{ matrix.service }}/requirements.txt
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Run pytest
|
||||||
|
run: pytest -v
|
||||||
@@ -14,8 +14,8 @@ dist/
|
|||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
/lib/
|
||||||
lib64/
|
/lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
var/
|
var/
|
||||||
@@ -205,3 +205,40 @@ cython_debug/
|
|||||||
marimo/_static/
|
marimo/_static/
|
||||||
marimo/_lsp/
|
marimo/_lsp/
|
||||||
__marimo__/
|
__marimo__/
|
||||||
|
|
||||||
|
# Per-service SQLite databases (runtime data)
|
||||||
|
fetcher/data/*.db
|
||||||
|
fetcher/data/*.db-wal
|
||||||
|
fetcher/data/*.db-shm
|
||||||
|
generator/data/*.db
|
||||||
|
generator/data/*.db-wal
|
||||||
|
generator/data/*.db-shm
|
||||||
|
|
||||||
|
# Built frontend bundle
|
||||||
|
generator/src/static/
|
||||||
|
generator/frontend/dist/
|
||||||
|
generator/frontend/node_modules/
|
||||||
|
|
||||||
|
# Python build artifacts
|
||||||
|
**/__pycache__/
|
||||||
|
**/*.pyc
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Widget build artifacts at repo root (retired)
|
||||||
|
/widget_*.svg
|
||||||
|
/data/ghstats.db
|
||||||
|
|
||||||
|
# Editor / tooling caches
|
||||||
|
.idea/
|
||||||
|
.claude/
|
||||||
|
.superpowers/
|
||||||
|
.playwright-mcp/
|
||||||
|
screenshots/
|
||||||
|
|
||||||
|
# Kept locally, not tracked
|
||||||
|
/CLAUDE.md
|
||||||
|
/docs/
|
||||||
|
**/*.md
|
||||||
|
!README.md
|
||||||
|
!**/README.md
|
||||||
|
/data/
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Shay Manor
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -1,90 +1,439 @@
|
|||||||
# GitHub README Stats
|
# github-readme-stats
|
||||||
|
|
||||||
Generate polished SVG profile cards from your GitHub data. Fetches your repos, contributions, languages, and collaborators, then renders them into composable widgets you can drop into your profile README.
|
[](https://github.com/ShayManor/github-readme-stats/actions/workflows/tests.yml)
|
||||||
|
[](https://github.com/ShayManor/github-readme-stats/actions/workflows/deploy.yml)
|
||||||
|
|
||||||
<p align="center">
|
A single SVG widget you drop into your GitHub profile README. It scores
|
||||||
<img src="widget_shaymanor.svg" width="420" alt="Example composite widget" />
|
your account, charts your contribution timeline, highlights your top
|
||||||
</p>
|
collaborators, breaks down your languages, tracks your commit streaks,
|
||||||
|
and earns you tags like `Backend`, `ML`, or `Founder #42`.
|
||||||
|
|
||||||
## Widgets
|
[](https://gh-stats.com)
|
||||||
|
|
||||||
| Widget | What it shows |
|
That card is live, not a screenshot. Swap in your own username:
|
||||||
|--------|--------------|
|
|
||||||
| **Grade** | Letter grade (S through F) with score breakdown, stats, and inferred role tags |
|
|
||||||
| **Impact** | Contribution timeline over the last 6 months |
|
|
||||||
| **Collaborators** | Top people you've committed alongside, ranked by shared commits |
|
|
||||||
| **Focus** | Where your recent work falls (Backend, Frontend, ML, DevOps, etc.) |
|
|
||||||
| **Languages** | Donut chart of your most-used languages by LOC |
|
|
||||||
| **Achievements** | Custom badges you define (hackathons, awards, milestones) |
|
|
||||||
|
|
||||||
Each widget is also saved individually as `widget_<name>.svg`.
|
```md
|
||||||
|
[](https://gh-stats.com)
|
||||||
## Quick Start
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Basic (public data only)
|
|
||||||
python run.py <username>
|
|
||||||
|
|
||||||
# With a GitHub token for full commit/contribution data
|
|
||||||
GITHUB_PAT=<your-token> python run.py <username>
|
|
||||||
|
|
||||||
# Choose a theme
|
|
||||||
python run.py <username> nord
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Output lands in the repo root as `widget_<username>.svg`.
|
<img src="./assets/examples/composite-midnight.svg" width="420" alt="composite widget, midnight theme" />
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Table of contents (click to expand)</summary>
|
||||||
|
|
||||||
|
- [Quick start](#quick-start)
|
||||||
|
- [Themes](#themes)
|
||||||
|
- [Individual widgets](#individual-widgets)
|
||||||
|
- [Migrating from github-readme-stats](#migrating-from-github-readme-stats)
|
||||||
|
- [Query parameter reference](#query-parameter-reference)
|
||||||
|
- [Auto-awarded tags](#auto-awarded-tags)
|
||||||
|
- [Refreshing your data](#refreshing-your-data)
|
||||||
|
- [FAQ](#faq)
|
||||||
|
- [Gallery](#gallery)
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick start
|
||||||
|
|
||||||
|
1. Open <https://gh-stats.com/api/>.
|
||||||
|
2. Sign in with GitHub. Signing in is how you prove ownership of the
|
||||||
|
username, and it unlocks the editor.
|
||||||
|
3. Pick a theme, reorder widgets, add any custom tags or achievements.
|
||||||
|
4. Click **Get embed code**.
|
||||||
|
5. Paste this one line into your profile README:
|
||||||
|
|
||||||
|
```md
|
||||||
|
[](https://gh-stats.com)
|
||||||
|
```
|
||||||
|
|
||||||
|
The image URL is stable. Once it's in your README you can change
|
||||||
|
themes, tags, or widget order in the editor at any time without
|
||||||
|
touching the markdown.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> Only public GitHub activity is counted. Private repos, private
|
||||||
|
> commit counts, and contributions to org-restricted repos are never
|
||||||
|
> visible to the fetcher.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Themes
|
## Themes
|
||||||
|
|
||||||
Five built-in themes:
|
Pass `?theme=<name>` on the URL, or pick one in the editor.
|
||||||
|
|
||||||
| Theme | Style |
|
| Theme | Preview |
|
||||||
|-------|-------|
|
|---|---|
|
||||||
| `midnight` / `dark` | Dark blue-gray (default) |
|
| `midnight` (default) | <img src="./assets/examples/composite-midnight.svg" width="280" /> |
|
||||||
| `onyx` | High-contrast on near-black |
|
| `onyx` | <img src="./assets/examples/composite-onyx.svg" width="280" /> |
|
||||||
| `nord` | Muted pastels on slate |
|
| `nord` | <img src="./assets/examples/composite-nord.svg" width="280" /> |
|
||||||
| `clean` / `light` | White background |
|
| `clean` | <img src="./assets/examples/composite-clean.svg" width="280" /> |
|
||||||
| `paper` | Warm off-white, sepia accents |
|
| `paper` | <img src="./assets/examples/composite-paper.svg" width="280" /> |
|
||||||
|
|
||||||
## Web UI
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
A React frontend lets you customize widgets interactively with live preview and per-widget advanced settings (colors, counts, etc.).
|
### Auto-switching for dark and light mode
|
||||||
|
|
||||||
|
Add GitHub's theme suffix to serve a different image to dark vs. light
|
||||||
|
viewers:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
Or use `<picture>` for precise `prefers-color-scheme` control:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<picture>
|
||||||
|
<source srcset="https://gh-stats.com/api/YOUR_USERNAME?theme=onyx"
|
||||||
|
media="(prefers-color-scheme: dark)" />
|
||||||
|
<source srcset="https://gh-stats.com/api/YOUR_USERNAME?theme=clean"
|
||||||
|
media="(prefers-color-scheme: light)" />
|
||||||
|
<img src="https://gh-stats.com/api/YOUR_USERNAME" />
|
||||||
|
</picture>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Individual widgets
|
||||||
|
|
||||||
|
Every widget is independently addressable at
|
||||||
|
`https://gh-stats.com/api/<username>/<widget>.svg`. Embed one, two, or all
|
||||||
|
of them.
|
||||||
|
|
||||||
|
### Grade
|
||||||
|
|
||||||
|
Overall score (0 to 100), letter grade, and your top role tags.
|
||||||
|
|
||||||
|
<img src="./assets/examples/grade.svg" width="380" alt="grade widget" />
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
#### How the score works
|
||||||
|
|
||||||
|
The score is a weighted sum of seven public signals. Each signal earns
|
||||||
|
0 to 100 points, reaching 100 at the cap shown, and the weights add up to
|
||||||
|
100%.
|
||||||
|
|
||||||
|
| Signal | Weight | Cap |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Contributions, all time (commits, PRs, issues, reviews) | 33% | 3,000 |
|
||||||
|
| Active weeks in the last year | 22% | 40 |
|
||||||
|
| Repositories (owned and contributed to, at most 50 counted) | 15% | 40 |
|
||||||
|
| Stars across those repositories | 11% | 200 |
|
||||||
|
| Forks across those repositories | 8% | 20 |
|
||||||
|
| Recent public events | 8% | 80 |
|
||||||
|
| Followers | 3% | 100 |
|
||||||
|
|
||||||
|
Letters follow the total: S++ from 97, S+ 93, S 89, A++ 86, A+ 82, A 78,
|
||||||
|
A- 72, B++ 68, B+ 64, B 58, B- 50, C+ 42, and C below that. The score
|
||||||
|
measures the volume and regularity of public activity, not code quality.
|
||||||
|
Private work is invisible to it. To leave it off your card, turn off the
|
||||||
|
Grade widget in the editor.
|
||||||
|
|
||||||
|
### Impact
|
||||||
|
|
||||||
|
Your contribution volume over the last 6 months, drawn as a smooth area
|
||||||
|
chart.
|
||||||
|
|
||||||
|
<img src="./assets/examples/impact.svg" width="380" alt="impact widget" />
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Streaks
|
||||||
|
|
||||||
|
Current and longest contribution streaks.
|
||||||
|
|
||||||
|
<img src="./assets/examples/streaks.svg" width="380" alt="streaks widget" />
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Top collaborators
|
||||||
|
|
||||||
|
The people you actually work with, filtered down to repos of a
|
||||||
|
reasonable size so a drive-by PR to `react` does not put the React team
|
||||||
|
on your card.
|
||||||
|
|
||||||
|
<img src="./assets/examples/collaborators.svg" width="380" alt="collaborators widget" />
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Recent focus
|
||||||
|
|
||||||
|
What you have actually been working on lately, grouped by topic.
|
||||||
|
|
||||||
|
<img src="./assets/examples/focus.svg" width="380" alt="focus widget" />
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Languages
|
||||||
|
|
||||||
|
Your language mix, weighted by bytes in repos you authored. Forks with
|
||||||
|
no meaningful contribution are ignored.
|
||||||
|
|
||||||
|
<img src="./assets/examples/languages.svg" width="380" alt="languages widget" />
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Achievements
|
||||||
|
|
||||||
|
Hand-entered lines for hackathons, talks, awards, and certifications.
|
||||||
|
|
||||||
|
<img src="./assets/examples/achievements.svg" width="380" alt="achievements widget" />
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
### Side by side
|
||||||
|
|
||||||
|
GitHub strips inline CSS, so an HTML table is the simplest way to put
|
||||||
|
two widgets next to each other.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://gh-stats.com/api/YOUR_USERNAME/grade.svg" /></td>
|
||||||
|
<td><img src="https://gh-stats.com/api/YOUR_USERNAME/languages.svg" /></td>
|
||||||
|
</tr></table>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Migrating from github-readme-stats
|
||||||
|
|
||||||
|
[`anuraghazra/github-readme-stats`](https://github.com/anuraghazra/github-readme-stats)
|
||||||
|
is the card most profile READMEs use, and it is a good project. Its README now
|
||||||
|
carries a deprecation notice pointing at a successor, so if you are looking to
|
||||||
|
move, the common URL shapes work here with only the domain changed.
|
||||||
|
|
||||||
|
| Your current URL | Change it to |
|
||||||
|
|---|---|
|
||||||
|
| `github-readme-stats.vercel.app/api?username=U` | `gh-stats.com/api?username=U` |
|
||||||
|
| `github-readme-stats.vercel.app/api/top-langs?username=U` | `gh-stats.com/api/top-langs?username=U` |
|
||||||
|
| `github-readme-streak-stats.herokuapp.com/?user=U` | `gh-stats.com/api/streak/U` |
|
||||||
|
|
||||||
|
Nothing else in your README changes.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> `theme=` is honoured on the composite card (`/api/<user>`). On the
|
||||||
|
> compatibility and single-widget URLs above it is currently ignored and the
|
||||||
|
> default theme is served.
|
||||||
|
|
||||||
|
If you would rather replace several badges with one image, use the composite
|
||||||
|
card instead and delete the rest:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
## Query parameter reference
|
||||||
|
|
||||||
|
Every URL accepts query parameters. They override the owner's saved
|
||||||
|
settings on a per-embed basis, so viewers can tweak the look without
|
||||||
|
changing anything the owner has stored.
|
||||||
|
|
||||||
|
Values with special characters must be URL-encoded: `#a78bfa` becomes
|
||||||
|
`%23a78bfa`, a space becomes `%20`.
|
||||||
|
|
||||||
|
### Common parameters
|
||||||
|
|
||||||
|
| Parameter | What it does | Example |
|
||||||
|
|---|---|---|
|
||||||
|
| `theme` | Built-in theme name. | `?theme=onyx` |
|
||||||
|
| `widgets` | Which widgets to show on the composite card. | `?widgets=grade,streaks,languages` |
|
||||||
|
| `order` | Render order on the composite card. | `?order=grade,streaks,languages` |
|
||||||
|
| `hide` | Languages to exclude from the languages widget. | `?hide=HTML,CSS,Makefile` |
|
||||||
|
| `tags` | Extra custom role tags on the grade widget. | `?tags=ML,Systems` |
|
||||||
|
|
||||||
|
### Per-widget parameters
|
||||||
|
|
||||||
|
Use dot notation: `<widget>.<key>=<value>`.
|
||||||
|
|
||||||
|
| Parameter | What it does | Type | Default |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `grade.max_tags` | Max role tags shown (1 to 20). | int | all tags |
|
||||||
|
| `impact.line_color` | Accent color for the area curve. | hex color | theme accent |
|
||||||
|
| `streaks.color` | Accent color for the current-streak text. | hex color | theme accent |
|
||||||
|
| `collaborators.max_count` | Max collaborators shown (1 to 10). | int | 5 |
|
||||||
|
| `collaborators.bar_color` | Accent color for the commit bars. | hex color | theme accent |
|
||||||
|
| `focus.max_categories` | Max focus clusters shown (1 to 10). | int | 6 |
|
||||||
|
| `languages.max_languages` | Max languages shown (1 to 10). | int | 5 |
|
||||||
|
| `achievements.max_items` | Max achievement rows shown (1 to 10). | int | 5 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Auto-awarded tags
|
||||||
|
|
||||||
|
Some tags on the grade card are earned from real activity. No query
|
||||||
|
parameter will add them if you have not earned them:
|
||||||
|
|
||||||
|
- `Founder #N` is your enrollment number, fixed when you first sign in.
|
||||||
|
- Role tags like `Backend`, `Frontend`, `ML`, `Mobile`, `DevOps`,
|
||||||
|
`Cloud`, `Systems`, `Database`, `Security` are derived from your
|
||||||
|
language mix and repo topics.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Refreshing your data
|
||||||
|
|
||||||
|
The refresh cron re-pulls GitHub data every 15 minutes, so new commits
|
||||||
|
usually appear in your widget within that window. GitHub's image CDN
|
||||||
|
may add another minute or two on top.
|
||||||
|
|
||||||
|
If you need an immediate update (for example right after merging
|
||||||
|
something big), click **Refresh now** in the editor. It is a one-shot
|
||||||
|
per account, so save it for when it matters.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Self-hosting
|
||||||
|
|
||||||
|
The public instance at `gh-stats.com` is free and you do not need to run your
|
||||||
|
own. Self-host if you want your own rate limit, private repository data staying
|
||||||
|
on your hardware, or control over when cards rebuild.
|
||||||
|
|
||||||
|
You need Docker and a GitHub token. The token needs no scopes for public data;
|
||||||
|
it exists to raise your GitHub API rate limit.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Terminal 1 — start the generator API
|
git clone https://github.com/ShayManor/github-readme-stats
|
||||||
python -m src.generator_api # :5002
|
cd github-readme-stats
|
||||||
|
cp .env.example .env # put your token in GITHUB_PAT
|
||||||
# Terminal 2 — start the frontend
|
docker compose up -d --build
|
||||||
cd frontend && npm install && npm run dev # :3000
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Open `http://localhost:3000`, enter a GitHub username, tweak settings, and hit Generate.
|
Then open `http://localhost:5002` and embed from your own host:
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
All tuning lives in `src/config.py` and can be overridden with environment variables. Key knobs:
|
|
||||||
|
|
||||||
| Variable | Default | What it does |
|
|
||||||
|----------|---------|-------------|
|
|
||||||
| `GITHUB_PAT` | — | GitHub personal access token |
|
|
||||||
| `COMMIT_MAX_REPOS` | 10 | Max repos to scan for commits |
|
|
||||||
| `COMMIT_PER_REPO` | 30 | Max commits per repo |
|
|
||||||
| `COLLABORATOR_MIN_COMMITS` | 3 | Minimum shared commits to show a collaborator |
|
|
||||||
| `API_TIMEOUT` | 5 | Per-request timeout in seconds |
|
|
||||||
|
|
||||||
See [CONFIGURATION.md](CONFIGURATION.md) for the full list.
|
|
||||||
|
|
||||||
## Project Structure
|
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
```
|
```
|
||||||
src/
|
|
||||||
data/ # GitHub API fetching + data processing
|
Three services come up behind `docker compose`: `fetcher` talks to GitHub and
|
||||||
widgets/ # One SVG renderer per widget
|
owns the token, `generator` renders the SVGs and serves the web UI on 5002, and
|
||||||
themes/ # Color palettes
|
`edge` is a caching proxy on 5003 that serves cards at `/<username>`. Data lives
|
||||||
models/ # Typed data structures
|
in `./data`. Set `GHSTATS_PORT` to move the web UI off 5002.
|
||||||
utils/ # SVG helpers
|
|
||||||
config.py # All tunables
|
## FAQ
|
||||||
generate.py # CLI entry point
|
|
||||||
generator_api.py # Flask API for the web UI
|
**Can I use a private GitHub account?**
|
||||||
frontend/ # React + TypeScript + Vite
|
No. The service only reads public activity. Private repos, private
|
||||||
|
commit counts, and contributions to org-restricted repos are not
|
||||||
|
visible to GitHub's public API, so they are never part of the widget.
|
||||||
|
|
||||||
|
**How fresh is the data?**
|
||||||
|
Every 15 minutes, automatically. You can also click **Refresh now**
|
||||||
|
once per account for an immediate update.
|
||||||
|
|
||||||
|
**How do I edit my widget?**
|
||||||
|
Sign in with GitHub at <https://gh-stats.com/api/>. Only the account whose
|
||||||
|
login matches the username can edit that widget's settings.
|
||||||
|
|
||||||
|
**Can I change the widget without re-embedding?**
|
||||||
|
Yes. The image URL is stable. Edit in the editor, click **Get embed code**,
|
||||||
|
and the next fetch serves the new version. GitHub's image cache may
|
||||||
|
delay propagation by a few minutes.
|
||||||
|
|
||||||
|
**Can I embed someone else's widget with my own theme or filters?**
|
||||||
|
Yes, use the [query parameters](#query-parameter-reference). The
|
||||||
|
owner's saved settings are not affected.
|
||||||
|
|
||||||
|
**I am getting a placeholder card. What is wrong?**
|
||||||
|
`building` means the first render is still in progress, give it a
|
||||||
|
minute. `not_found` means GitHub does not know that username.
|
||||||
|
|
||||||
|
**Why does my languages card look wrong?**
|
||||||
|
It counts bytes in repos you authored. Forks with little commit
|
||||||
|
activity are dropped. Add `?hide=HTML,CSS,Makefile` if generated files
|
||||||
|
dominate the breakdown.
|
||||||
|
|
||||||
|
**Can I reorder widgets?**
|
||||||
|
Yes, either in the editor (drag and drop) or by passing
|
||||||
|
`?widgets=...&order=...` on the URL.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Gallery
|
||||||
|
|
||||||
|
### Composite themes
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>midnight</b><br/><img src="./assets/examples/composite-midnight.svg" width="260" /></td>
|
||||||
|
<td align="center"><b>onyx</b><br/><img src="./assets/examples/composite-onyx.svg" width="260" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>nord</b><br/><img src="./assets/examples/composite-nord.svg" width="260" /></td>
|
||||||
|
<td align="center"><b>clean</b><br/><img src="./assets/examples/composite-clean.svg" width="260" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>paper</b><br/><img src="./assets/examples/composite-paper.svg" width="260" /></td>
|
||||||
|
<td align="center"><b>custom (onyx, 3 widgets)</b><br/><img src="./assets/examples/composite-custom.svg" width="260" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
### Single-widget examples
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>Grade</b><br/><img src="./assets/examples/grade.svg" width="320" /></td>
|
||||||
|
<td align="center"><b>Grade (max_tags=3)</b><br/><img src="./assets/examples/grade-compact.svg" width="320" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>Impact</b><br/><img src="./assets/examples/impact.svg" width="320" /></td>
|
||||||
|
<td align="center"><b>Impact (purple line)</b><br/><img src="./assets/examples/impact-purple.svg" width="320" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>Streaks</b><br/><img src="./assets/examples/streaks.svg" width="320" /></td>
|
||||||
|
<td align="center"><b>Streaks (green)</b><br/><img src="./assets/examples/streaks-green.svg" width="320" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>Languages</b><br/><img src="./assets/examples/languages.svg" width="320" /></td>
|
||||||
|
<td align="center"><b>Languages (hide Shell, Dockerfile)</b><br/><img src="./assets/examples/languages-hide.svg" width="320" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>Collaborators</b><br/><img src="./assets/examples/collaborators.svg" width="320" /></td>
|
||||||
|
<td align="center"><b>Focus</b><br/><img src="./assets/examples/focus.svg" width="320" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><b>Achievements</b><br/><img src="./assets/examples/achievements.svg" width="320" /></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
### Mix and match
|
||||||
|
|
||||||
|
Embed two widgets side by side with an HTML table:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://gh-stats.com/api/YOUR_USERNAME/grade.svg" /></td>
|
||||||
|
<td><img src="https://gh-stats.com/api/YOUR_USERNAME/languages.svg" /></td>
|
||||||
|
</tr></table>
|
||||||
|
```
|
||||||
|
Stack a custom composite with only three widgets:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
|
Recolor the impact line:
|
||||||
|
|
||||||
|
```md
|
||||||
|

|
||||||
```
|
```
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="274" viewBox="0 0 380 274" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="272" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">ACHIEVEMENTS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 8)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#d29922" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#d29922" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<rect x="4" y="5" width="16" height="11" rx="1" fill="none" stroke="#d29922" stroke-width="1.5"/>
|
||||||
|
<rect x="3" y="16" width="18" height="1.5" rx="0.5" fill="#d29922" opacity="0.85"/>
|
||||||
|
<path d="M9 9l-2 3 2 3m6-6l2 3-2 3" stroke="#d29922" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">Hackathon winner</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Y Combinator AI Hackathon · 2025-11</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 64)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#3fb950" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#3fb950" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"
|
||||||
|
fill="none" stroke="#3fb950" stroke-width="1.5" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">Speaker at PyCon</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Async at scale · 2024-05</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 120)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#58a6ff" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#58a6ff" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M7 2h10v2h2.5c.8 0 1.5.7 1.5 1.5V8c0 1.7-1.3 3-3 3h-.5c-.5 1.5-1.8 2.7-3.5 3v2.5h3c.6 0 1 .4 1 1s-.4 1-1 1H7c-.6 0-1-.4-1-1s.4-1 1-1h3V14c-1.7-.3-3-1.5-3.5-3H6c-1.7 0-3-1.3-3-3V5.5C3 4.7 3.7 4 4.5 4H7V2zm0 4H4.5v2c0 .8.7 1.5 1.5 1.5h1V6zm12.5 0H17v3.5h1c.8 0 1.5-.7 1.5-1.5V6z" fill="#58a6ff" opacity="0.85"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">Open Source Award</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">GitHub Stars program · 2024-01</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 176)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#bc8cff" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#bc8cff" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<circle cx="12" cy="14" r="5" fill="#bc8cff" opacity="0.2"/>
|
||||||
|
<circle cx="12" cy="14" r="4" fill="none" stroke="#bc8cff" stroke-width="1.5"/>
|
||||||
|
<path d="M12 11.5l1 2 2.2.3-1.6 1.5.4 2.2-2-1-2 1 .4-2.2-1.6-1.5 2.2-.3z" fill="#bc8cff"/>
|
||||||
|
<path d="M9 3l3 8m0-8l3 8m-6-8h6" stroke="#bc8cff" stroke-width="1.5" fill="none" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">AWS Certified Solutions Architect</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Professional · 2023-09</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,89 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="298" viewBox="0 0 380 298" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="296" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">TOP COLLABORATORS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(36, 20)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(285, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">torvalds</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">4 repos · 142 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="120.0" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="120.0" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 70)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(165, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">G</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">gaearon</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">3 repos · 98 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="82.8169014084507" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="82.8169014084507" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 120)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(238, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">S</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">sindresorhus</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">2 repos · 64 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="54.08450704225352" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="54.08450704225352" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 170)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(157, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">tj</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">2 repos · 47 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="39.71830985915493" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="39.71830985915493" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 220)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(231, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">Y</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">yyx990803</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">1 repos · 31 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="26.197183098591548" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="26.197183098591548" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1,543 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="420" height="1756" viewBox="0 0 420 1756">
|
||||||
|
<rect width="420" height="1756" rx="16" fill="#ffffff"/>
|
||||||
|
<rect x="0.5" y="0.5" width="419" height="1755" rx="16"
|
||||||
|
fill="none" stroke="#d8dee4" stroke-width="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<svg x="20" y="20" width="380" height="226" viewBox="0 0 380 226">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="grade_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="grade_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="224" rx="10" ry="10"
|
||||||
|
fill="#f6f8fa" stroke="#d8dee4" stroke-width="1" filter="url(#grade_shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#eaeef2" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#eaeef2" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#24292f">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#656d76"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76" letter-spacing="0.4">Score <tspan fill="#24292f" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#eaeef2" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#656d76" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#656d76"/><line x1="7" y1="10" x2="7" y2="14" stroke="#656d76" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#656d76" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#24292f">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#656d76" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#656d76" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#656d76" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#24292f">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#656d76" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#24292f">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#656d76" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#656d76" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#656d76" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#656d76" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#24292f">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#656d76" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#656d76" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#656d76" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#656d76" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#24292f">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#eaeef2" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#0969da" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#0969da" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#0969da">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#0969da" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#0969da" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#0969da">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#0969da" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#0969da" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#0969da">Systems</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(177, 0)" opacity="0.9">
|
||||||
|
<rect width="51" height="24" rx="12" fill="#0969da" opacity="0.12"/>
|
||||||
|
<rect width="51" height="24" rx="12" fill="none" stroke="#0969da" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="25" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#0969da">Cloud</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(234, 0)" opacity="0.9">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#facc15" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#facc15" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#facc15">Founder #42</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0, 30)" opacity="0.55">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#0969da" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#0969da" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#0969da">Open source</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="262" width="380" height="200" viewBox="0 0 380 200">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="impact_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="impact_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="198" rx="10" ry="10"
|
||||||
|
fill="#f6f8fa" stroke="#d8dee4" stroke-width="1" filter="url(#impact_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#656d76" letter-spacing="0.8" opacity="0.7">IMPACT TIMELINE</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="impact_areaGrad" x1="0" y1="8" x2="0" y2="90" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#0969da" stop-opacity="0.35"/>
|
||||||
|
<stop offset="100%" stop-color="#0969da" stop-opacity="0.02"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<text x="34" y="12.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#656d76">41</text><line x1="40" y1="8.0" x2="356" y2="8.0" stroke="#eaeef2" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="53.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#656d76">20</text><line x1="40" y1="49.0" x2="356" y2="49.0" stroke="#eaeef2" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="94.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#656d76">0</text><line x1="40" y1="90.0" x2="356" y2="90.0" stroke="#eaeef2" stroke-width="0.5" stroke-dasharray="3,3"/>
|
||||||
|
<text x="40.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#656d76">2025-10</text><text x="204.3" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#656d76">2026-01</text><text x="356.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#656d76">2026-04</text>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0 L 356.0 90 L 40.0 90 Z" fill="url(#impact_areaGrad)"/>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0" fill="none" stroke="#0969da" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, 136)">
|
||||||
|
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="700" fill="#24292f">577</text>
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">commits over 6mo</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="478" width="380" height="170" viewBox="0 0 380 170">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="streaks_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="streaks_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#f6f8fa" stroke="#d8dee4" stroke-width="1" filter="url(#streaks_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#656d76" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#656d76">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#0969da">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#656d76">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#24292f">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#d8dee4" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#eaeef2"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#0969da"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#0969da"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="664" width="380" height="298" viewBox="0 0 380 298">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="collaborators_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="collaborators_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="296" rx="10" ry="10"
|
||||||
|
fill="#f6f8fa" stroke="#d8dee4" stroke-width="1" filter="url(#collaborators_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#656d76" letter-spacing="0.8" opacity="0.7">TOP COLLABORATORS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(36, 20)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(285, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">torvalds</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">4 repos · 142 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#eaeef2"/>
|
||||||
|
<rect x="200" y="-6" width="120.0" height="8" rx="4" fill="#8250df" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="120.0" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 70)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(165, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">G</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">gaearon</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">3 repos · 98 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#eaeef2"/>
|
||||||
|
<rect x="200" y="-6" width="82.8169014084507" height="8" rx="4" fill="#8250df" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="82.8169014084507" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 120)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(238, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">S</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">sindresorhus</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">2 repos · 64 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#eaeef2"/>
|
||||||
|
<rect x="200" y="-6" width="54.08450704225352" height="8" rx="4" fill="#8250df" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="54.08450704225352" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 170)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(157, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">tj</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">2 repos · 47 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#eaeef2"/>
|
||||||
|
<rect x="200" y="-6" width="39.71830985915493" height="8" rx="4" fill="#8250df" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="39.71830985915493" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 220)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(231, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">Y</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">yyx990803</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">1 repos · 31 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#eaeef2"/>
|
||||||
|
<rect x="200" y="-6" width="26.197183098591548" height="8" rx="4" fill="#8250df" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="26.197183098591548" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="978" width="380" height="234" viewBox="0 0 380 234">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="focus_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="focus_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="232" rx="10" ry="10"
|
||||||
|
fill="#f6f8fa" stroke="#d8dee4" stroke-width="1" filter="url(#focus_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#656d76" letter-spacing="0.8" opacity="0.7">RECENT FOCUS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#24292f">Backend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#eaeef2"/>
|
||||||
|
<rect x="90" y="4" width="210.0" height="14" rx="7" fill="#58a6ff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="210.0" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">412 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#58a6ff">38%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 36)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#24292f">ML</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#eaeef2"/>
|
||||||
|
<rect x="90" y="4" width="132.6315789473684" height="14" rx="7" fill="#3fb950" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="132.6315789473684" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">260 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#3fb950">24%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 72)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#24292f">Frontend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#eaeef2"/>
|
||||||
|
<rect x="90" y="4" width="99.47368421052632" height="14" rx="7" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="99.47368421052632" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">195 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#bc8cff">18%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 108)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#24292f">DevOps</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#eaeef2"/>
|
||||||
|
<rect x="90" y="4" width="66.3157894736842" height="14" rx="7" fill="#d29922" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="66.3157894736842" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">130 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#d29922">12%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 144)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#24292f">Cloud</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#eaeef2"/>
|
||||||
|
<rect x="90" y="4" width="44.21052631578947" height="14" rx="7" fill="#f0883e" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="44.21052631578947" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76">87 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#f0883e">8%</text>
|
||||||
|
</g>
|
||||||
|
<text x="16" y="188" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76" opacity="0.7">Recent activity · last year</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1228" width="380" height="208" viewBox="0 0 380 208">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="languages_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="languages_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="206" rx="10" ry="10"
|
||||||
|
fill="#f6f8fa" stroke="#d8dee4" stroke-width="1" filter="url(#languages_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#656d76" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="113.3 163.1" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="63.6 212.9" stroke-dashoffset="-113.3"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="163.1" to="-113.3" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="41.5 235.0" stroke-dashoffset="-176.9"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="99.5" to="-176.9" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="30.4 246.0" stroke-dashoffset="-218.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="58.1" to="-218.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#89e051" stroke-width="16"
|
||||||
|
stroke-dasharray="16.6 259.9" stroke-dashoffset="-248.8"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="27.6" to="-248.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#656d76" stroke-width="16"
|
||||||
|
stroke-dasharray="11.1 265.4" stroke-dashoffset="-265.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="11.1" to="-265.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="28" fill="#f6f8fa"/>
|
||||||
|
<text x="60" y="87.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#24292f">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#24292f">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#656d76">41%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#24292f">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#656d76">23%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#24292f">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#656d76">15%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#24292f">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#656d76">11%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 108)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#89e051"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#24292f">Shell</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#656d76">6%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 130)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#656d76"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#24292f">Other</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#656d76">4%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1452" width="380" height="274" viewBox="0 0 380 274">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="achievements_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="achievements_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="272" rx="10" ry="10"
|
||||||
|
fill="#f6f8fa" stroke="#d8dee4" stroke-width="1" filter="url(#achievements_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#656d76" letter-spacing="0.8" opacity="0.7">ACHIEVEMENTS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 8)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#9a6700" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#9a6700" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<rect x="4" y="5" width="16" height="11" rx="1" fill="none" stroke="#9a6700" stroke-width="1.5"/>
|
||||||
|
<rect x="3" y="16" width="18" height="1.5" rx="0.5" fill="#9a6700" opacity="0.85"/>
|
||||||
|
<path d="M9 9l-2 3 2 3m6-6l2 3-2 3" stroke="#9a6700" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">Hackathon winner</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">Y Combinator AI Hackathon · 2025-11</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 64)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#1a7f37" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#1a7f37" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"
|
||||||
|
fill="none" stroke="#1a7f37" stroke-width="1.5" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">Speaker at PyCon</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">Async at scale · 2024-05</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 120)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#0969da" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#0969da" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M7 2h10v2h2.5c.8 0 1.5.7 1.5 1.5V8c0 1.7-1.3 3-3 3h-.5c-.5 1.5-1.8 2.7-3.5 3v2.5h3c.6 0 1 .4 1 1s-.4 1-1 1H7c-.6 0-1-.4-1-1s.4-1 1-1h3V14c-1.7-.3-3-1.5-3.5-3H6c-1.7 0-3-1.3-3-3V5.5C3 4.7 3.7 4 4.5 4H7V2zm0 4H4.5v2c0 .8.7 1.5 1.5 1.5h1V6zm12.5 0H17v3.5h1c.8 0 1.5-.7 1.5-1.5V6z" fill="#0969da" opacity="0.85"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">Open Source Award</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">GitHub Stars program · 2024-01</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 176)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#8250df" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#8250df" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<circle cx="12" cy="14" r="5" fill="#8250df" opacity="0.2"/>
|
||||||
|
<circle cx="12" cy="14" r="4" fill="none" stroke="#8250df" stroke-width="1.5"/>
|
||||||
|
<path d="M12 11.5l1 2 2.2.3-1.6 1.5.4 2.2-2-1-2 1 .4-2.2-1.6-1.5 2.2-.3z" fill="#8250df"/>
|
||||||
|
<path d="M9 3l3 8m0-8l3 8m-6-8h6" stroke="#8250df" stroke-width="1.5" fill="none" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#24292f">AWS Certified Solutions Architect</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#656d76">Professional · 2023-09</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<text x="210" y="1748" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#656d76" opacity="0.5">Generated with gh-stats</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,268 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="420" height="686" viewBox="0 0 420 686">
|
||||||
|
<rect width="420" height="686" rx="16" fill="#09090b"/>
|
||||||
|
<rect x="0.5" y="0.5" width="419" height="685" rx="16"
|
||||||
|
fill="none" stroke="#27272a" stroke-width="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<svg x="20" y="20" width="380" height="226" viewBox="0 0 380 226">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="grade_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="grade_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="224" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#grade_shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#27272a" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#27272a" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#fafafa">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#a1a1aa"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa" letter-spacing="0.4">Score <tspan fill="#fafafa" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#27272a" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#a1a1aa" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#a1a1aa"/><line x1="7" y1="10" x2="7" y2="14" stroke="#a1a1aa" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#a1a1aa" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#a1a1aa" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#a1a1aa" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#a1a1aa" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#a1a1aa" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#a1a1aa" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#a1a1aa" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#a1a1aa" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#27272a" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Systems</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(177, 0)" opacity="0.9">
|
||||||
|
<rect width="51" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="51" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="25" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Cloud</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(234, 0)" opacity="0.9">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#facc15" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#facc15" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#facc15">Founder #42</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0, 30)" opacity="0.55">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Open source</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="262" width="380" height="170" viewBox="0 0 380 170">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="streaks_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="streaks_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#streaks_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#a1a1aa">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#a78bfa">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#a1a1aa">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#fafafa">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#27272a" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#27272a"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#a78bfa"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#a78bfa"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="448" width="380" height="208" viewBox="0 0 380 208">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="languages_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="languages_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="206" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#languages_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="113.3 163.1" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="63.6 212.9" stroke-dashoffset="-113.3"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="163.1" to="-113.3" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="41.5 235.0" stroke-dashoffset="-176.9"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="99.5" to="-176.9" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="30.4 246.0" stroke-dashoffset="-218.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="58.1" to="-218.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#89e051" stroke-width="16"
|
||||||
|
stroke-dasharray="16.6 259.9" stroke-dashoffset="-248.8"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="27.6" to="-248.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#a1a1aa" stroke-width="16"
|
||||||
|
stroke-dasharray="11.1 265.4" stroke-dashoffset="-265.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="11.1" to="-265.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="28" fill="#18181b"/>
|
||||||
|
<text x="60" y="87.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#fafafa">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">41%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">23%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">15%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">11%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 108)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#89e051"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Shell</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">6%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 130)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#a1a1aa"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Other</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">4%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<text x="210" y="678" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa" opacity="0.5">Generated with gh-stats</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,543 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="420" height="1756" viewBox="0 0 420 1756">
|
||||||
|
<rect width="420" height="1756" rx="16" fill="#121820"/>
|
||||||
|
<rect x="0.5" y="0.5" width="419" height="1755" rx="16"
|
||||||
|
fill="none" stroke="#2a3444" stroke-width="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<svg x="20" y="20" width="380" height="226" viewBox="0 0 380 226">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="grade_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="grade_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="224" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#grade_shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#1e2836" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#1e2836" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#d1d9e0">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#7d8895"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895" letter-spacing="0.4">Score <tspan fill="#d1d9e0" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#1e2836" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#7d8895" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#7d8895"/><line x1="7" y1="10" x2="7" y2="14" stroke="#7d8895" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#7d8895" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#7d8895" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#7d8895" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#7d8895" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#7d8895" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#7d8895" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#7d8895" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#7d8895" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#7d8895" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#7d8895" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#7d8895" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#7d8895" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#7d8895" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#1e2836" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Systems</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(177, 0)" opacity="0.9">
|
||||||
|
<rect width="51" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="51" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="25" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Cloud</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(234, 0)" opacity="0.9">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#facc15" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#facc15" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#facc15">Founder #42</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0, 30)" opacity="0.55">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Open source</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="262" width="380" height="200" viewBox="0 0 380 200">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="impact_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="impact_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="198" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#impact_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">IMPACT TIMELINE</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="impact_areaGrad" x1="0" y1="8" x2="0" y2="90" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#58a6ff" stop-opacity="0.35"/>
|
||||||
|
<stop offset="100%" stop-color="#58a6ff" stop-opacity="0.02"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<text x="34" y="12.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">41</text><line x1="40" y1="8.0" x2="356" y2="8.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="53.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">20</text><line x1="40" y1="49.0" x2="356" y2="49.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="94.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">0</text><line x1="40" y1="90.0" x2="356" y2="90.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/>
|
||||||
|
<text x="40.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2025-10</text><text x="204.3" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2026-01</text><text x="356.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2026-04</text>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0 L 356.0 90 L 40.0 90 Z" fill="url(#impact_areaGrad)"/>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0" fill="none" stroke="#58a6ff" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, 136)">
|
||||||
|
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="700" fill="#d1d9e0">577</text>
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">commits over 6mo</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="478" width="380" height="170" viewBox="0 0 380 170">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="streaks_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="streaks_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#streaks_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7d8895">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#58a6ff">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7d8895">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#d1d9e0">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#2a3444" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#1e2836"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#58a6ff"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#58a6ff"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="664" width="380" height="298" viewBox="0 0 380 298">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="collaborators_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="collaborators_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="296" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#collaborators_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">TOP COLLABORATORS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(36, 20)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(285, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">torvalds</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">4 repos · 142 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="120.0" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="120.0" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 70)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(165, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">G</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">gaearon</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">3 repos · 98 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="82.8169014084507" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="82.8169014084507" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 120)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(238, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">S</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">sindresorhus</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">2 repos · 64 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="54.08450704225352" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="54.08450704225352" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 170)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(157, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">tj</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">2 repos · 47 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="39.71830985915493" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="39.71830985915493" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 220)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(231, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">Y</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">yyx990803</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">1 repos · 31 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#1e2836"/>
|
||||||
|
<rect x="200" y="-6" width="26.197183098591548" height="8" rx="4" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="26.197183098591548" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="978" width="380" height="234" viewBox="0 0 380 234">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="focus_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="focus_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="232" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#focus_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">RECENT FOCUS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">Backend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="210.0" height="14" rx="7" fill="#58a6ff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="210.0" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">412 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#58a6ff">38%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 36)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">ML</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="132.6315789473684" height="14" rx="7" fill="#3fb950" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="132.6315789473684" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">260 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#3fb950">24%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 72)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">Frontend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="99.47368421052632" height="14" rx="7" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="99.47368421052632" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">195 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#bc8cff">18%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 108)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">DevOps</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="66.3157894736842" height="14" rx="7" fill="#d29922" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="66.3157894736842" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">130 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#d29922">12%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 144)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">Cloud</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="44.21052631578947" height="14" rx="7" fill="#f0883e" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="44.21052631578947" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">87 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#f0883e">8%</text>
|
||||||
|
</g>
|
||||||
|
<text x="16" y="188" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895" opacity="0.7">Recent activity · last year</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1228" width="380" height="208" viewBox="0 0 380 208">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="languages_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="languages_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="206" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#languages_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="113.3 163.1" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="63.6 212.9" stroke-dashoffset="-113.3"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="163.1" to="-113.3" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="41.5 235.0" stroke-dashoffset="-176.9"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="99.5" to="-176.9" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="30.4 246.0" stroke-dashoffset="-218.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="58.1" to="-218.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#89e051" stroke-width="16"
|
||||||
|
stroke-dasharray="16.6 259.9" stroke-dashoffset="-248.8"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="27.6" to="-248.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#7d8895" stroke-width="16"
|
||||||
|
stroke-dasharray="11.1 265.4" stroke-dashoffset="-265.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="11.1" to="-265.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="28" fill="#1a2230"/>
|
||||||
|
<text x="60" y="87.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#d1d9e0">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">41%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">23%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">15%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">11%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 108)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#89e051"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Shell</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">6%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 130)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#7d8895"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Other</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">4%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1452" width="380" height="274" viewBox="0 0 380 274">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="achievements_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="achievements_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="272" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#achievements_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">ACHIEVEMENTS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 8)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#d29922" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#d29922" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<rect x="4" y="5" width="16" height="11" rx="1" fill="none" stroke="#d29922" stroke-width="1.5"/>
|
||||||
|
<rect x="3" y="16" width="18" height="1.5" rx="0.5" fill="#d29922" opacity="0.85"/>
|
||||||
|
<path d="M9 9l-2 3 2 3m6-6l2 3-2 3" stroke="#d29922" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">Hackathon winner</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Y Combinator AI Hackathon · 2025-11</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 64)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#3fb950" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#3fb950" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"
|
||||||
|
fill="none" stroke="#3fb950" stroke-width="1.5" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">Speaker at PyCon</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Async at scale · 2024-05</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 120)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#58a6ff" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#58a6ff" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M7 2h10v2h2.5c.8 0 1.5.7 1.5 1.5V8c0 1.7-1.3 3-3 3h-.5c-.5 1.5-1.8 2.7-3.5 3v2.5h3c.6 0 1 .4 1 1s-.4 1-1 1H7c-.6 0-1-.4-1-1s.4-1 1-1h3V14c-1.7-.3-3-1.5-3.5-3H6c-1.7 0-3-1.3-3-3V5.5C3 4.7 3.7 4 4.5 4H7V2zm0 4H4.5v2c0 .8.7 1.5 1.5 1.5h1V6zm12.5 0H17v3.5h1c.8 0 1.5-.7 1.5-1.5V6z" fill="#58a6ff" opacity="0.85"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">Open Source Award</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">GitHub Stars program · 2024-01</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 176)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#bc8cff" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#bc8cff" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<circle cx="12" cy="14" r="5" fill="#bc8cff" opacity="0.2"/>
|
||||||
|
<circle cx="12" cy="14" r="4" fill="none" stroke="#bc8cff" stroke-width="1.5"/>
|
||||||
|
<path d="M12 11.5l1 2 2.2.3-1.6 1.5.4 2.2-2-1-2 1 .4-2.2-1.6-1.5 2.2-.3z" fill="#bc8cff"/>
|
||||||
|
<path d="M9 3l3 8m0-8l3 8m-6-8h6" stroke="#bc8cff" stroke-width="1.5" fill="none" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#d1d9e0">AWS Certified Solutions Architect</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Professional · 2023-09</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<text x="210" y="1748" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895" opacity="0.5">Generated with gh-stats</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,543 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="420" height="1756" viewBox="0 0 420 1756">
|
||||||
|
<rect width="420" height="1756" rx="16" fill="#1e2433"/>
|
||||||
|
<rect x="0.5" y="0.5" width="419" height="1755" rx="16"
|
||||||
|
fill="none" stroke="#3d4659" stroke-width="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<svg x="20" y="20" width="380" height="226" viewBox="0 0 380 226">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="grade_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="grade_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="224" rx="10" ry="10"
|
||||||
|
fill="#2a3142" stroke="#3d4659" stroke-width="1" filter="url(#grade_shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#333d50" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#333d50" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#e5e9f0">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#8892a4"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4" letter-spacing="0.4">Score <tspan fill="#e5e9f0" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#333d50" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#8892a4" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#8892a4"/><line x1="7" y1="10" x2="7" y2="14" stroke="#8892a4" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#8892a4" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#e5e9f0">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#8892a4" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#8892a4" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#8892a4" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#e5e9f0">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#8892a4" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#e5e9f0">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#8892a4" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#8892a4" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#8892a4" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#8892a4" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#e5e9f0">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#8892a4" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#8892a4" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#8892a4" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#8892a4" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#e5e9f0">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#333d50" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#88c0d0" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#88c0d0" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#88c0d0">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#88c0d0" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#88c0d0" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#88c0d0">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#88c0d0" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#88c0d0" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#88c0d0">Systems</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(177, 0)" opacity="0.9">
|
||||||
|
<rect width="51" height="24" rx="12" fill="#88c0d0" opacity="0.12"/>
|
||||||
|
<rect width="51" height="24" rx="12" fill="none" stroke="#88c0d0" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="25" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#88c0d0">Cloud</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(234, 0)" opacity="0.9">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#facc15" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#facc15" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#facc15">Founder #42</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0, 30)" opacity="0.55">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#88c0d0" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#88c0d0" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#88c0d0">Open source</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="262" width="380" height="200" viewBox="0 0 380 200">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="impact_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="impact_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="198" rx="10" ry="10"
|
||||||
|
fill="#2a3142" stroke="#3d4659" stroke-width="1" filter="url(#impact_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#8892a4" letter-spacing="0.8" opacity="0.7">IMPACT TIMELINE</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="impact_areaGrad" x1="0" y1="8" x2="0" y2="90" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#88c0d0" stop-opacity="0.35"/>
|
||||||
|
<stop offset="100%" stop-color="#88c0d0" stop-opacity="0.02"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<text x="34" y="12.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#8892a4">41</text><line x1="40" y1="8.0" x2="356" y2="8.0" stroke="#333d50" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="53.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#8892a4">20</text><line x1="40" y1="49.0" x2="356" y2="49.0" stroke="#333d50" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="94.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#8892a4">0</text><line x1="40" y1="90.0" x2="356" y2="90.0" stroke="#333d50" stroke-width="0.5" stroke-dasharray="3,3"/>
|
||||||
|
<text x="40.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#8892a4">2025-10</text><text x="204.3" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#8892a4">2026-01</text><text x="356.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#8892a4">2026-04</text>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0 L 356.0 90 L 40.0 90 Z" fill="url(#impact_areaGrad)"/>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0" fill="none" stroke="#88c0d0" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, 136)">
|
||||||
|
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="700" fill="#e5e9f0">577</text>
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">commits over 6mo</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="478" width="380" height="170" viewBox="0 0 380 170">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="streaks_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="streaks_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#2a3142" stroke="#3d4659" stroke-width="1" filter="url(#streaks_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#8892a4" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#8892a4">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#88c0d0">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#8892a4">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#e5e9f0">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#3d4659" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#333d50"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#88c0d0"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#88c0d0"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="664" width="380" height="298" viewBox="0 0 380 298">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="collaborators_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="collaborators_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="296" rx="10" ry="10"
|
||||||
|
fill="#2a3142" stroke="#3d4659" stroke-width="1" filter="url(#collaborators_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#8892a4" letter-spacing="0.8" opacity="0.7">TOP COLLABORATORS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(36, 20)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(285, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">torvalds</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">4 repos · 142 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#333d50"/>
|
||||||
|
<rect x="200" y="-6" width="120.0" height="8" rx="4" fill="#b48ead" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="120.0" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 70)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(165, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">G</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">gaearon</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">3 repos · 98 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#333d50"/>
|
||||||
|
<rect x="200" y="-6" width="82.8169014084507" height="8" rx="4" fill="#b48ead" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="82.8169014084507" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 120)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(238, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">S</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">sindresorhus</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">2 repos · 64 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#333d50"/>
|
||||||
|
<rect x="200" y="-6" width="54.08450704225352" height="8" rx="4" fill="#b48ead" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="54.08450704225352" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 170)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(157, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">tj</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">2 repos · 47 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#333d50"/>
|
||||||
|
<rect x="200" y="-6" width="39.71830985915493" height="8" rx="4" fill="#b48ead" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="39.71830985915493" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 220)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(231, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">Y</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">yyx990803</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">1 repos · 31 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#333d50"/>
|
||||||
|
<rect x="200" y="-6" width="26.197183098591548" height="8" rx="4" fill="#b48ead" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="26.197183098591548" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="978" width="380" height="234" viewBox="0 0 380 234">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="focus_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="focus_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="232" rx="10" ry="10"
|
||||||
|
fill="#2a3142" stroke="#3d4659" stroke-width="1" filter="url(#focus_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#8892a4" letter-spacing="0.8" opacity="0.7">RECENT FOCUS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#e5e9f0">Backend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#333d50"/>
|
||||||
|
<rect x="90" y="4" width="210.0" height="14" rx="7" fill="#58a6ff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="210.0" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">412 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#58a6ff">38%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 36)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#e5e9f0">ML</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#333d50"/>
|
||||||
|
<rect x="90" y="4" width="132.6315789473684" height="14" rx="7" fill="#3fb950" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="132.6315789473684" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">260 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#3fb950">24%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 72)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#e5e9f0">Frontend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#333d50"/>
|
||||||
|
<rect x="90" y="4" width="99.47368421052632" height="14" rx="7" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="99.47368421052632" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">195 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#bc8cff">18%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 108)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#e5e9f0">DevOps</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#333d50"/>
|
||||||
|
<rect x="90" y="4" width="66.3157894736842" height="14" rx="7" fill="#d29922" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="66.3157894736842" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">130 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#d29922">12%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 144)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#e5e9f0">Cloud</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#333d50"/>
|
||||||
|
<rect x="90" y="4" width="44.21052631578947" height="14" rx="7" fill="#f0883e" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="44.21052631578947" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4">87 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#f0883e">8%</text>
|
||||||
|
</g>
|
||||||
|
<text x="16" y="188" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4" opacity="0.7">Recent activity · last year</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1228" width="380" height="208" viewBox="0 0 380 208">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="languages_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="languages_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="206" rx="10" ry="10"
|
||||||
|
fill="#2a3142" stroke="#3d4659" stroke-width="1" filter="url(#languages_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#8892a4" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="113.3 163.1" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="63.6 212.9" stroke-dashoffset="-113.3"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="163.1" to="-113.3" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="41.5 235.0" stroke-dashoffset="-176.9"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="99.5" to="-176.9" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="30.4 246.0" stroke-dashoffset="-218.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="58.1" to="-218.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#89e051" stroke-width="16"
|
||||||
|
stroke-dasharray="16.6 259.9" stroke-dashoffset="-248.8"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="27.6" to="-248.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#8892a4" stroke-width="16"
|
||||||
|
stroke-dasharray="11.1 265.4" stroke-dashoffset="-265.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="11.1" to="-265.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="28" fill="#2a3142"/>
|
||||||
|
<text x="60" y="87.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#e5e9f0">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#e5e9f0">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#8892a4">41%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#e5e9f0">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#8892a4">23%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#e5e9f0">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#8892a4">15%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#e5e9f0">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#8892a4">11%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 108)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#89e051"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#e5e9f0">Shell</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#8892a4">6%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 130)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#8892a4"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#e5e9f0">Other</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#8892a4">4%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1452" width="380" height="274" viewBox="0 0 380 274">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="achievements_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="achievements_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="272" rx="10" ry="10"
|
||||||
|
fill="#2a3142" stroke="#3d4659" stroke-width="1" filter="url(#achievements_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#8892a4" letter-spacing="0.8" opacity="0.7">ACHIEVEMENTS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 8)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#ebcb8b" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#ebcb8b" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<rect x="4" y="5" width="16" height="11" rx="1" fill="none" stroke="#ebcb8b" stroke-width="1.5"/>
|
||||||
|
<rect x="3" y="16" width="18" height="1.5" rx="0.5" fill="#ebcb8b" opacity="0.85"/>
|
||||||
|
<path d="M9 9l-2 3 2 3m6-6l2 3-2 3" stroke="#ebcb8b" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">Hackathon winner</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">Y Combinator AI Hackathon · 2025-11</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 64)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#a3be8c" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#a3be8c" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"
|
||||||
|
fill="none" stroke="#a3be8c" stroke-width="1.5" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">Speaker at PyCon</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">Async at scale · 2024-05</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 120)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#88c0d0" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#88c0d0" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M7 2h10v2h2.5c.8 0 1.5.7 1.5 1.5V8c0 1.7-1.3 3-3 3h-.5c-.5 1.5-1.8 2.7-3.5 3v2.5h3c.6 0 1 .4 1 1s-.4 1-1 1H7c-.6 0-1-.4-1-1s.4-1 1-1h3V14c-1.7-.3-3-1.5-3.5-3H6c-1.7 0-3-1.3-3-3V5.5C3 4.7 3.7 4 4.5 4H7V2zm0 4H4.5v2c0 .8.7 1.5 1.5 1.5h1V6zm12.5 0H17v3.5h1c.8 0 1.5-.7 1.5-1.5V6z" fill="#88c0d0" opacity="0.85"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">Open Source Award</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">GitHub Stars program · 2024-01</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 176)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#b48ead" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#b48ead" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<circle cx="12" cy="14" r="5" fill="#b48ead" opacity="0.2"/>
|
||||||
|
<circle cx="12" cy="14" r="4" fill="none" stroke="#b48ead" stroke-width="1.5"/>
|
||||||
|
<path d="M12 11.5l1 2 2.2.3-1.6 1.5.4 2.2-2-1-2 1 .4-2.2-1.6-1.5 2.2-.3z" fill="#b48ead"/>
|
||||||
|
<path d="M9 3l3 8m0-8l3 8m-6-8h6" stroke="#b48ead" stroke-width="1.5" fill="none" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#e5e9f0">AWS Certified Solutions Architect</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#8892a4">Professional · 2023-09</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<text x="210" y="1748" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#8892a4" opacity="0.5">Generated with gh-stats</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,543 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="420" height="1756" viewBox="0 0 420 1756">
|
||||||
|
<rect width="420" height="1756" rx="16" fill="#09090b"/>
|
||||||
|
<rect x="0.5" y="0.5" width="419" height="1755" rx="16"
|
||||||
|
fill="none" stroke="#27272a" stroke-width="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<svg x="20" y="20" width="380" height="226" viewBox="0 0 380 226">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="grade_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="grade_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="224" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#grade_shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#27272a" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#27272a" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#fafafa">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#a1a1aa"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa" letter-spacing="0.4">Score <tspan fill="#fafafa" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#27272a" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#a1a1aa" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#a1a1aa"/><line x1="7" y1="10" x2="7" y2="14" stroke="#a1a1aa" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#a1a1aa" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#a1a1aa" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#a1a1aa" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#a1a1aa" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#a1a1aa" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#a1a1aa" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#a1a1aa" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#a1a1aa" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#a1a1aa" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#fafafa">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#27272a" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Systems</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(177, 0)" opacity="0.9">
|
||||||
|
<rect width="51" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="51" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="25" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Cloud</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(234, 0)" opacity="0.9">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#facc15" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#facc15" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#facc15">Founder #42</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0, 30)" opacity="0.55">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#a78bfa" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#a78bfa" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#a78bfa">Open source</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="262" width="380" height="200" viewBox="0 0 380 200">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="impact_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="impact_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="198" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#impact_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">IMPACT TIMELINE</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="impact_areaGrad" x1="0" y1="8" x2="0" y2="90" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#a78bfa" stop-opacity="0.35"/>
|
||||||
|
<stop offset="100%" stop-color="#a78bfa" stop-opacity="0.02"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<text x="34" y="12.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#a1a1aa">41</text><line x1="40" y1="8.0" x2="356" y2="8.0" stroke="#27272a" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="53.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#a1a1aa">20</text><line x1="40" y1="49.0" x2="356" y2="49.0" stroke="#27272a" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="94.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#a1a1aa">0</text><line x1="40" y1="90.0" x2="356" y2="90.0" stroke="#27272a" stroke-width="0.5" stroke-dasharray="3,3"/>
|
||||||
|
<text x="40.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#a1a1aa">2025-10</text><text x="204.3" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#a1a1aa">2026-01</text><text x="356.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#a1a1aa">2026-04</text>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0 L 356.0 90 L 40.0 90 Z" fill="url(#impact_areaGrad)"/>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0" fill="none" stroke="#a78bfa" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, 136)">
|
||||||
|
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="700" fill="#fafafa">577</text>
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">commits over 6mo</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="478" width="380" height="170" viewBox="0 0 380 170">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="streaks_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="streaks_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#streaks_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#a1a1aa">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#a78bfa">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#a1a1aa">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#fafafa">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#27272a" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#27272a"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#a78bfa"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#a78bfa"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="664" width="380" height="298" viewBox="0 0 380 298">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="collaborators_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="collaborators_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="296" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#collaborators_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">TOP COLLABORATORS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(36, 20)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(285, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">torvalds</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">4 repos · 142 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#27272a"/>
|
||||||
|
<rect x="200" y="-6" width="120.0" height="8" rx="4" fill="#c084fc" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="120.0" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 70)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(165, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">G</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">gaearon</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">3 repos · 98 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#27272a"/>
|
||||||
|
<rect x="200" y="-6" width="82.8169014084507" height="8" rx="4" fill="#c084fc" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="82.8169014084507" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 120)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(238, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">S</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">sindresorhus</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">2 repos · 64 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#27272a"/>
|
||||||
|
<rect x="200" y="-6" width="54.08450704225352" height="8" rx="4" fill="#c084fc" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="54.08450704225352" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 170)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(157, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">tj</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">2 repos · 47 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#27272a"/>
|
||||||
|
<rect x="200" y="-6" width="39.71830985915493" height="8" rx="4" fill="#c084fc" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="39.71830985915493" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 220)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(231, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">Y</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">yyx990803</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">1 repos · 31 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#27272a"/>
|
||||||
|
<rect x="200" y="-6" width="26.197183098591548" height="8" rx="4" fill="#c084fc" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="26.197183098591548" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="978" width="380" height="234" viewBox="0 0 380 234">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="focus_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="focus_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="232" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#focus_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">RECENT FOCUS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#fafafa">Backend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#27272a"/>
|
||||||
|
<rect x="90" y="4" width="210.0" height="14" rx="7" fill="#58a6ff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="210.0" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">412 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#58a6ff">38%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 36)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#fafafa">ML</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#27272a"/>
|
||||||
|
<rect x="90" y="4" width="132.6315789473684" height="14" rx="7" fill="#3fb950" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="132.6315789473684" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">260 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#3fb950">24%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 72)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#fafafa">Frontend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#27272a"/>
|
||||||
|
<rect x="90" y="4" width="99.47368421052632" height="14" rx="7" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="99.47368421052632" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">195 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#bc8cff">18%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 108)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#fafafa">DevOps</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#27272a"/>
|
||||||
|
<rect x="90" y="4" width="66.3157894736842" height="14" rx="7" fill="#d29922" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="66.3157894736842" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">130 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#d29922">12%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 144)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#fafafa">Cloud</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#27272a"/>
|
||||||
|
<rect x="90" y="4" width="44.21052631578947" height="14" rx="7" fill="#f0883e" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="44.21052631578947" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa">87 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#f0883e">8%</text>
|
||||||
|
</g>
|
||||||
|
<text x="16" y="188" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa" opacity="0.7">Recent activity · last year</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1228" width="380" height="208" viewBox="0 0 380 208">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="languages_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="languages_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="206" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#languages_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="113.3 163.1" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="63.6 212.9" stroke-dashoffset="-113.3"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="163.1" to="-113.3" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="41.5 235.0" stroke-dashoffset="-176.9"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="99.5" to="-176.9" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="30.4 246.0" stroke-dashoffset="-218.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="58.1" to="-218.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#89e051" stroke-width="16"
|
||||||
|
stroke-dasharray="16.6 259.9" stroke-dashoffset="-248.8"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="27.6" to="-248.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#a1a1aa" stroke-width="16"
|
||||||
|
stroke-dasharray="11.1 265.4" stroke-dashoffset="-265.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="11.1" to="-265.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="28" fill="#18181b"/>
|
||||||
|
<text x="60" y="87.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#fafafa">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">41%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">23%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">15%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">11%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 108)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#89e051"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Shell</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">6%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 130)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#a1a1aa"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#fafafa">Other</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#a1a1aa">4%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1452" width="380" height="274" viewBox="0 0 380 274">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="achievements_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="achievements_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="272" rx="10" ry="10"
|
||||||
|
fill="#18181b" stroke="#27272a" stroke-width="1" filter="url(#achievements_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#a1a1aa" letter-spacing="0.8" opacity="0.7">ACHIEVEMENTS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 8)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#fb923c" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#fb923c" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<rect x="4" y="5" width="16" height="11" rx="1" fill="none" stroke="#fb923c" stroke-width="1.5"/>
|
||||||
|
<rect x="3" y="16" width="18" height="1.5" rx="0.5" fill="#fb923c" opacity="0.85"/>
|
||||||
|
<path d="M9 9l-2 3 2 3m6-6l2 3-2 3" stroke="#fb923c" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">Hackathon winner</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">Y Combinator AI Hackathon · 2025-11</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 64)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#4ade80" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#4ade80" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"
|
||||||
|
fill="none" stroke="#4ade80" stroke-width="1.5" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">Speaker at PyCon</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">Async at scale · 2024-05</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 120)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#a78bfa" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#a78bfa" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M7 2h10v2h2.5c.8 0 1.5.7 1.5 1.5V8c0 1.7-1.3 3-3 3h-.5c-.5 1.5-1.8 2.7-3.5 3v2.5h3c.6 0 1 .4 1 1s-.4 1-1 1H7c-.6 0-1-.4-1-1s.4-1 1-1h3V14c-1.7-.3-3-1.5-3.5-3H6c-1.7 0-3-1.3-3-3V5.5C3 4.7 3.7 4 4.5 4H7V2zm0 4H4.5v2c0 .8.7 1.5 1.5 1.5h1V6zm12.5 0H17v3.5h1c.8 0 1.5-.7 1.5-1.5V6z" fill="#a78bfa" opacity="0.85"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">Open Source Award</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">GitHub Stars program · 2024-01</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 176)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#c084fc" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#c084fc" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<circle cx="12" cy="14" r="5" fill="#c084fc" opacity="0.2"/>
|
||||||
|
<circle cx="12" cy="14" r="4" fill="none" stroke="#c084fc" stroke-width="1.5"/>
|
||||||
|
<path d="M12 11.5l1 2 2.2.3-1.6 1.5.4 2.2-2-1-2 1 .4-2.2-1.6-1.5 2.2-.3z" fill="#c084fc"/>
|
||||||
|
<path d="M9 3l3 8m0-8l3 8m-6-8h6" stroke="#c084fc" stroke-width="1.5" fill="none" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#fafafa">AWS Certified Solutions Architect</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#a1a1aa">Professional · 2023-09</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<text x="210" y="1748" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#a1a1aa" opacity="0.5">Generated with gh-stats</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,543 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
width="420" height="1756" viewBox="0 0 420 1756">
|
||||||
|
<rect width="420" height="1756" rx="16" fill="#faf8f5"/>
|
||||||
|
<rect x="0.5" y="0.5" width="419" height="1755" rx="16"
|
||||||
|
fill="none" stroke="#e0d8cf" stroke-width="1"/>
|
||||||
|
|
||||||
|
|
||||||
|
<svg x="20" y="20" width="380" height="226" viewBox="0 0 380 226">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="grade_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="grade_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="224" rx="10" ry="10"
|
||||||
|
fill="#f5f0eb" stroke="#e0d8cf" stroke-width="1" filter="url(#grade_shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#ebe5dd" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#ebe5dd" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#3d3529">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#7a7062"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062" letter-spacing="0.4">Score <tspan fill="#3d3529" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#ebe5dd" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#7a7062" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#7a7062"/><line x1="7" y1="10" x2="7" y2="14" stroke="#7a7062" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#7a7062" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#3d3529">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#7a7062" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#7a7062" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#7a7062" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#3d3529">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#7a7062" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#3d3529">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#7a7062" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#7a7062" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#7a7062" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#7a7062" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#3d3529">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#7a7062" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#7a7062" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#7a7062" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#7a7062" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#3d3529">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#ebe5dd" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#b45309" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#b45309" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#b45309">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#b45309" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#b45309" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#b45309">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#b45309" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#b45309" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#b45309">Systems</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(177, 0)" opacity="0.9">
|
||||||
|
<rect width="51" height="24" rx="12" fill="#b45309" opacity="0.12"/>
|
||||||
|
<rect width="51" height="24" rx="12" fill="none" stroke="#b45309" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="25" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#b45309">Cloud</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(234, 0)" opacity="0.9">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#facc15" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#facc15" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#facc15">Founder #42</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0, 30)" opacity="0.55">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#b45309" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#b45309" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#b45309">Open source</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="262" width="380" height="200" viewBox="0 0 380 200">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="impact_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="impact_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="198" rx="10" ry="10"
|
||||||
|
fill="#f5f0eb" stroke="#e0d8cf" stroke-width="1" filter="url(#impact_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7a7062" letter-spacing="0.8" opacity="0.7">IMPACT TIMELINE</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="impact_areaGrad" x1="0" y1="8" x2="0" y2="90" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#b45309" stop-opacity="0.35"/>
|
||||||
|
<stop offset="100%" stop-color="#b45309" stop-opacity="0.02"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<text x="34" y="12.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7a7062">41</text><line x1="40" y1="8.0" x2="356" y2="8.0" stroke="#ebe5dd" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="53.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7a7062">20</text><line x1="40" y1="49.0" x2="356" y2="49.0" stroke="#ebe5dd" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="94.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7a7062">0</text><line x1="40" y1="90.0" x2="356" y2="90.0" stroke="#ebe5dd" stroke-width="0.5" stroke-dasharray="3,3"/>
|
||||||
|
<text x="40.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7a7062">2025-10</text><text x="204.3" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7a7062">2026-01</text><text x="356.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7a7062">2026-04</text>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0 L 356.0 90 L 40.0 90 Z" fill="url(#impact_areaGrad)"/>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0" fill="none" stroke="#b45309" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, 136)">
|
||||||
|
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="700" fill="#3d3529">577</text>
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">commits over 6mo</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="478" width="380" height="170" viewBox="0 0 380 170">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="streaks_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="streaks_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#f5f0eb" stroke="#e0d8cf" stroke-width="1" filter="url(#streaks_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7a7062" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7a7062">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#b45309">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7a7062">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#3d3529">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#e0d8cf" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#ebe5dd"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#b45309"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#b45309"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="664" width="380" height="298" viewBox="0 0 380 298">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="collaborators_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="collaborators_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="296" rx="10" ry="10"
|
||||||
|
fill="#f5f0eb" stroke="#e0d8cf" stroke-width="1" filter="url(#collaborators_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7a7062" letter-spacing="0.8" opacity="0.7">TOP COLLABORATORS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(36, 20)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(285, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">torvalds</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">4 repos · 142 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#ebe5dd"/>
|
||||||
|
<rect x="200" y="-6" width="120.0" height="8" rx="4" fill="#7e22ce" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="120.0" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 70)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(165, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">G</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">gaearon</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">3 repos · 98 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#ebe5dd"/>
|
||||||
|
<rect x="200" y="-6" width="82.8169014084507" height="8" rx="4" fill="#7e22ce" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="82.8169014084507" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 120)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(238, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">S</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">sindresorhus</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">2 repos · 64 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#ebe5dd"/>
|
||||||
|
<rect x="200" y="-6" width="54.08450704225352" height="8" rx="4" fill="#7e22ce" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="54.08450704225352" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 170)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(157, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">T</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">tj</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">2 repos · 47 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#ebe5dd"/>
|
||||||
|
<rect x="200" y="-6" width="39.71830985915493" height="8" rx="4" fill="#7e22ce" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="39.71830985915493" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(36, 220)">
|
||||||
|
|
||||||
|
<circle cx="0" cy="0" r="18" fill="hsl(231, 50%, 40%)"/>
|
||||||
|
<text x="0" y="1" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="600" fill="white">Y</text>
|
||||||
|
<text x="28" y="-2" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">yyx990803</text>
|
||||||
|
<text x="28" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">1 repos · 31 commits</text>
|
||||||
|
<rect x="200" y="-6" width="130" height="8" rx="4" fill="#ebe5dd"/>
|
||||||
|
<rect x="200" y="-6" width="26.197183098591548" height="8" rx="4" fill="#7e22ce" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="26.197183098591548" dur="0.6s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="978" width="380" height="234" viewBox="0 0 380 234">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="focus_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="focus_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="232" rx="10" ry="10"
|
||||||
|
fill="#f5f0eb" stroke="#e0d8cf" stroke-width="1" filter="url(#focus_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7a7062" letter-spacing="0.8" opacity="0.7">RECENT FOCUS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#3d3529">Backend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#ebe5dd"/>
|
||||||
|
<rect x="90" y="4" width="210.0" height="14" rx="7" fill="#58a6ff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="210.0" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">412 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#58a6ff">38%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 36)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#3d3529">ML</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#ebe5dd"/>
|
||||||
|
<rect x="90" y="4" width="132.6315789473684" height="14" rx="7" fill="#3fb950" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="132.6315789473684" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">260 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#3fb950">24%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 72)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#3d3529">Frontend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#ebe5dd"/>
|
||||||
|
<rect x="90" y="4" width="99.47368421052632" height="14" rx="7" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="99.47368421052632" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">195 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#bc8cff">18%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 108)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#3d3529">DevOps</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#ebe5dd"/>
|
||||||
|
<rect x="90" y="4" width="66.3157894736842" height="14" rx="7" fill="#d29922" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="66.3157894736842" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">130 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#d29922">12%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 144)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#3d3529">Cloud</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#ebe5dd"/>
|
||||||
|
<rect x="90" y="4" width="44.21052631578947" height="14" rx="7" fill="#f0883e" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="44.21052631578947" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062">87 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#f0883e">8%</text>
|
||||||
|
</g>
|
||||||
|
<text x="16" y="188" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062" opacity="0.7">Recent activity · last year</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1228" width="380" height="208" viewBox="0 0 380 208">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="languages_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="languages_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="206" rx="10" ry="10"
|
||||||
|
fill="#f5f0eb" stroke="#e0d8cf" stroke-width="1" filter="url(#languages_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7a7062" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="113.3 163.1" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="63.6 212.9" stroke-dashoffset="-113.3"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="163.1" to="-113.3" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="41.5 235.0" stroke-dashoffset="-176.9"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="99.5" to="-176.9" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="30.4 246.0" stroke-dashoffset="-218.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="58.1" to="-218.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#89e051" stroke-width="16"
|
||||||
|
stroke-dasharray="16.6 259.9" stroke-dashoffset="-248.8"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="27.6" to="-248.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#7a7062" stroke-width="16"
|
||||||
|
stroke-dasharray="11.1 265.4" stroke-dashoffset="-265.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="11.1" to="-265.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="28" fill="#f5f0eb"/>
|
||||||
|
<text x="60" y="87.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#3d3529">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#3d3529">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7a7062">41%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#3d3529">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7a7062">23%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#3d3529">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7a7062">15%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#3d3529">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7a7062">11%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 108)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#89e051"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#3d3529">Shell</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7a7062">6%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 130)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#7a7062"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#3d3529">Other</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7a7062">4%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<svg x="20" y="1452" width="380" height="274" viewBox="0 0 380 274">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<filter id="achievements_shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="achievements_avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="272" rx="10" ry="10"
|
||||||
|
fill="#f5f0eb" stroke="#e0d8cf" stroke-width="1" filter="url(#achievements_shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7a7062" letter-spacing="0.8" opacity="0.7">ACHIEVEMENTS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 8)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#a16207" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#a16207" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<rect x="4" y="5" width="16" height="11" rx="1" fill="none" stroke="#a16207" stroke-width="1.5"/>
|
||||||
|
<rect x="3" y="16" width="18" height="1.5" rx="0.5" fill="#a16207" opacity="0.85"/>
|
||||||
|
<path d="M9 9l-2 3 2 3m6-6l2 3-2 3" stroke="#a16207" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">Hackathon winner</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">Y Combinator AI Hackathon · 2025-11</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 64)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#4d7c0f" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#4d7c0f" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"
|
||||||
|
fill="none" stroke="#4d7c0f" stroke-width="1.5" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">Speaker at PyCon</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">Async at scale · 2024-05</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 120)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#b45309" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#b45309" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<path d="M7 2h10v2h2.5c.8 0 1.5.7 1.5 1.5V8c0 1.7-1.3 3-3 3h-.5c-.5 1.5-1.8 2.7-3.5 3v2.5h3c.6 0 1 .4 1 1s-.4 1-1 1H7c-.6 0-1-.4-1-1s.4-1 1-1h3V14c-1.7-.3-3-1.5-3.5-3H6c-1.7 0-3-1.3-3-3V5.5C3 4.7 3.7 4 4.5 4H7V2zm0 4H4.5v2c0 .8.7 1.5 1.5 1.5h1V6zm12.5 0H17v3.5h1c.8 0 1.5-.7 1.5-1.5V6z" fill="#b45309" opacity="0.85"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">Open Source Award</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">GitHub Stars program · 2024-01</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 176)">
|
||||||
|
<rect width="348" height="48" rx="8" fill="#7e22ce" opacity="0.06"/>
|
||||||
|
<rect width="348" height="48" rx="8" fill="none" stroke="#7e22ce" stroke-width="0.5" opacity="0.3"/>
|
||||||
|
<g transform="translate(12, 12)">
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||||
|
<circle cx="12" cy="14" r="5" fill="#7e22ce" opacity="0.2"/>
|
||||||
|
<circle cx="12" cy="14" r="4" fill="none" stroke="#7e22ce" stroke-width="1.5"/>
|
||||||
|
<path d="M12 11.5l1 2 2.2.3-1.6 1.5.4 2.2-2-1-2 1 .4-2.2-1.6-1.5 2.2-.3z" fill="#7e22ce"/>
|
||||||
|
<path d="M9 3l3 8m0-8l3 8m-6-8h6" stroke="#7e22ce" stroke-width="1.5" fill="none" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</g>
|
||||||
|
<text x="48" y="20" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="600" fill="#3d3529">AWS Certified Solutions Architect</text>
|
||||||
|
<text x="48" y="36" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7a7062">Professional · 2023-09</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
<text x="210" y="1748" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7a7062" opacity="0.5">Generated with gh-stats</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,76 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="234" viewBox="0 0 380 234" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="232" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">RECENT FOCUS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">Backend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="210.0" height="14" rx="7" fill="#58a6ff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="210.0" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">412 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#58a6ff">38%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 36)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">ML</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="132.6315789473684" height="14" rx="7" fill="#3fb950" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="132.6315789473684" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">260 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#3fb950">24%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 72)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">Frontend</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="99.47368421052632" height="14" rx="7" fill="#bc8cff" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="99.47368421052632" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">195 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#bc8cff">18%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 108)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">DevOps</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="66.3157894736842" height="14" rx="7" fill="#d29922" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="66.3157894736842" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">130 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#d29922">12%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(16, 144)">
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="600" fill="#d1d9e0">Cloud</text>
|
||||||
|
<rect x="90" y="4" width="210" height="14" rx="7" fill="#1e2836"/>
|
||||||
|
<rect x="90" y="4" width="44.21052631578947" height="14" rx="7" fill="#f0883e" opacity="0.8">
|
||||||
|
<animate attributeName="width" from="0" to="44.21052631578947" dur="0.7s" fill="freeze"/>
|
||||||
|
</rect>
|
||||||
|
<text x="90" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">87 commits</text>
|
||||||
|
<text x="308" y="15" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" font-weight="700" fill="#f0883e">8%</text>
|
||||||
|
</g>
|
||||||
|
<text x="16" y="188" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895" opacity="0.7">Recent activity · last year</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1,95 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="192" viewBox="0 0 380 192" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="190" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#1e2836" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#1e2836" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#d1d9e0">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#7d8895"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895" letter-spacing="0.4">Score <tspan fill="#d1d9e0" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#1e2836" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#7d8895" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#7d8895"/><line x1="7" y1="10" x2="7" y2="14" stroke="#7d8895" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#7d8895" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#7d8895" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#7d8895" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#7d8895" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#7d8895" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#7d8895" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#7d8895" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#7d8895" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#7d8895" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#7d8895" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#7d8895" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#7d8895" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#7d8895" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#1e2836" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Systems</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.2 KiB |
@@ -0,0 +1,113 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="226" viewBox="0 0 380 226" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="224" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)">
|
||||||
|
|
||||||
|
<g transform="translate(52, 48)">
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#1e2836" stroke-width="5"/>
|
||||||
|
<circle cx="0" cy="0" r="36" fill="none" stroke="#3fb950" stroke-width="5"
|
||||||
|
stroke-dasharray="226.1946710584651" stroke-dashoffset="26.23858184278195"
|
||||||
|
stroke-linecap="round" transform="rotate(-90)">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="226.1946710584651" to="26.23858184278195" dur="1s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<text x="0" y="10.50" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="30" font-weight="800" fill="#3fb950">A</text>
|
||||||
|
</g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="#1e2836" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)">
|
||||||
|
<text x="0" y="10" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="16" font-weight="700" fill="#d1d9e0">Developer Profile</text>
|
||||||
|
<text x="0" y="32" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" fill="#7d8895"></text>
|
||||||
|
<text x="0" y="50" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895" letter-spacing="0.4">Score <tspan fill="#d1d9e0" font-weight="600">88</tspan> / 100</text>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="96" x2="360" y2="96" stroke="#1e2836" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 100)">
|
||||||
|
|
||||||
|
<g transform="translate(34.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="7" cy="7" r="3" fill="none" stroke="#7d8895" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="#7d8895"/><line x1="7" y1="10" x2="7" y2="14" stroke="#7d8895" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="#7d8895" stroke-width="1.4"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">1,423</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Commits</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(102.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="4" cy="4" r="2" fill="none" stroke="#7d8895" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="#7d8895" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="#7d8895" stroke-width="1.2"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">87</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">PRs</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(170.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="#7d8895" stroke-width="1.2" stroke-linejoin="round"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">342</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Stars</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(238.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="#7d8895" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="#7d8895" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="#7d8895" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="#7d8895" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">28</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Repos</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(306.0, 0)">
|
||||||
|
<g transform="translate(-7, 0)"><g><circle cx="5" cy="4" r="2.5" fill="none" stroke="#7d8895" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="#7d8895" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="#7d8895" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="#7d8895" stroke-width="1"/></g></g>
|
||||||
|
<text x="0" y="28" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="14" font-weight="700" fill="#d1d9e0">156</text>
|
||||||
|
<text x="0" y="41" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">Followers</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<line x1="20" y1="148" x2="360" y2="148" stroke="#1e2836" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, 154)">
|
||||||
|
|
||||||
|
<g transform="translate(0, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Backend</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(70, 0)" opacity="0.9">
|
||||||
|
<rect width="31" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="31" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="15" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">ML</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(107, 0)" opacity="0.9">
|
||||||
|
<rect width="64" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="64" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="32" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Systems</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(177, 0)" opacity="0.9">
|
||||||
|
<rect width="51" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="51" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="25" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Cloud</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(234, 0)" opacity="0.9">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#facc15" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#facc15" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#facc15">Founder #42</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(0, 30)" opacity="0.55">
|
||||||
|
<rect width="90" height="24" rx="12" fill="#58a6ff" opacity="0.12"/>
|
||||||
|
<rect width="90" height="24" rx="12" fill="none" stroke="#58a6ff" stroke-width="1" opacity="0.3"/>
|
||||||
|
<text x="45" y="16" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="500" fill="#58a6ff">Open source</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 8.6 KiB |
@@ -0,0 +1,30 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="200" viewBox="0 0 380 200" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="198" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">IMPACT TIMELINE</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="areaGrad" x1="0" y1="8" x2="0" y2="90" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#a78bfa" stop-opacity="0.35"/>
|
||||||
|
<stop offset="100%" stop-color="#a78bfa" stop-opacity="0.02"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<text x="34" y="12.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">41</text><line x1="40" y1="8.0" x2="356" y2="8.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="53.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">20</text><line x1="40" y1="49.0" x2="356" y2="49.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="94.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">0</text><line x1="40" y1="90.0" x2="356" y2="90.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/>
|
||||||
|
<text x="40.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2025-10</text><text x="204.3" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2026-01</text><text x="356.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2026-04</text>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0 L 356.0 90 L 40.0 90 Z" fill="url(#areaGrad)"/>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0" fill="none" stroke="#a78bfa" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, 136)">
|
||||||
|
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="700" fill="#d1d9e0">577</text>
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">commits over 6mo</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1,30 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="200" viewBox="0 0 380 200" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="198" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">IMPACT TIMELINE</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="areaGrad" x1="0" y1="8" x2="0" y2="90" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0%" stop-color="#58a6ff" stop-opacity="0.35"/>
|
||||||
|
<stop offset="100%" stop-color="#58a6ff" stop-opacity="0.02"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<text x="34" y="12.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">41</text><line x1="40" y1="8.0" x2="356" y2="8.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="53.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">20</text><line x1="40" y1="49.0" x2="356" y2="49.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/><text x="34" y="94.0" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">0</text><line x1="40" y1="90.0" x2="356" y2="90.0" stroke="#1e2836" stroke-width="0.5" stroke-dasharray="3,3"/>
|
||||||
|
<text x="40.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2025-10</text><text x="204.3" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2026-01</text><text x="356.0" y="104" text-anchor="middle" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif" font-size="9" fill="#7d8895">2026-04</text>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0 L 356.0 90 L 40.0 90 Z" fill="url(#areaGrad)"/>
|
||||||
|
<path d="M 40.0 84.0 C 46.3 84.0, 46.3 80.0, 52.6 80.0 C 59.0 80.0, 59.0 74.0, 65.3 74.0 C 71.6 74.0, 71.6 78.0, 77.9 78.0 C 84.2 78.0, 84.2 68.0, 90.6 68.0 C 96.9 68.0, 96.9 62.0, 103.2 62.0 C 109.5 62.0, 109.5 72.0, 115.8 72.0 C 122.2 72.0, 122.2 66.0, 128.5 66.0 C 134.8 66.0, 134.8 54.0, 141.1 54.0 C 147.4 54.0, 147.4 46.0, 153.8 46.0 C 160.1 46.0, 160.1 56.0, 166.4 56.0 C 172.7 56.0, 172.7 52.0, 179.0 52.0 C 185.4 52.0, 185.4 40.0, 191.7 40.0 C 198.0 40.0, 198.0 48.0, 204.3 48.0 C 210.6 48.0, 210.6 34.0, 217.0 34.0 C 223.3 34.0, 223.3 26.0, 229.6 26.0 C 235.9 26.0, 235.9 38.0, 242.2 38.0 C 248.6 38.0, 248.6 42.0, 254.9 42.0 C 261.2 42.0, 261.2 30.0, 267.5 30.0 C 273.8 30.0, 273.8 20.0, 280.2 20.0 C 286.5 20.0, 286.5 32.0, 292.8 32.0 C 299.1 32.0, 299.1 24.0, 305.4 24.0 C 311.8 24.0, 311.8 8.0, 318.1 8.0 C 324.4 8.0, 324.4 14.0, 330.7 14.0 C 337.0 14.0, 337.0 22.0, 343.4 22.0 C 349.7 22.0, 349.7 16.0, 356.0 16.0" fill="none" stroke="#58a6ff" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, 136)">
|
||||||
|
<text x="0" y="0" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="13" font-weight="700" fill="#d1d9e0">577</text>
|
||||||
|
<text x="0" y="14" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="9" fill="#7d8895">commits over 6mo</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1,71 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="164" viewBox="0 0 380 164" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="162" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="64.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="126.1 150.4" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 64.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="64.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="70.8 205.7" stroke-dashoffset="-126.1"
|
||||||
|
transform="rotate(-90 60 64.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="150.4" to="-126.1" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="64.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="46.2 230.3" stroke-dashoffset="-196.8"
|
||||||
|
transform="rotate(-90 60 64.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="79.6" to="-196.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="64.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="33.7 242.7" stroke-dashoffset="-243.0"
|
||||||
|
transform="rotate(-90 60 64.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="33.5" to="-243.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="64.0" r="28" fill="#1a2230"/>
|
||||||
|
<text x="60" y="65.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#d1d9e0">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">46%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">26%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">17%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">12%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,95 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="208" viewBox="0 0 380 208" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="206" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">LANGUAGES</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<g transform="translate(16, 0)">
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3572A5" stroke-width="16"
|
||||||
|
stroke-dasharray="113.3 163.1" stroke-dashoffset="0.0"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="276.5" to="0.0" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#3178c6" stroke-width="16"
|
||||||
|
stroke-dasharray="63.6 212.9" stroke-dashoffset="-113.3"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="163.1" to="-113.3" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#00ADD8" stroke-width="16"
|
||||||
|
stroke-dasharray="41.5 235.0" stroke-dashoffset="-176.9"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="99.5" to="-176.9" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#dea584" stroke-width="16"
|
||||||
|
stroke-dasharray="30.4 246.0" stroke-dashoffset="-218.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="58.1" to="-218.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#89e051" stroke-width="16"
|
||||||
|
stroke-dasharray="16.6 259.9" stroke-dashoffset="-248.8"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="27.6" to="-248.8" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
<circle cx="60" cy="86.0" r="44" fill="none" stroke="#7d8895" stroke-width="16"
|
||||||
|
stroke-dasharray="11.1 265.4" stroke-dashoffset="-265.4"
|
||||||
|
transform="rotate(-90 60 86.0)" opacity="0.85">
|
||||||
|
<animate attributeName="stroke-dashoffset" from="11.1" to="-265.4" dur="0.8s" fill="freeze"/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle cx="60" cy="86.0" r="28" fill="#1a2230"/>
|
||||||
|
<text x="60" y="87.0" text-anchor="middle" dominant-baseline="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="700" fill="#d1d9e0">Python</text>
|
||||||
|
|
||||||
|
<g transform="translate(140, 20)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3572A5"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Python</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">41%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 42)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#3178c6"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">TypeScript</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">23%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 64)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#00ADD8"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Go</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">15%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 86)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#dea584"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Rust</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">11%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 108)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#89e051"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Shell</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">6%</text>
|
||||||
|
</g>
|
||||||
|
<g transform="translate(140, 130)">
|
||||||
|
<rect width="10" height="10" rx="2" fill="#7d8895"/>
|
||||||
|
<text x="16" y="9" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="12" fill="#d1d9e0">Other</text>
|
||||||
|
<text x="210" y="9" text-anchor="end" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="11" font-weight="600" fill="#7d8895">4%</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1,43 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="170" viewBox="0 0 380 170" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7d8895">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#3fb950">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7d8895">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#d1d9e0">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#2a3444" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#1e2836"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#3fb950"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#3fb950"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,43 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="380" height="170" viewBox="0 0 380 170" fill="none">
|
||||||
|
<defs>
|
||||||
|
<filter id="shadow" x="-2%" y="-2%" width="104%" height="104%">
|
||||||
|
<feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/>
|
||||||
|
</filter>
|
||||||
|
<clipPath id="avatarClip"><circle cx="0" cy="0" r="18"/></clipPath>
|
||||||
|
</defs>
|
||||||
|
<rect x="1" y="1" width="378" height="168" rx="10" ry="10"
|
||||||
|
fill="#1a2230" stroke="#2a3444" stroke-width="1" filter="url(#shadow)"/>
|
||||||
|
<text x="20" y="30" font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif" font-size="11" font-weight="600" fill="#7d8895" letter-spacing="0.8" opacity="0.7">STREAKS</text>
|
||||||
|
<g transform="translate(0, 36)">
|
||||||
|
|
||||||
|
<text x="105" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7d8895">CURRENT</text>
|
||||||
|
<text x="105" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#58a6ff">23</text>
|
||||||
|
|
||||||
|
<text x="275" y="22" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" font-weight="600" letter-spacing="1.4"
|
||||||
|
fill="#7d8895">LONGEST</text>
|
||||||
|
<text x="275" y="66" text-anchor="middle"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="40" font-weight="800" fill="#d1d9e0">61</text>
|
||||||
|
|
||||||
|
<line x1="190" y1="10" x2="190" y2="76"
|
||||||
|
stroke="#2a3444" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="50" y="92" width="280" height="5" rx="2.5" fill="#1e2836"/>
|
||||||
|
<rect x="50" y="92" width="105.57" height="5" rx="2.5" fill="#58a6ff"/>
|
||||||
|
<circle cx="155.57" cy="94.5" r="3.5" fill="#58a6ff"/>
|
||||||
|
|
||||||
|
<text x="50" y="116"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Mar 30 – Today</text>
|
||||||
|
<text x="330" y="116" text-anchor="end"
|
||||||
|
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
|
||||||
|
font-size="10" fill="#7d8895">Sep 13 – Nov 12, 2025</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -0,0 +1,96 @@
|
|||||||
|
name: ghstats
|
||||||
|
|
||||||
|
services:
|
||||||
|
fetcher:
|
||||||
|
image: ghcr.io/shaymanor/ghstats-fetcher:${IMAGE_TAG:-latest}
|
||||||
|
container_name: ghstats-fetcher
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
GITHUB_PAT: ${GITHUB_PAT:?missing GITHUB_PAT}
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?missing FETCHER_INTERNAL_TOKEN}
|
||||||
|
GENERATOR_URL: http://generator:5002
|
||||||
|
COLLABORATOR_TOP_REPOS: "15"
|
||||||
|
volumes:
|
||||||
|
- ${HOME}/ghstats/data/fetcher:/app/data
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:5001:5001"
|
||||||
|
|
||||||
|
fetcher-cron:
|
||||||
|
image: ghcr.io/shaymanor/ghstats-fetcher:${IMAGE_TAG:-latest}
|
||||||
|
container_name: ghstats-fetcher-cron
|
||||||
|
restart: unless-stopped
|
||||||
|
command: ["python", "-m", "src.cron"]
|
||||||
|
environment:
|
||||||
|
GITHUB_PAT: ${GITHUB_PAT:?missing GITHUB_PAT}
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?missing FETCHER_INTERNAL_TOKEN}
|
||||||
|
COLLABORATOR_TOP_REPOS: "15"
|
||||||
|
volumes:
|
||||||
|
- ${HOME}/ghstats/data/fetcher:/app/data
|
||||||
|
depends_on:
|
||||||
|
- fetcher
|
||||||
|
|
||||||
|
generator:
|
||||||
|
image: ghcr.io/shaymanor/ghstats-generator:${IMAGE_TAG:-latest}
|
||||||
|
container_name: ghstats-generator
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
FETCHER_URL: http://fetcher:5001
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?missing FETCHER_INTERNAL_TOKEN}
|
||||||
|
GH_OAUTH_CLIENT_ID: ${GH_OAUTH_CLIENT_ID:?missing GH_OAUTH_CLIENT_ID}
|
||||||
|
GH_OAUTH_CLIENT_SECRET: ${GH_OAUTH_CLIENT_SECRET:?missing GH_OAUTH_CLIENT_SECRET}
|
||||||
|
GENERATOR_SECRET_KEY: ${GENERATOR_SECRET_KEY:?missing GENERATOR_SECRET_KEY}
|
||||||
|
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-https://gh-stats.com}
|
||||||
|
BUILD_VERSION: ${IMAGE_TAG:-}
|
||||||
|
DEV_DASHBOARD_USER: ${DEV_DASHBOARD_USER:?missing DEV_DASHBOARD_USER}
|
||||||
|
DEV_DASHBOARD_PASSWORD: ${DEV_DASHBOARD_PASSWORD:?missing DEV_DASHBOARD_PASSWORD}
|
||||||
|
ENROLLMENT_HOURLY_CAP: "120"
|
||||||
|
ENROLLMENT_DAILY_CAP: "1500"
|
||||||
|
# Fallback while Caddy sends every visitor as 127.0.0.1 (one shared
|
||||||
|
# bucket). Remove once Caddy forwards Cf-Connecting-Ip as X-Forwarded-For.
|
||||||
|
RATE_LIMIT_READ_MAX: "30000"
|
||||||
|
volumes:
|
||||||
|
- ${HOME}/ghstats/data/generator:/app/data
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:5002:5002"
|
||||||
|
depends_on:
|
||||||
|
- fetcher
|
||||||
|
|
||||||
|
generator-worker:
|
||||||
|
image: ghcr.io/shaymanor/ghstats-generator:${IMAGE_TAG:-latest}
|
||||||
|
container_name: ghstats-generator-worker
|
||||||
|
restart: unless-stopped
|
||||||
|
command: ["python", "-m", "src.worker"]
|
||||||
|
environment:
|
||||||
|
FETCHER_URL: http://fetcher:5001
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?missing FETCHER_INTERNAL_TOKEN}
|
||||||
|
BUILD_VERSION: ${IMAGE_TAG:-}
|
||||||
|
volumes:
|
||||||
|
- ${HOME}/ghstats/data/generator:/app/data
|
||||||
|
depends_on:
|
||||||
|
- generator
|
||||||
|
|
||||||
|
generator-cron:
|
||||||
|
image: ghcr.io/shaymanor/ghstats-generator:${IMAGE_TAG:-latest}
|
||||||
|
container_name: ghstats-generator-cron
|
||||||
|
restart: unless-stopped
|
||||||
|
command: ["python", "-m", "src.cron"]
|
||||||
|
environment:
|
||||||
|
FETCHER_URL: http://fetcher:5001
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?missing FETCHER_INTERNAL_TOKEN}
|
||||||
|
BUILD_VERSION: ${IMAGE_TAG:-}
|
||||||
|
volumes:
|
||||||
|
- ${HOME}/ghstats/data/generator:/app/data
|
||||||
|
depends_on:
|
||||||
|
- generator
|
||||||
|
|
||||||
|
edge:
|
||||||
|
image: ghcr.io/shaymanor/ghstats-edge:${IMAGE_TAG:-latest}
|
||||||
|
container_name: ghstats-edge
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
GENERATOR_URL: http://generator:5002
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?missing FETCHER_INTERNAL_TOKEN}
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:5003:5003"
|
||||||
|
depends_on:
|
||||||
|
- generator
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Pulls the current image tag and brings up the compose stack.
|
||||||
|
# Expects GITHUB_PAT, FETCHER_INTERNAL_TOKEN, and IMAGE_TAG to be present in
|
||||||
|
# the environment (exported by the GitHub Actions deploy job).
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
mkdir -p "$HOME/ghstats/data/fetcher" "$HOME/ghstats/data/generator"
|
||||||
|
|
||||||
|
docker compose pull
|
||||||
|
# Keep fetcher-cron stopped across a deploy if an operator stopped it (e.g.
|
||||||
|
# during a sign-up spike); otherwise the recreated container runs at once.
|
||||||
|
cron_was_stopped=$(docker inspect -f '{{.State.Status}}' ghstats-fetcher-cron 2>/dev/null | grep -qx exited && echo 1 || true)
|
||||||
|
docker compose up -d --remove-orphans
|
||||||
|
if [ -n "$cron_was_stopped" ]; then docker stop ghstats-fetcher-cron; fi
|
||||||
|
docker compose ps
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
# Self-hosting gh-stats.
|
||||||
|
#
|
||||||
|
# Runs the same three services and the same published images that gh-stats.com
|
||||||
|
# runs. Everything is optional except GITHUB_PAT and FETCHER_INTERNAL_TOKEN.
|
||||||
|
#
|
||||||
|
# cp .env.example .env # then put your PAT in it
|
||||||
|
# docker compose up -d --build
|
||||||
|
# open http://localhost:5002
|
||||||
|
#
|
||||||
|
# The production deploy uses deploy/compose.yml instead; this file is the
|
||||||
|
# stripped-down version for running it on your own box.
|
||||||
|
|
||||||
|
name: ghstats
|
||||||
|
|
||||||
|
x-fetcher-env: &fetcher-env
|
||||||
|
GITHUB_PAT: ${GITHUB_PAT:?set GITHUB_PAT in .env - see .env.example}
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?set FETCHER_INTERNAL_TOKEN in .env - any random string}
|
||||||
|
|
||||||
|
services:
|
||||||
|
fetcher:
|
||||||
|
build: ./fetcher
|
||||||
|
image: ghstats-fetcher:local
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
<<: *fetcher-env
|
||||||
|
GENERATOR_URL: http://generator:5002
|
||||||
|
volumes:
|
||||||
|
- ./data/fetcher:/app/data
|
||||||
|
|
||||||
|
fetcher-cron:
|
||||||
|
build: ./fetcher
|
||||||
|
image: ghstats-fetcher:local
|
||||||
|
restart: unless-stopped
|
||||||
|
command: ["python", "-m", "src.cron"]
|
||||||
|
environment: *fetcher-env
|
||||||
|
volumes:
|
||||||
|
- ./data/fetcher:/app/data
|
||||||
|
depends_on: [fetcher]
|
||||||
|
|
||||||
|
generator:
|
||||||
|
build: ./generator
|
||||||
|
image: ghstats-generator:local
|
||||||
|
restart: unless-stopped
|
||||||
|
environment: &generator-env
|
||||||
|
FETCHER_URL: http://fetcher:5001
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?set FETCHER_INTERNAL_TOKEN in .env - any random string}
|
||||||
|
volumes:
|
||||||
|
- ./data/generator:/app/data
|
||||||
|
ports:
|
||||||
|
- "${GHSTATS_PORT:-5002}:5002"
|
||||||
|
depends_on: [fetcher]
|
||||||
|
|
||||||
|
generator-worker:
|
||||||
|
build: ./generator
|
||||||
|
image: ghstats-generator:local
|
||||||
|
restart: unless-stopped
|
||||||
|
command: ["python", "-m", "src.worker"]
|
||||||
|
environment: *generator-env
|
||||||
|
volumes:
|
||||||
|
- ./data/generator:/app/data
|
||||||
|
depends_on: [generator]
|
||||||
|
|
||||||
|
edge:
|
||||||
|
build: ./edge
|
||||||
|
image: ghstats-edge:local
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
GENERATOR_URL: http://generator:5002
|
||||||
|
FETCHER_INTERNAL_TOKEN: ${FETCHER_INTERNAL_TOKEN:?set FETCHER_INTERNAL_TOKEN in .env - any random string}
|
||||||
|
ports:
|
||||||
|
- "${GHSTATS_EDGE_PORT:-5003}:5003"
|
||||||
|
depends_on: [generator]
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
COPY src ./src
|
||||||
|
COPY gunicorn.conf.py ./
|
||||||
|
|
||||||
|
EXPOSE 5003
|
||||||
|
# Bind to $PORT when set (e.g. Cloud Run injects PORT=8080); default to 5003.
|
||||||
|
CMD ["sh", "-c", "exec gunicorn -b 0.0.0.0:${PORT:-5003} -w 2 src.api:app"]
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# Edge Service
|
||||||
|
|
||||||
|
Cache-first SVG proxy in front of the generator. Deploy many instances
|
||||||
|
around the world. No DB of its own; optional Redis for shared cache.
|
||||||
|
|
||||||
|
## Run locally
|
||||||
|
|
||||||
|
cd edge
|
||||||
|
pip install -r requirements.txt
|
||||||
|
GENERATOR_URL=http://localhost:5002 python -m src.api
|
||||||
|
|
||||||
|
## Test
|
||||||
|
|
||||||
|
cd edge && pytest
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
docker build -t ghstats-edge .
|
||||||
|
docker run --rm -e GENERATOR_URL=http://host.docker.internal:5002 -p 5003:5003 ghstats-edge
|
||||||
|
|
||||||
|
## Endpoints
|
||||||
|
|
||||||
|
| Method | Path | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| GET | /health | cache type + upstream reachability |
|
||||||
|
| GET | /<u> | composite SVG (cached on X-Widget-Status: ready) |
|
||||||
|
| GET | /<u>/<w>.svg | individual widget SVG |
|
||||||
|
|
||||||
|
## Env
|
||||||
|
|
||||||
|
- `GENERATOR_URL` — origin (required)
|
||||||
|
- `CACHE_TYPE` — `SimpleCache` (default) or `RedisCache`
|
||||||
|
- `CACHE_REDIS_URL` — if using RedisCache
|
||||||
|
- `CACHE_DEFAULT_TIMEOUT` — seconds, default 86400
|
||||||
|
- `CACHE_THRESHOLD` — max entries (SimpleCache only), default 10000
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
"""Gunicorn settings: one access line per request on stdout, for Pantheos.
|
||||||
|
|
||||||
|
Docker's json-file driver captures stdout and Pantheos ingests it, so each line
|
||||||
|
becomes a request log and feeds the container's rps / 5xx / p95. Monitoring
|
||||||
|
traffic (/metrics scrapes, /health checks) is left out so it doesn't drown the
|
||||||
|
real requests.
|
||||||
|
"""
|
||||||
|
from gunicorn import glogging
|
||||||
|
|
||||||
|
accesslog = "-"
|
||||||
|
access_log_format = '"%(r)s" %(s)s %(M)sms'
|
||||||
|
|
||||||
|
_QUIET_PATHS = ("/metrics", "/health")
|
||||||
|
|
||||||
|
|
||||||
|
class _Logger(glogging.Logger):
|
||||||
|
def access(self, resp, req, environ, request_time):
|
||||||
|
if req.path not in _QUIET_PATHS:
|
||||||
|
super().access(resp, req, environ, request_time)
|
||||||
|
|
||||||
|
|
||||||
|
logger_class = _Logger
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
[pytest]
|
||||||
|
testpaths = tests
|
||||||
|
python_files = test_*.py
|
||||||
|
pythonpath = .
|
||||||
|
addopts = -ra --strict-markers
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
flask==3.0.3
|
||||||
|
flask-caching==2.3.0
|
||||||
|
flask-compress==1.15
|
||||||
|
requests==2.32.3
|
||||||
|
pytest==8.3.3
|
||||||
|
responses==0.25.3
|
||||||
|
gunicorn==23.0.0
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
"""Edge analytics — record + flush + push to generator.
|
||||||
|
|
||||||
|
The hot path enqueues; the background thread does the network I/O. If the
|
||||||
|
generator is unreachable we drop the batch (logging a warning) and let the
|
||||||
|
queue catch the next tick.
|
||||||
|
"""
|
||||||
|
import logging
|
||||||
|
import threading
|
||||||
|
import time
|
||||||
|
from collections import deque
|
||||||
|
import requests
|
||||||
|
|
||||||
|
from . import config
|
||||||
|
|
||||||
|
log = logging.getLogger("edge.analytics")
|
||||||
|
|
||||||
|
_QUEUE: deque = deque(maxlen=config.ANALYTICS_QUEUE_MAX)
|
||||||
|
_QUEUE_LOCK = threading.Lock()
|
||||||
|
_THREAD_LOCK = threading.Lock()
|
||||||
|
_FLUSH_THREAD: threading.Thread | None = None
|
||||||
|
_events_dropped: int = 0
|
||||||
|
_drop_lock = threading.Lock()
|
||||||
|
|
||||||
|
|
||||||
|
def _reset_for_tests() -> None:
|
||||||
|
global _events_dropped, _FLUSH_THREAD, _QUEUE
|
||||||
|
with _QUEUE_LOCK:
|
||||||
|
_QUEUE = deque(maxlen=config.ANALYTICS_QUEUE_MAX)
|
||||||
|
with _drop_lock:
|
||||||
|
_events_dropped = 0
|
||||||
|
_FLUSH_THREAD = None
|
||||||
|
|
||||||
|
|
||||||
|
def record_request(endpoint: str, username: str | None, widget: str | None,
|
||||||
|
status: int, latency_ms: int, cache_hit: int | None = None) -> None:
|
||||||
|
ev = {
|
||||||
|
"ts": int(time.time()),
|
||||||
|
"service": "edge",
|
||||||
|
"kind": "request",
|
||||||
|
"username": username,
|
||||||
|
"endpoint": endpoint,
|
||||||
|
"widget": widget,
|
||||||
|
"status": int(status),
|
||||||
|
"latency_ms": int(latency_ms),
|
||||||
|
"cache_hit": cache_hit,
|
||||||
|
}
|
||||||
|
global _events_dropped
|
||||||
|
with _QUEUE_LOCK:
|
||||||
|
if len(_QUEUE) >= _QUEUE.maxlen:
|
||||||
|
with _drop_lock:
|
||||||
|
_events_dropped += 1
|
||||||
|
return
|
||||||
|
_QUEUE.append(ev)
|
||||||
|
|
||||||
|
|
||||||
|
def flush_now() -> int:
|
||||||
|
with _QUEUE_LOCK:
|
||||||
|
batch = list(_QUEUE)
|
||||||
|
_QUEUE.clear()
|
||||||
|
if not batch:
|
||||||
|
return 0
|
||||||
|
if not config.ANALYTICS_GENERATOR_URL or not config.ANALYTICS_INTERNAL_TOKEN:
|
||||||
|
return 0
|
||||||
|
try:
|
||||||
|
requests.post(
|
||||||
|
f"{config.ANALYTICS_GENERATOR_URL}/internal/analytics/events",
|
||||||
|
headers={"X-Internal-Token": config.ANALYTICS_INTERNAL_TOKEN},
|
||||||
|
json={"events": batch},
|
||||||
|
timeout=2,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
log.warning("analytics flush failed (events lost)", exc_info=True)
|
||||||
|
return 0
|
||||||
|
return len(batch)
|
||||||
|
|
||||||
|
|
||||||
|
def _flush_loop():
|
||||||
|
while True:
|
||||||
|
time.sleep(config.ANALYTICS_FLUSH_SECONDS)
|
||||||
|
try:
|
||||||
|
flush_now()
|
||||||
|
except Exception:
|
||||||
|
log.exception("flush loop error")
|
||||||
|
|
||||||
|
|
||||||
|
def start_flush_thread():
|
||||||
|
global _FLUSH_THREAD
|
||||||
|
with _THREAD_LOCK:
|
||||||
|
if _FLUSH_THREAD is not None and _FLUSH_THREAD.is_alive():
|
||||||
|
return
|
||||||
|
t = threading.Thread(target=_flush_loop, name="edge-analytics-flush", daemon=True)
|
||||||
|
t.start()
|
||||||
|
_FLUSH_THREAD = t
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
"""Edge service — cache-first SVG proxy in front of the generator."""
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
|
import time
|
||||||
|
from collections import defaultdict, deque
|
||||||
|
from threading import Lock
|
||||||
|
import requests
|
||||||
|
from flask import Flask, Response, jsonify, request
|
||||||
|
from flask_compress import Compress
|
||||||
|
|
||||||
|
from . import analytics, cache as cache_mod, config
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
# Tolerate stray trailing slashes on every route, matching the generator. A
|
||||||
|
# hand-copied embed URL like `/alice/` should resolve like `/alice` instead of
|
||||||
|
# Flask's default strict_slashes 404. Set before the route decorators run.
|
||||||
|
app.url_map.strict_slashes = False
|
||||||
|
Compress(app)
|
||||||
|
cache_ext = cache_mod.build_cache(app)
|
||||||
|
log = logging.getLogger("edge")
|
||||||
|
analytics.start_flush_thread()
|
||||||
|
|
||||||
|
# GitHub usernames: 1-39 chars, alnum, single hyphens. Keep the regex in
|
||||||
|
# sync with generator/src/utils/validate.py so invalid paths get rejected
|
||||||
|
# before they waste an upstream round-trip.
|
||||||
|
_USERNAME_RE = re.compile(r"^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$")
|
||||||
|
_ALLOWED_WIDGETS = {"grade", "impact", "collaborators", "focus", "languages", "achievements", "composite"}
|
||||||
|
|
||||||
|
|
||||||
|
def _valid_username(u: str) -> bool:
|
||||||
|
return bool(u) and bool(_USERNAME_RE.match(u))
|
||||||
|
|
||||||
|
|
||||||
|
# ---- Per-IP rate limiter ---------------------------------------------------
|
||||||
|
# The edge is the mini PC's front door. Cache hits are cheap, but a hostile
|
||||||
|
# cache-miss storm (unique usernames, unique widget names) would funnel into
|
||||||
|
# the generator's render path. Bound it here so the generator's own limiter
|
||||||
|
# isn't the only layer. Operators who run behind a CDN / nginx should prefer
|
||||||
|
# the upstream limiter and raise these env vars.
|
||||||
|
_rate_lock = Lock()
|
||||||
|
_rate_hits: dict[str, deque] = defaultdict(deque)
|
||||||
|
|
||||||
|
|
||||||
|
def _client_ip() -> str:
|
||||||
|
fwd = request.headers.get("X-Forwarded-For", "")
|
||||||
|
if fwd:
|
||||||
|
return fwd.split(",")[-1].strip()
|
||||||
|
return request.remote_addr or "unknown"
|
||||||
|
|
||||||
|
|
||||||
|
def _allow(ip: str) -> bool:
|
||||||
|
now = time.time()
|
||||||
|
cutoff = now - config.RATE_LIMIT_WINDOW
|
||||||
|
with _rate_lock:
|
||||||
|
q = _rate_hits[ip]
|
||||||
|
while q and q[0] < cutoff:
|
||||||
|
q.popleft()
|
||||||
|
if len(q) >= config.RATE_LIMIT_MAX:
|
||||||
|
return False
|
||||||
|
q.append(now)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def _cache_key(path: str) -> str:
|
||||||
|
return f"edge:{path}"
|
||||||
|
|
||||||
|
|
||||||
|
def _fetch_origin(path: str, client_ip: str) -> requests.Response:
|
||||||
|
url = f"{config.GENERATOR_URL}/api/{path}"
|
||||||
|
# Forward the caller's IP so the generator's rate limiter can
|
||||||
|
# discriminate per user rather than treating the edge's single IP as
|
||||||
|
# one client — otherwise the first 300 requests/min exhaust the bucket
|
||||||
|
# for everyone behind the edge.
|
||||||
|
headers = {"X-Forwarded-For": client_ip}
|
||||||
|
return requests.get(url, headers=headers, timeout=config.UPSTREAM_TIMEOUT)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/health", methods=["GET"])
|
||||||
|
def health():
|
||||||
|
ok = True
|
||||||
|
try:
|
||||||
|
r = requests.get(f"{config.GENERATOR_URL}/api/health", timeout=config.UPSTREAM_TIMEOUT)
|
||||||
|
ok = r.status_code == 200
|
||||||
|
except Exception:
|
||||||
|
ok = False
|
||||||
|
return jsonify({"service": "edge", "cache_type": config.CACHE_TYPE, "upstream_ok": ok})
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/<username>", methods=["GET"])
|
||||||
|
def serve(username: str):
|
||||||
|
if not _valid_username(username):
|
||||||
|
return jsonify({"error": "invalid_username"}), 400
|
||||||
|
# GitHub usernames are case-insensitive; canonicalize to lowercase so the
|
||||||
|
# cache key and the upstream path don't fragment by case.
|
||||||
|
username = username.lower()
|
||||||
|
return _serve(username, path=username)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/<username>/<widget>.svg", methods=["GET"])
|
||||||
|
def serve_widget(username: str, widget: str):
|
||||||
|
if not _valid_username(username):
|
||||||
|
return jsonify({"error": "invalid_username"}), 400
|
||||||
|
if widget not in _ALLOWED_WIDGETS:
|
||||||
|
return jsonify({"error": "unknown_widget"}), 400
|
||||||
|
username = username.lower()
|
||||||
|
return _serve(f"{username}/{widget}", path=f"{username}/{widget}.svg")
|
||||||
|
|
||||||
|
|
||||||
|
def _serve(key_suffix: str, path: str) -> Response:
|
||||||
|
t0 = time.monotonic()
|
||||||
|
ip = _client_ip()
|
||||||
|
if not _allow(ip):
|
||||||
|
return jsonify({"error": "rate_limited"}), 429
|
||||||
|
|
||||||
|
ck = _cache_key(key_suffix)
|
||||||
|
cached = cache_ext.get(ck)
|
||||||
|
if cached is not None:
|
||||||
|
body, content_type = cached
|
||||||
|
resp = Response(body, mimetype=content_type, headers={
|
||||||
|
"X-Widget-Status": "ready",
|
||||||
|
"X-Cache": "HIT",
|
||||||
|
"Cache-Control": "public, max-age=3600, s-maxage=86400, stale-while-revalidate=86400",
|
||||||
|
})
|
||||||
|
_record(path, key_suffix, 200, t0, cache_hit=1)
|
||||||
|
return resp
|
||||||
|
|
||||||
|
try:
|
||||||
|
r = _fetch_origin(path, ip)
|
||||||
|
except Exception as e:
|
||||||
|
log.warning("origin unreachable for %s: %s", path, e)
|
||||||
|
_record(path, key_suffix, 503, t0, cache_hit=0)
|
||||||
|
return jsonify({"error": "origin unreachable"}), 503
|
||||||
|
|
||||||
|
if r.status_code >= 500:
|
||||||
|
_record(path, key_suffix, 503, t0, cache_hit=0)
|
||||||
|
return jsonify({"error": "origin error"}), 503
|
||||||
|
|
||||||
|
status = r.headers.get("X-Widget-Status", "ready")
|
||||||
|
content_type = r.headers.get("Content-Type", "image/svg+xml")
|
||||||
|
if status == "ready" and r.status_code == 200:
|
||||||
|
cache_ext.set(ck, (r.content, content_type), timeout=config.CACHE_DEFAULT_TIMEOUT)
|
||||||
|
cc = "public, max-age=3600, s-maxage=86400, stale-while-revalidate=86400"
|
||||||
|
else:
|
||||||
|
cc = "no-store"
|
||||||
|
|
||||||
|
_record(path, key_suffix, r.status_code, t0, cache_hit=0)
|
||||||
|
return Response(r.content, status=r.status_code, mimetype=content_type, headers={
|
||||||
|
"X-Widget-Status": status,
|
||||||
|
"X-Cache": "MISS",
|
||||||
|
"Cache-Control": cc,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def _record(path: str, key_suffix: str, status: int, t0: float, cache_hit: int) -> None:
|
||||||
|
"""Normalize the edge URL into (endpoint_template, username, widget)
|
||||||
|
so the dashboard can group across users without exploding cardinality."""
|
||||||
|
if "/" in key_suffix:
|
||||||
|
username, widget = key_suffix.split("/", 1)
|
||||||
|
endpoint = "/<u>/<widget>.svg"
|
||||||
|
else:
|
||||||
|
username = key_suffix
|
||||||
|
widget = "composite"
|
||||||
|
endpoint = "/<u>"
|
||||||
|
analytics.record_request(
|
||||||
|
endpoint=endpoint, username=username, widget=widget,
|
||||||
|
status=status, latency_ms=int((time.monotonic() - t0) * 1000),
|
||||||
|
cache_hit=cache_hit,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app.run(host="0.0.0.0", port=config.PORT)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
"""Flask-Caching config. v1 = SimpleCache (in-process). Swap to RedisCache via env."""
|
||||||
|
from flask_caching import Cache
|
||||||
|
from . import config
|
||||||
|
|
||||||
|
|
||||||
|
def build_cache(app) -> Cache:
|
||||||
|
cfg = {
|
||||||
|
"CACHE_TYPE": config.CACHE_TYPE,
|
||||||
|
"CACHE_DEFAULT_TIMEOUT": config.CACHE_DEFAULT_TIMEOUT,
|
||||||
|
"CACHE_THRESHOLD": config.CACHE_THRESHOLD,
|
||||||
|
}
|
||||||
|
if config.CACHE_TYPE == "RedisCache" and config.CACHE_REDIS_URL:
|
||||||
|
cfg["CACHE_REDIS_URL"] = config.CACHE_REDIS_URL
|
||||||
|
c = Cache(config=cfg)
|
||||||
|
c.init_app(app)
|
||||||
|
return c
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
PORT = int(os.getenv("EDGE_PORT", "5003"))
|
||||||
|
GENERATOR_URL = os.getenv("GENERATOR_URL", "http://localhost:5002")
|
||||||
|
CACHE_TYPE = os.getenv("CACHE_TYPE", "SimpleCache")
|
||||||
|
CACHE_REDIS_URL = os.getenv("CACHE_REDIS_URL", "")
|
||||||
|
CACHE_DEFAULT_TIMEOUT = int(os.getenv("CACHE_DEFAULT_TIMEOUT", "86400"))
|
||||||
|
CACHE_THRESHOLD = int(os.getenv("CACHE_THRESHOLD", "10000"))
|
||||||
|
UPSTREAM_TIMEOUT = int(os.getenv("EDGE_UPSTREAM_TIMEOUT", "10"))
|
||||||
|
|
||||||
|
# Per-IP rate limit at the edge. Anti-abuse only — cache hits are cheap
|
||||||
|
# and cache misses are already bounded by the generator's global
|
||||||
|
# semaphore, so normal traffic should never notice this. Generous by
|
||||||
|
# default; tighten via env if a specific IP misbehaves.
|
||||||
|
RATE_LIMIT_MAX = int(os.getenv("EDGE_RATE_LIMIT_MAX", "3000"))
|
||||||
|
RATE_LIMIT_WINDOW = int(os.getenv("EDGE_RATE_LIMIT_WINDOW", "60"))
|
||||||
|
|
||||||
|
ANALYTICS_GENERATOR_URL = os.getenv("ANALYTICS_GENERATOR_URL", os.getenv("GENERATOR_URL", "http://localhost:5002"))
|
||||||
|
ANALYTICS_INTERNAL_TOKEN = os.getenv("FETCHER_INTERNAL_TOKEN", "")
|
||||||
|
ANALYTICS_FLUSH_SECONDS = int(os.getenv("ANALYTICS_FLUSH_SECONDS", "5"))
|
||||||
|
ANALYTICS_QUEUE_MAX = int(os.getenv("ANALYTICS_QUEUE_MAX", "2000"))
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import responses
|
||||||
|
from src import analytics as a
|
||||||
|
from src import config as cfg
|
||||||
|
|
||||||
|
|
||||||
|
def test_record_request_enqueues():
|
||||||
|
a._reset_for_tests()
|
||||||
|
a.record_request("/<u>", "alice", "composite", 200, 12, cache_hit=1)
|
||||||
|
assert len(a._QUEUE) == 1
|
||||||
|
e = a._QUEUE[0]
|
||||||
|
assert e["service"] == "edge"
|
||||||
|
assert e["username"] == "alice"
|
||||||
|
assert e["latency_ms"] == 12
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_flush_posts_batch(monkeypatch):
|
||||||
|
monkeypatch.setattr(cfg, "ANALYTICS_GENERATOR_URL", "http://gen:5002")
|
||||||
|
monkeypatch.setattr(cfg, "ANALYTICS_INTERNAL_TOKEN", "secret")
|
||||||
|
a._reset_for_tests()
|
||||||
|
responses.add(responses.POST, "http://gen:5002/internal/analytics/events",
|
||||||
|
json={"ingested": 2}, status=200)
|
||||||
|
a.record_request("/<u>", "alice", "composite", 200, 12, cache_hit=1)
|
||||||
|
a.record_request("/<u>", "bob", "composite", 200, 8, cache_hit=0)
|
||||||
|
a.flush_now()
|
||||||
|
assert len(responses.calls) == 1
|
||||||
|
import json
|
||||||
|
body = json.loads(responses.calls[0].request.body)
|
||||||
|
assert len(body["events"]) == 2
|
||||||
|
|
||||||
|
|
||||||
|
def test_instrument_wraps_serve_and_records(monkeypatch):
|
||||||
|
monkeypatch.setattr(cfg, "ANALYTICS_INTERNAL_TOKEN", "secret")
|
||||||
|
a._reset_for_tests()
|
||||||
|
from src import api as apimod
|
||||||
|
with apimod.app.test_client() as c:
|
||||||
|
class FakeResp:
|
||||||
|
status_code = 200
|
||||||
|
content = b"<svg/>"
|
||||||
|
headers = {"X-Widget-Status": "ready", "Content-Type": "image/svg+xml"}
|
||||||
|
monkeypatch.setattr(apimod, "_fetch_origin", lambda *a, **k: FakeResp())
|
||||||
|
apimod.cache_ext.clear()
|
||||||
|
c.get("/alice")
|
||||||
|
assert len(a._QUEUE) == 1
|
||||||
|
assert a._QUEUE[0]["username"] == "alice"
|
||||||
|
assert a._QUEUE[0]["endpoint"] == "/<u>"
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
import pytest
|
||||||
|
import responses
|
||||||
|
from src import api as apimod
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def client(monkeypatch):
|
||||||
|
monkeypatch.setattr(apimod.config, "GENERATOR_URL", "http://gen:5002")
|
||||||
|
apimod.cache_ext.clear()
|
||||||
|
apimod.app.config["TESTING"] = True
|
||||||
|
with apimod.app.test_client() as c:
|
||||||
|
yield c
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_miss_then_hit_serves_from_cache(client):
|
||||||
|
responses.add(responses.GET, "http://gen:5002/api/alice",
|
||||||
|
body=b"<svg>ready</svg>", status=200,
|
||||||
|
headers={"X-Widget-Status": "ready", "Content-Type": "image/svg+xml"})
|
||||||
|
r1 = client.get("/alice")
|
||||||
|
assert r1.status_code == 200
|
||||||
|
assert r1.data == b"<svg>ready</svg>"
|
||||||
|
responses.reset()
|
||||||
|
r2 = client.get("/alice")
|
||||||
|
assert r2.status_code == 200
|
||||||
|
assert r2.data == b"<svg>ready</svg>"
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_placeholder_not_cached(client):
|
||||||
|
responses.add(responses.GET, "http://gen:5002/api/alice",
|
||||||
|
body=b"<svg>building</svg>", status=200,
|
||||||
|
headers={"X-Widget-Status": "building", "Content-Type": "image/svg+xml"})
|
||||||
|
r1 = client.get("/alice")
|
||||||
|
assert r1.status_code == 200
|
||||||
|
r2 = client.get("/alice")
|
||||||
|
assert len(responses.calls) == 2
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_origin_error_returns_503(client):
|
||||||
|
responses.add(responses.GET, "http://gen:5002/api/alice", status=500)
|
||||||
|
r = client.get("/alice")
|
||||||
|
assert r.status_code == 503
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_trailing_slash_tolerated(client):
|
||||||
|
"""A hand-copied `/alice/` must resolve like `/alice`, not 404."""
|
||||||
|
responses.add(responses.GET, "http://gen:5002/api/alice",
|
||||||
|
body=b"<svg>ready</svg>", status=200,
|
||||||
|
headers={"X-Widget-Status": "ready", "Content-Type": "image/svg+xml"})
|
||||||
|
r = client.get("/alice/")
|
||||||
|
assert r.status_code == 200
|
||||||
|
assert r.data == b"<svg>ready</svg>"
|
||||||
|
|
||||||
|
|
||||||
|
def test_health(client):
|
||||||
|
r = client.get("/health")
|
||||||
|
assert r.status_code == 200
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
COPY src ./src
|
||||||
|
COPY gunicorn.conf.py ./
|
||||||
|
RUN mkdir -p /app/data
|
||||||
|
|
||||||
|
EXPOSE 5001
|
||||||
|
ENV FETCHER_DB_PATH=/app/data/fetcher.db
|
||||||
|
|
||||||
|
# Default is the API. Override CMD for cron: ["python", "-m", "src.cron"]
|
||||||
|
CMD ["gunicorn", "-b", "0.0.0.0:5001", "-w", "2", "src.api:app"]
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# Fetcher Service
|
||||||
|
|
||||||
|
Owns every GitHub API interaction. Holds the PAT. Exposes cached payloads
|
||||||
|
over an internal-only HTTP API protected by a shared secret.
|
||||||
|
|
||||||
|
## Run locally
|
||||||
|
|
||||||
|
cd fetcher
|
||||||
|
pip install -r requirements.txt
|
||||||
|
FETCHER_INTERNAL_TOKEN=dev GITHUB_PAT=ghp_xxx python -m src.api
|
||||||
|
|
||||||
|
Cron (separate process):
|
||||||
|
|
||||||
|
FETCHER_INTERNAL_TOKEN=dev GITHUB_PAT=ghp_xxx python -m src.cron
|
||||||
|
|
||||||
|
## Test
|
||||||
|
|
||||||
|
cd fetcher && pytest
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
docker build -t ghstats-fetcher .
|
||||||
|
docker run -e GITHUB_PAT=ghp_xxx -e FETCHER_INTERNAL_TOKEN=dev -p 5001:5001 -v $(pwd)/data:/app/data ghstats-fetcher
|
||||||
|
# cron: override CMD to ["python","-m","src.cron"]
|
||||||
|
|
||||||
|
## Endpoints
|
||||||
|
|
||||||
|
| Method | Path | Auth | Description |
|
||||||
|
|---|---|---|---|
|
||||||
|
| GET | /health | none | health check |
|
||||||
|
| GET | /data/<u> | X-Internal-Token | return stored payload; auto-fetches on miss |
|
||||||
|
| POST | /fetch | X-Internal-Token | force re-fetch (body: {username}) |
|
||||||
|
| GET | /avatar/<u> | X-Internal-Token | proxied avatar bytes |
|
||||||
|
|
||||||
|
## Env
|
||||||
|
|
||||||
|
See `src/config.py`.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
"""Gunicorn settings: one access line per request on stdout, for Pantheos.
|
||||||
|
|
||||||
|
Docker's json-file driver captures stdout and Pantheos ingests it, so each line
|
||||||
|
becomes a request log and feeds the container's rps / 5xx / p95. Monitoring
|
||||||
|
traffic (/metrics scrapes, /health checks) is left out so it doesn't drown the
|
||||||
|
real requests.
|
||||||
|
"""
|
||||||
|
from gunicorn import glogging
|
||||||
|
|
||||||
|
accesslog = "-"
|
||||||
|
access_log_format = '"%(r)s" %(s)s %(M)sms'
|
||||||
|
|
||||||
|
_QUIET_PATHS = ("/metrics", "/health")
|
||||||
|
|
||||||
|
|
||||||
|
class _Logger(glogging.Logger):
|
||||||
|
def access(self, resp, req, environ, request_time):
|
||||||
|
if req.path not in _QUIET_PATHS:
|
||||||
|
super().access(resp, req, environ, request_time)
|
||||||
|
|
||||||
|
|
||||||
|
logger_class = _Logger
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
[pytest]
|
||||||
|
testpaths = tests
|
||||||
|
python_files = test_*.py
|
||||||
|
pythonpath = .
|
||||||
|
addopts = -ra --strict-markers
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
flask==3.0.3
|
||||||
|
requests==2.32.3
|
||||||
|
pytest==8.3.3
|
||||||
|
responses==0.25.3
|
||||||
|
gunicorn==23.0.0
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
"""Fetcher analytics — record fetch latency + push batches to the generator.
|
||||||
|
|
||||||
|
The hot path enqueues; a daemon thread flushes batches over the internal
|
||||||
|
Docker network. On push failure we drop the batch and keep going.
|
||||||
|
"""
|
||||||
|
import logging
|
||||||
|
import threading
|
||||||
|
import time
|
||||||
|
from collections import deque
|
||||||
|
import requests
|
||||||
|
|
||||||
|
from . import config
|
||||||
|
|
||||||
|
log = logging.getLogger("fetcher.analytics")
|
||||||
|
|
||||||
|
_QUEUE: deque = deque(maxlen=config.ANALYTICS_QUEUE_MAX)
|
||||||
|
_QUEUE_LOCK = threading.Lock()
|
||||||
|
_THREAD_LOCK = threading.Lock()
|
||||||
|
_FLUSH_THREAD: threading.Thread | None = None
|
||||||
|
_events_dropped: int = 0
|
||||||
|
_drop_lock = threading.Lock()
|
||||||
|
|
||||||
|
|
||||||
|
def _reset_for_tests() -> None:
|
||||||
|
global _events_dropped, _FLUSH_THREAD, _QUEUE
|
||||||
|
with _QUEUE_LOCK:
|
||||||
|
_QUEUE = deque(maxlen=config.ANALYTICS_QUEUE_MAX)
|
||||||
|
with _drop_lock:
|
||||||
|
_events_dropped = 0
|
||||||
|
_FLUSH_THREAD = None
|
||||||
|
|
||||||
|
|
||||||
|
def record_fetch(username: str, status: int, latency_ms: int) -> None:
|
||||||
|
ev = {
|
||||||
|
"ts": int(time.time()),
|
||||||
|
"service": "fetcher",
|
||||||
|
"kind": "fetch",
|
||||||
|
"username": username,
|
||||||
|
"endpoint": "github/users/<u>",
|
||||||
|
"widget": None,
|
||||||
|
"status": int(status),
|
||||||
|
"latency_ms": int(latency_ms),
|
||||||
|
"cache_hit": None,
|
||||||
|
}
|
||||||
|
global _events_dropped
|
||||||
|
with _QUEUE_LOCK:
|
||||||
|
if len(_QUEUE) >= _QUEUE.maxlen:
|
||||||
|
with _drop_lock:
|
||||||
|
_events_dropped += 1
|
||||||
|
return
|
||||||
|
_QUEUE.append(ev)
|
||||||
|
|
||||||
|
|
||||||
|
def flush_now() -> int:
|
||||||
|
with _QUEUE_LOCK:
|
||||||
|
batch = list(_QUEUE)
|
||||||
|
_QUEUE.clear()
|
||||||
|
if not batch:
|
||||||
|
return 0
|
||||||
|
if not config.GENERATOR_URL or not config.INTERNAL_TOKEN:
|
||||||
|
return 0
|
||||||
|
try:
|
||||||
|
requests.post(
|
||||||
|
f"{config.GENERATOR_URL}/internal/analytics/events",
|
||||||
|
headers={"X-Internal-Token": config.INTERNAL_TOKEN},
|
||||||
|
json={"events": batch},
|
||||||
|
timeout=2,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
log.warning("analytics flush failed (events lost)", exc_info=True)
|
||||||
|
return 0
|
||||||
|
return len(batch)
|
||||||
|
|
||||||
|
|
||||||
|
def _flush_loop():
|
||||||
|
while True:
|
||||||
|
time.sleep(config.ANALYTICS_FLUSH_SECONDS)
|
||||||
|
try:
|
||||||
|
flush_now()
|
||||||
|
except Exception:
|
||||||
|
log.exception("flush loop error")
|
||||||
|
|
||||||
|
|
||||||
|
def start_flush_thread():
|
||||||
|
global _FLUSH_THREAD
|
||||||
|
with _THREAD_LOCK:
|
||||||
|
if _FLUSH_THREAD is not None and _FLUSH_THREAD.is_alive():
|
||||||
|
return
|
||||||
|
t = threading.Thread(target=_flush_loop, name="fetcher-analytics-flush", daemon=True)
|
||||||
|
t.start()
|
||||||
|
_FLUSH_THREAD = t
|
||||||
@@ -0,0 +1,292 @@
|
|||||||
|
"""Flask app for the fetcher service. All endpoints require X-Internal-Token."""
|
||||||
|
import fcntl
|
||||||
|
import hmac
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import threading
|
||||||
|
import time
|
||||||
|
import requests
|
||||||
|
import tempfile
|
||||||
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
from flask import Flask, jsonify, request, Response
|
||||||
|
from functools import wraps
|
||||||
|
|
||||||
|
from . import analytics, config, db, github
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
log = logging.getLogger("fetcher.api")
|
||||||
|
|
||||||
|
analytics.start_flush_thread()
|
||||||
|
|
||||||
|
# Background pool for /fetch-async. The fetch routinely takes 10-20s of
|
||||||
|
# wall clock even after parallelization, which is too long to hold an HTTP
|
||||||
|
# request open from the generator (it would block the worker on its hot
|
||||||
|
# path). Submitting to this pool lets us return 202 immediately and call
|
||||||
|
# the generator back when the fetch finishes.
|
||||||
|
_BG_POOL = ThreadPoolExecutor(
|
||||||
|
max_workers=max(1, config.ASYNC_FETCH_WORKERS),
|
||||||
|
thread_name_prefix="fetch-bg",
|
||||||
|
)
|
||||||
|
# Per-process in-flight set. If two callers ask us to fetch the same user
|
||||||
|
# while the first fetch is still running, we ack the second one without
|
||||||
|
# starting a duplicate GitHub call. Per-process only — fine for v1's single
|
||||||
|
# fetcher container; a multi-replica deploy would need a distributed lock.
|
||||||
|
_INFLIGHT: set[str] = set()
|
||||||
|
_INFLIGHT_LOCK = threading.Lock()
|
||||||
|
# /data misses for the same user (worker build, ad hoc renders, cron) used to
|
||||||
|
# each run a full GitHub fetch. gunicorn runs sync worker processes, so the
|
||||||
|
# lock is a per-username file lock that all workers in the container share.
|
||||||
|
_MISS_LOCK_DIR = tempfile.gettempdir()
|
||||||
|
|
||||||
|
# Must stay in sync with github.py's _USERNAME_RE. Trust boundary: the
|
||||||
|
# fetcher is called only by the generator over the internal network, but
|
||||||
|
# a compromised/bugged generator must not be able to turn us into an
|
||||||
|
# arbitrary GitHub URL fetcher.
|
||||||
|
_USERNAME_RE = re.compile(r"^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$")
|
||||||
|
|
||||||
|
|
||||||
|
def _valid_username(u) -> bool:
|
||||||
|
return isinstance(u, str) and bool(_USERNAME_RE.match(u))
|
||||||
|
|
||||||
|
|
||||||
|
def require_internal_token(fn):
|
||||||
|
@wraps(fn)
|
||||||
|
def wrapper(*args, **kwargs):
|
||||||
|
token = request.headers.get("X-Internal-Token", "")
|
||||||
|
if not config.INTERNAL_TOKEN or not hmac.compare_digest(token, config.INTERNAL_TOKEN):
|
||||||
|
return jsonify({"error": "unauthorized"}), 401
|
||||||
|
return fn(*args, **kwargs)
|
||||||
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/health", methods=["GET"])
|
||||||
|
def health():
|
||||||
|
return jsonify({"status": "ok", "service": "fetcher", "users": len(db.list_usernames())})
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/metrics", methods=["GET"])
|
||||||
|
def metrics():
|
||||||
|
"""Prometheus-format fetch-outcome counters for the monitoring stack.
|
||||||
|
|
||||||
|
Deliberately unauthenticated (the rest of the API requires the internal
|
||||||
|
token): it exposes only aggregate counts — no usernames, no payloads — and
|
||||||
|
the scraper (vmagent) can't send our internal header. The counts are read
|
||||||
|
from fetcher.db, so they include the cron container's fetches too."""
|
||||||
|
counts = db.read_fetch_metrics()
|
||||||
|
lines = [
|
||||||
|
"# HELP ghstats_fetch_total GitHub fetch outcomes by result.",
|
||||||
|
"# TYPE ghstats_fetch_total counter",
|
||||||
|
]
|
||||||
|
for outcome, n in counts.items():
|
||||||
|
lines.append(f'ghstats_fetch_total{{outcome="{outcome}"}} {n}')
|
||||||
|
return Response("\n".join(lines) + "\n", mimetype="text/plain; version=0.0.4")
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/data/<username>", methods=["GET"])
|
||||||
|
@require_internal_token
|
||||||
|
def get_data(username: str):
|
||||||
|
if not _valid_username(username):
|
||||||
|
return jsonify({"error": "invalid_username"}), 400
|
||||||
|
if db.get_user(username) is None:
|
||||||
|
path = os.path.join(_MISS_LOCK_DIR, f"ghstats-miss-{username.lower()}.lock")
|
||||||
|
with open(path, "w") as lock:
|
||||||
|
fcntl.flock(lock, fcntl.LOCK_EX)
|
||||||
|
return _get_data(username)
|
||||||
|
return _get_data(username)
|
||||||
|
|
||||||
|
|
||||||
|
def _get_data(username: str):
|
||||||
|
row = db.get_user(username)
|
||||||
|
if row is None:
|
||||||
|
# Auto-fetch path
|
||||||
|
t0 = time.monotonic()
|
||||||
|
try:
|
||||||
|
data = github.fetch_github_data(username, token=config.GITHUB_PAT)
|
||||||
|
except github.GitHubTransientError as e:
|
||||||
|
analytics.record_fetch(username, 503, int((time.monotonic() - t0) * 1000))
|
||||||
|
log.warning("github fetch rate-limited for %s: %s", username, e)
|
||||||
|
return jsonify({"error": "github_rate_limited"}), 503
|
||||||
|
except Exception:
|
||||||
|
analytics.record_fetch(username, 502, int((time.monotonic() - t0) * 1000))
|
||||||
|
log.exception("github fetch failed for %s", username)
|
||||||
|
return jsonify({"error": "fetch_failed"}), 502
|
||||||
|
if _is_github_not_found(data):
|
||||||
|
data = {"error": "not_found"}
|
||||||
|
analytics.record_fetch(username, 404, int((time.monotonic() - t0) * 1000))
|
||||||
|
else:
|
||||||
|
analytics.record_fetch(username, 200, int((time.monotonic() - t0) * 1000))
|
||||||
|
h = db.upsert_user(username, data)
|
||||||
|
return jsonify({"data": data, "payload_hash": h, "fetched": True})
|
||||||
|
return jsonify({
|
||||||
|
"data": row["data"],
|
||||||
|
"payload_hash": row["payload_hash"],
|
||||||
|
"fetched_at": row["fetched_at"],
|
||||||
|
"fetched": False,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/fetch", methods=["POST"])
|
||||||
|
@require_internal_token
|
||||||
|
def force_fetch():
|
||||||
|
body = request.get_json(silent=True) or {}
|
||||||
|
username = body.get("username")
|
||||||
|
if not _valid_username(username):
|
||||||
|
return jsonify({"error": "invalid_username"}), 400
|
||||||
|
t0 = time.monotonic()
|
||||||
|
try:
|
||||||
|
data = github.fetch_github_data(username, token=config.GITHUB_PAT)
|
||||||
|
except Exception as e:
|
||||||
|
# Previously returned f"fetch failed: {e}" which leaks internal
|
||||||
|
# exception text (URLs, stack fragments) across the trust boundary.
|
||||||
|
analytics.record_fetch(username, 502, int((time.monotonic() - t0) * 1000))
|
||||||
|
_record_fetch_failure(username, e)
|
||||||
|
return jsonify({"error": "fetch_failed"}), 502
|
||||||
|
if _is_github_not_found(data):
|
||||||
|
data = {"error": "not_found"}
|
||||||
|
analytics.record_fetch(username, 404, int((time.monotonic() - t0) * 1000))
|
||||||
|
db.bump_fetch_metric("not_found")
|
||||||
|
else:
|
||||||
|
analytics.record_fetch(username, 200, int((time.monotonic() - t0) * 1000))
|
||||||
|
db.bump_fetch_metric("ok")
|
||||||
|
old = db.get_user(username)
|
||||||
|
old_hash = old["payload_hash"] if old else None
|
||||||
|
new_hash = db.upsert_user(username, data)
|
||||||
|
return jsonify({"stored": True, "payload_hash": new_hash, "changed": old_hash != new_hash})
|
||||||
|
|
||||||
|
|
||||||
|
def _bg_fetch(username: str) -> None:
|
||||||
|
"""Background fetch + generator callback. Runs on _BG_POOL.
|
||||||
|
|
||||||
|
Always notifies the generator on completion (including not_found and
|
||||||
|
failure cases) so the generator can decide whether to enqueue a build,
|
||||||
|
persist a not_found marker, or do nothing. Without the callback the
|
||||||
|
generator would have to poll, which is exactly the design we're
|
||||||
|
removing — the worker used to block on the synchronous /data call and
|
||||||
|
time out on long fetches.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
t0 = time.monotonic()
|
||||||
|
try:
|
||||||
|
data = github.fetch_github_data(username, token=config.GITHUB_PAT)
|
||||||
|
if _is_github_not_found(data):
|
||||||
|
data = {"error": "not_found"}
|
||||||
|
analytics.record_fetch(username, 404, int((time.monotonic() - t0) * 1000))
|
||||||
|
db.bump_fetch_metric("not_found")
|
||||||
|
else:
|
||||||
|
analytics.record_fetch(username, 200, int((time.monotonic() - t0) * 1000))
|
||||||
|
db.bump_fetch_metric("ok")
|
||||||
|
payload_hash = db.upsert_user(username, data)
|
||||||
|
ok = True
|
||||||
|
except Exception as e:
|
||||||
|
analytics.record_fetch(username, 502, int((time.monotonic() - t0) * 1000))
|
||||||
|
_record_fetch_failure(username, e)
|
||||||
|
payload_hash = ""
|
||||||
|
ok = False
|
||||||
|
_notify_generator_data_ready(username, payload_hash, ok)
|
||||||
|
finally:
|
||||||
|
with _INFLIGHT_LOCK:
|
||||||
|
_INFLIGHT.discard(username)
|
||||||
|
|
||||||
|
|
||||||
|
def _notify_generator_data_ready(username: str, payload_hash: str, ok: bool) -> None:
|
||||||
|
if not config.GENERATOR_URL or not config.INTERNAL_TOKEN:
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
requests.post(
|
||||||
|
f"{config.GENERATOR_URL}/internal/data-ready",
|
||||||
|
headers={"X-Internal-Token": config.INTERNAL_TOKEN},
|
||||||
|
json={"username": username, "payload_hash": payload_hash, "ok": ok},
|
||||||
|
timeout=5,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
log.warning("data-ready callback to generator failed for %s", username, exc_info=True)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/fetch-async", methods=["POST"])
|
||||||
|
@require_internal_token
|
||||||
|
def fetch_async():
|
||||||
|
"""Kick off a background GitHub fetch and return immediately.
|
||||||
|
|
||||||
|
The generator calls this on enrollment so the user-perceived latency
|
||||||
|
isn't bounded by GitHub's response time + the generator's HTTP
|
||||||
|
timeout. When the fetch completes the fetcher posts back to
|
||||||
|
/internal/data-ready on the generator, which is what enqueues the
|
||||||
|
build job.
|
||||||
|
"""
|
||||||
|
body = request.get_json(silent=True) or {}
|
||||||
|
username = body.get("username")
|
||||||
|
if not _valid_username(username):
|
||||||
|
return jsonify({"error": "invalid_username"}), 400
|
||||||
|
with _INFLIGHT_LOCK:
|
||||||
|
if username in _INFLIGHT:
|
||||||
|
return jsonify({"queued": True, "already_inflight": True}), 202
|
||||||
|
_INFLIGHT.add(username)
|
||||||
|
try:
|
||||||
|
_BG_POOL.submit(_bg_fetch, username)
|
||||||
|
except RuntimeError:
|
||||||
|
# Pool was shut down (process exiting). Drop the in-flight marker
|
||||||
|
# so a retry after restart isn't blocked by a stale entry.
|
||||||
|
with _INFLIGHT_LOCK:
|
||||||
|
_INFLIGHT.discard(username)
|
||||||
|
return jsonify({"error": "shutting_down"}), 503
|
||||||
|
return jsonify({"queued": True}), 202
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/avatar/<username>", methods=["GET"])
|
||||||
|
@require_internal_token
|
||||||
|
def avatar(username: str):
|
||||||
|
# SSRF surface: we build https://github.com/<u>.png from path input. The
|
||||||
|
# <username> Flask converter already refuses slashes, but allowlist the
|
||||||
|
# shape anyway so any future change to the proxy path can't turn into a
|
||||||
|
# URL-smuggling primitive.
|
||||||
|
if not _valid_username(username):
|
||||||
|
return jsonify({"error": "invalid_username"}), 400
|
||||||
|
try:
|
||||||
|
r = requests.get(
|
||||||
|
f"https://github.com/{username}.png",
|
||||||
|
timeout=config.API_TIMEOUT,
|
||||||
|
allow_redirects=True,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
log.exception("avatar fetch failed for %s", username)
|
||||||
|
return jsonify({"error": "avatar_unavailable"}), 502
|
||||||
|
if r.status_code != 200:
|
||||||
|
return jsonify({"error": "avatar unavailable"}), 404
|
||||||
|
return Response(r.content, mimetype=r.headers.get("Content-Type", "image/png"))
|
||||||
|
|
||||||
|
|
||||||
|
def _is_github_not_found(data: dict) -> bool:
|
||||||
|
user = data.get("user")
|
||||||
|
if user is None:
|
||||||
|
return True
|
||||||
|
if isinstance(user, dict) and user.get("message") == "Not Found":
|
||||||
|
return True
|
||||||
|
# An error body (rate limit, abuse detection, anything else GitHub answers
|
||||||
|
# with a bare {"message": ...}) carries no login. It is not user data and
|
||||||
|
# must never be recorded as a successful fetch. github.py raises
|
||||||
|
# GitHubTransientError before we get here in practice; this is the backstop.
|
||||||
|
if isinstance(user, dict) and "login" not in user:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def _record_fetch_failure(username: str, exc: Exception) -> None:
|
||||||
|
"""Classify a failed fetch for metrics + logs. A transient failure (rate
|
||||||
|
limit / 5xx / network) is the signal worth surfacing: it means we aborted
|
||||||
|
and kept the last-good record instead of persisting zeros."""
|
||||||
|
if isinstance(exc, github.GitHubTransientError):
|
||||||
|
db.bump_fetch_metric("rate_limited")
|
||||||
|
log.warning("github fetch transient failure for %s (kept last-good): %s", username, exc)
|
||||||
|
else:
|
||||||
|
db.bump_fetch_metric("error")
|
||||||
|
log.exception("github fetch failed for %s", username)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
db.init_db()
|
||||||
|
app.run(host="0.0.0.0", port=config.PORT)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
"""Fetcher service configuration, overridable via env vars."""
|
||||||
|
import os
|
||||||
|
|
||||||
|
PORT = int(os.getenv("FETCHER_PORT", "5001"))
|
||||||
|
DB_PATH = os.getenv("FETCHER_DB_PATH", "./data/fetcher.db")
|
||||||
|
GITHUB_PAT = os.getenv("GITHUB_PAT", "")
|
||||||
|
INTERNAL_TOKEN = os.getenv("FETCHER_INTERNAL_TOKEN", "")
|
||||||
|
REFRESH_INTERVAL_HOURS = int(os.getenv("FETCHER_REFRESH_INTERVAL_HOURS", "24"))
|
||||||
|
TRIAL_GC_DAYS = int(os.getenv("FETCHER_TRIAL_GC_DAYS", "7"))
|
||||||
|
# The hourly refresh tick stops once the PAT's core budget falls under this
|
||||||
|
# reserve, so new sign-ups still get fetched, and refreshes at most this many
|
||||||
|
# users per tick, so a day's worth of sign-ups going stale together is spread
|
||||||
|
# over several hours. Oldest-fetched users go first; the rest wait a tick.
|
||||||
|
REFRESH_CORE_RESERVE = int(os.getenv("FETCHER_REFRESH_CORE_RESERVE", "1500"))
|
||||||
|
REFRESH_MAX_PER_TICK = int(os.getenv("FETCHER_REFRESH_MAX_PER_TICK", "60"))
|
||||||
|
# GitHub's secondary (burst) limits trip when refreshes run back to back. The
|
||||||
|
# tick pauses between users; on a rate limit it waits Retry-After (else the
|
||||||
|
# default, capped) and retries that user once, then stops and defers the rest.
|
||||||
|
REFRESH_USER_PAUSE = float(os.getenv("FETCHER_REFRESH_USER_PAUSE", "1.5"))
|
||||||
|
REFRESH_RETRY_SLEEP = int(os.getenv("FETCHER_REFRESH_RETRY_SLEEP", "60"))
|
||||||
|
REFRESH_RETRY_SLEEP_MAX = int(os.getenv("FETCHER_REFRESH_RETRY_SLEEP_MAX", "120"))
|
||||||
|
API_TIMEOUT = int(os.getenv("API_TIMEOUT", "15"))
|
||||||
|
|
||||||
|
# Generator URL is used as a callback target when a /fetch-async background
|
||||||
|
# task completes. Token-protected via the same FETCHER_INTERNAL_TOKEN that
|
||||||
|
# secures generator -> fetcher calls. Empty string disables the callback,
|
||||||
|
# which is fine for tests and one-shot scripts.
|
||||||
|
GENERATOR_URL = os.getenv("GENERATOR_URL", "http://localhost:5002")
|
||||||
|
ASYNC_FETCH_WORKERS = int(os.getenv("FETCHER_ASYNC_WORKERS", "2"))
|
||||||
|
|
||||||
|
# Collaborator-detection tuning
|
||||||
|
COLLABORATOR_MAX_REPO_SIZE = int(os.getenv("COLLABORATOR_MAX_REPO_SIZE", "150"))
|
||||||
|
COLLABORATOR_TOP_REPOS = int(os.getenv("COLLABORATOR_TOP_REPOS", "30"))
|
||||||
|
SMALL_OWNED_REPO_SIZE = int(os.getenv("SMALL_OWNED_REPO_SIZE", "10"))
|
||||||
|
COLLABORATOR_LOOKBACK_DAYS = int(os.getenv("COLLABORATOR_LOOKBACK_DAYS", "365"))
|
||||||
|
MEANINGFUL_MIN_COMMITS = int(os.getenv("MEANINGFUL_MIN_COMMITS", "3"))
|
||||||
|
FORK_MIN_COMMITS = int(os.getenv("FORK_MIN_COMMITS", "10"))
|
||||||
|
OWNER_BOOST = float(os.getenv("OWNER_BOOST", "1.5"))
|
||||||
|
MIN_SHARED_REPOS = int(os.getenv("MIN_SHARED_REPOS", "2"))
|
||||||
|
DEEP_COLLAB_THRESHOLD = int(os.getenv("DEEP_COLLAB_THRESHOLD", "25"))
|
||||||
|
|
||||||
|
# Commit-fetching caps
|
||||||
|
COMMIT_MAX_REPOS = int(os.getenv("COMMIT_MAX_REPOS", "10"))
|
||||||
|
COMMIT_PER_REPO = int(os.getenv("COMMIT_PER_REPO", "30"))
|
||||||
|
|
||||||
|
# Per-repo language-bytes fetches: one REST call each, so cap them to the
|
||||||
|
# most recently pushed repos the user owns (forks excluded).
|
||||||
|
LANGUAGE_MAX_REPOS = int(os.getenv("LANGUAGE_MAX_REPOS", "40"))
|
||||||
|
|
||||||
|
ANALYTICS_FLUSH_SECONDS = int(os.getenv("ANALYTICS_FLUSH_SECONDS", "5"))
|
||||||
|
ANALYTICS_QUEUE_MAX = int(os.getenv("ANALYTICS_QUEUE_MAX", "2000"))
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
"""Scheduled refresh + GC loop. Run as its own container (CMD override)."""
|
||||||
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
from . import config, db, github
|
||||||
|
|
||||||
|
log = logging.getLogger("fetcher.cron")
|
||||||
|
|
||||||
|
|
||||||
|
def _core_remaining() -> int | None:
|
||||||
|
"""Core REST calls left on the PAT, or None if unknown. GitHub does not
|
||||||
|
count /rate_limit calls against the quota."""
|
||||||
|
if not config.GITHUB_PAT:
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
r = requests.get("https://api.github.com/rate_limit",
|
||||||
|
headers={"Authorization": f"Bearer {config.GITHUB_PAT}"},
|
||||||
|
timeout=config.API_TIMEOUT)
|
||||||
|
return int(r.json()["resources"]["core"]["remaining"])
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _fetch_retrying_once(username: str) -> dict:
|
||||||
|
"""Fetch a user; on a transient GitHub error wait Retry-After (else the
|
||||||
|
default, capped) and try once more. A second failure propagates."""
|
||||||
|
try:
|
||||||
|
return github.fetch_github_data(username, token=config.GITHUB_PAT)
|
||||||
|
except github.GitHubTransientError as e:
|
||||||
|
wait = min(e.retry_after or config.REFRESH_RETRY_SLEEP, config.REFRESH_RETRY_SLEEP_MAX)
|
||||||
|
log.warning("refresh rate-limited for %s: %s; retrying once in %ss", username, e, wait)
|
||||||
|
time.sleep(wait)
|
||||||
|
return github.fetch_github_data(username, token=config.GITHUB_PAT)
|
||||||
|
|
||||||
|
|
||||||
|
def tick(hours: int, active_within_days: int, gc_days: int) -> dict:
|
||||||
|
"""Refresh due users, then GC abandoned ones. Returns counts."""
|
||||||
|
refreshed = 0
|
||||||
|
failed = 0
|
||||||
|
due = db.users_due_for_refresh(hours=hours, active_within_days=active_within_days)
|
||||||
|
deferred = max(len(due) - config.REFRESH_MAX_PER_TICK, 0)
|
||||||
|
due = due[:config.REFRESH_MAX_PER_TICK]
|
||||||
|
for i, username in enumerate(due):
|
||||||
|
if i:
|
||||||
|
time.sleep(config.REFRESH_USER_PAUSE)
|
||||||
|
left = _core_remaining()
|
||||||
|
if left is not None and left < config.REFRESH_CORE_RESERVE:
|
||||||
|
log.info("core budget %s under reserve %s; deferring %s refreshes",
|
||||||
|
left, config.REFRESH_CORE_RESERVE, len(due) - i)
|
||||||
|
deferred += len(due) - i
|
||||||
|
break
|
||||||
|
try:
|
||||||
|
data = _fetch_retrying_once(username)
|
||||||
|
user = data.get("user")
|
||||||
|
if user is None or (isinstance(user, dict) and user.get("message") == "Not Found"):
|
||||||
|
data = {"error": "not_found"}
|
||||||
|
db.bump_fetch_metric("not_found")
|
||||||
|
else:
|
||||||
|
db.bump_fetch_metric("ok")
|
||||||
|
db.upsert_user(username, data)
|
||||||
|
refreshed += 1
|
||||||
|
except github.GitHubTransientError as e:
|
||||||
|
db.bump_fetch_metric("rate_limited")
|
||||||
|
log.warning("refresh rate-limited for %s (kept last-good): %s; deferring %s refreshes",
|
||||||
|
username, e, len(due) - i - 1)
|
||||||
|
failed += 1
|
||||||
|
deferred += len(due) - i - 1
|
||||||
|
break
|
||||||
|
except Exception as e:
|
||||||
|
db.bump_fetch_metric("error")
|
||||||
|
log.warning("refresh failed for %s: %s", username, e)
|
||||||
|
failed += 1
|
||||||
|
gc_removed = db.delete_stale(days=gc_days)
|
||||||
|
return {"refreshed": refreshed, "failed": failed, "deferred": deferred, "gc_removed": gc_removed}
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name)s %(message)s")
|
||||||
|
db.init_db()
|
||||||
|
interval = 3600 # 1h between ticks
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
stats = tick(
|
||||||
|
hours=config.REFRESH_INTERVAL_HOURS,
|
||||||
|
active_within_days=config.TRIAL_GC_DAYS,
|
||||||
|
gc_days=config.TRIAL_GC_DAYS,
|
||||||
|
)
|
||||||
|
log.info("tick complete: %s", stats)
|
||||||
|
except Exception:
|
||||||
|
log.exception("tick failed")
|
||||||
|
time.sleep(interval)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
"""SQLite repository for the fetcher service.
|
||||||
|
|
||||||
|
Single table: users (raw GitHub payloads keyed by username).
|
||||||
|
Uses WAL mode so concurrent readers don't block the writer.
|
||||||
|
"""
|
||||||
|
import hashlib
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import sqlite3
|
||||||
|
from contextlib import contextmanager
|
||||||
|
from datetime import datetime, timedelta
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from . import config
|
||||||
|
|
||||||
|
DB_PATH = config.DB_PATH
|
||||||
|
|
||||||
|
SCHEMA_SQL = """
|
||||||
|
CREATE TABLE IF NOT EXISTS users (
|
||||||
|
username TEXT PRIMARY KEY,
|
||||||
|
data_json TEXT NOT NULL,
|
||||||
|
payload_hash TEXT NOT NULL,
|
||||||
|
fetched_at TEXT NOT NULL,
|
||||||
|
last_requested_at TEXT NOT NULL
|
||||||
|
);
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_users_fetched_at ON users(fetched_at);
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_users_last_requested_at ON users(last_requested_at);
|
||||||
|
|
||||||
|
-- Monotonic fetch-outcome counters, shared across the web workers and the
|
||||||
|
-- cron container (both mount the same fetcher.db). Scraped via /metrics so
|
||||||
|
-- rate limits surface in the monitoring stack instead of dying silently.
|
||||||
|
CREATE TABLE IF NOT EXISTS fetch_metrics (
|
||||||
|
outcome TEXT PRIMARY KEY,
|
||||||
|
count INTEGER NOT NULL DEFAULT 0
|
||||||
|
);
|
||||||
|
"""
|
||||||
|
|
||||||
|
# The full label set is emitted even at zero so the counter exists in the
|
||||||
|
# scrape target from the first request (rate() needs a prior sample to work).
|
||||||
|
FETCH_OUTCOMES = ("ok", "not_found", "rate_limited", "error")
|
||||||
|
|
||||||
|
|
||||||
|
def _now() -> str:
|
||||||
|
return datetime.utcnow().isoformat(timespec="seconds") + "Z"
|
||||||
|
|
||||||
|
|
||||||
|
@contextmanager
|
||||||
|
def _connect():
|
||||||
|
os.makedirs(os.path.dirname(DB_PATH) or ".", exist_ok=True)
|
||||||
|
conn = sqlite3.connect(DB_PATH, timeout=10)
|
||||||
|
conn.row_factory = sqlite3.Row
|
||||||
|
conn.execute("PRAGMA journal_mode=WAL")
|
||||||
|
conn.execute("PRAGMA synchronous=NORMAL")
|
||||||
|
conn.execute("PRAGMA foreign_keys=ON")
|
||||||
|
conn.execute("PRAGMA busy_timeout=5000")
|
||||||
|
try:
|
||||||
|
yield conn
|
||||||
|
conn.commit()
|
||||||
|
finally:
|
||||||
|
conn.close()
|
||||||
|
|
||||||
|
|
||||||
|
def init_db() -> None:
|
||||||
|
with _connect() as c:
|
||||||
|
c.executescript(SCHEMA_SQL)
|
||||||
|
c.commit()
|
||||||
|
|
||||||
|
|
||||||
|
def payload_hash(data: dict) -> str:
|
||||||
|
canonical = json.dumps(data, sort_keys=True, separators=(",", ":"))
|
||||||
|
return hashlib.sha256(canonical.encode("utf-8")).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def upsert_user(username: str, data: dict) -> str:
|
||||||
|
h = payload_hash(data)
|
||||||
|
now = _now()
|
||||||
|
with _connect() as c:
|
||||||
|
c.execute(
|
||||||
|
"""INSERT INTO users(username, data_json, payload_hash, fetched_at, last_requested_at)
|
||||||
|
VALUES (?, ?, ?, ?, ?)
|
||||||
|
ON CONFLICT(username) DO UPDATE SET
|
||||||
|
data_json = excluded.data_json,
|
||||||
|
payload_hash = excluded.payload_hash,
|
||||||
|
fetched_at = excluded.fetched_at""",
|
||||||
|
(username, json.dumps(data), h, now, now),
|
||||||
|
)
|
||||||
|
c.commit()
|
||||||
|
return h
|
||||||
|
|
||||||
|
|
||||||
|
def get_user(username: str) -> Optional[dict]:
|
||||||
|
"""Returns {data, payload_hash, fetched_at, last_requested_at} or None. Updates last_requested_at."""
|
||||||
|
now = _now()
|
||||||
|
with _connect() as c:
|
||||||
|
row = c.execute(
|
||||||
|
"SELECT data_json, payload_hash, fetched_at, last_requested_at FROM users WHERE username=?",
|
||||||
|
(username,),
|
||||||
|
).fetchone()
|
||||||
|
if row is None:
|
||||||
|
return None
|
||||||
|
c.execute("UPDATE users SET last_requested_at=? WHERE username=?", (now, username))
|
||||||
|
c.commit()
|
||||||
|
return {
|
||||||
|
"data": json.loads(row["data_json"]),
|
||||||
|
"payload_hash": row["payload_hash"],
|
||||||
|
"fetched_at": row["fetched_at"],
|
||||||
|
"last_requested_at": now,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def delete_stale(days: int) -> int:
|
||||||
|
cutoff = (datetime.utcnow() - timedelta(days=days)).isoformat(timespec="seconds") + "Z"
|
||||||
|
with _connect() as c:
|
||||||
|
cur = c.execute("DELETE FROM users WHERE last_requested_at < ?", (cutoff,))
|
||||||
|
c.commit()
|
||||||
|
return cur.rowcount
|
||||||
|
|
||||||
|
|
||||||
|
def users_due_for_refresh(hours: int, active_within_days: int) -> list[str]:
|
||||||
|
"""Return usernames with fetched_at older than `hours` and last_requested_at within `active_within_days`."""
|
||||||
|
stale_before = (datetime.utcnow() - timedelta(hours=hours)).isoformat(timespec="seconds") + "Z"
|
||||||
|
active_after = (datetime.utcnow() - timedelta(days=active_within_days)).isoformat(timespec="seconds") + "Z"
|
||||||
|
with _connect() as c:
|
||||||
|
rows = c.execute(
|
||||||
|
"SELECT username FROM users WHERE fetched_at < ? AND last_requested_at > ? ORDER BY fetched_at",
|
||||||
|
(stale_before, active_after),
|
||||||
|
).fetchall()
|
||||||
|
return [r["username"] for r in rows]
|
||||||
|
|
||||||
|
|
||||||
|
def list_usernames() -> list[str]:
|
||||||
|
with _connect() as c:
|
||||||
|
return [r["username"] for r in c.execute("SELECT username FROM users ORDER BY username").fetchall()]
|
||||||
|
|
||||||
|
|
||||||
|
def bump_fetch_metric(outcome: str, n: int = 1) -> None:
|
||||||
|
"""Increment the counter for a fetch outcome (one of FETCH_OUTCOMES).
|
||||||
|
|
||||||
|
Best-effort telemetry: a metrics write must never break a fetch, so
|
||||||
|
failures are swallowed."""
|
||||||
|
if outcome not in FETCH_OUTCOMES:
|
||||||
|
outcome = "error"
|
||||||
|
try:
|
||||||
|
with _connect() as c:
|
||||||
|
c.execute(
|
||||||
|
"""INSERT INTO fetch_metrics(outcome, count) VALUES (?, ?)
|
||||||
|
ON CONFLICT(outcome) DO UPDATE SET count = count + excluded.count""",
|
||||||
|
(outcome, n),
|
||||||
|
)
|
||||||
|
c.commit()
|
||||||
|
except sqlite3.Error:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def read_fetch_metrics() -> dict:
|
||||||
|
"""Return {outcome: count} for every outcome in FETCH_OUTCOMES (zero-filled)."""
|
||||||
|
counts = {o: 0 for o in FETCH_OUTCOMES}
|
||||||
|
try:
|
||||||
|
with _connect() as c:
|
||||||
|
for row in c.execute("SELECT outcome, count FROM fetch_metrics"):
|
||||||
|
if row["outcome"] in counts:
|
||||||
|
counts[row["outcome"]] = row["count"]
|
||||||
|
except sqlite3.Error:
|
||||||
|
pass
|
||||||
|
return counts
|
||||||
@@ -1,25 +1,87 @@
|
|||||||
"""GitHub data fetching functions."""
|
"""GitHub data fetching functions."""
|
||||||
|
|
||||||
|
import re
|
||||||
import requests
|
import requests
|
||||||
import base64
|
import base64
|
||||||
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||||
from typing import Optional, Protocol
|
from typing import Optional, Protocol
|
||||||
|
|
||||||
from ..config import (
|
from . import config
|
||||||
COLLABORATOR_MAX_REPO_SIZE,
|
|
||||||
COLLABORATOR_TOP_REPOS,
|
|
||||||
COLLABORATOR_LOOKBACK_DAYS,
|
# GitHub's own username rules: alphanumerics and hyphens, 1–39 chars, no
|
||||||
MEANINGFUL_MIN_COMMITS,
|
# leading/trailing hyphen, no double-hyphens. The fetcher hard-refuses
|
||||||
FORK_MIN_COMMITS,
|
# anything else before it reaches URL construction or GraphQL interpolation —
|
||||||
OWNER_BOOST,
|
# the generator validates too, but this is the last line of defense before
|
||||||
MIN_SHARED_REPOS,
|
# we talk to GitHub on a caller's behalf.
|
||||||
DEEP_COLLAB_THRESHOLD,
|
_USERNAME_RE = re.compile(r"^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}$")
|
||||||
SMALL_OWNED_REPO_SIZE,
|
|
||||||
COMMIT_MAX_REPOS,
|
# Repo full names: owner/repo. Owner matches the username rule; repo allows the
|
||||||
COMMIT_PER_REPO,
|
# same chars plus dot and underscore (matches GitHub's repo-name regex).
|
||||||
API_TIMEOUT,
|
_REPO_FULL_NAME_RE = re.compile(
|
||||||
|
r"^[A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38}"
|
||||||
|
r"/[A-Za-z0-9_.-]{1,100}$"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _assert_username(name: str) -> str:
|
||||||
|
if not isinstance(name, str) or not _USERNAME_RE.match(name):
|
||||||
|
raise ValueError(f"invalid github username: {name!r}")
|
||||||
|
return name
|
||||||
|
|
||||||
|
|
||||||
|
def _assert_repo_full_name(name: str) -> str:
|
||||||
|
if not isinstance(name, str) or not _REPO_FULL_NAME_RE.match(name):
|
||||||
|
raise ValueError(f"invalid github repo name: {name!r}")
|
||||||
|
return name
|
||||||
|
|
||||||
|
|
||||||
|
class GitHubTransientError(Exception):
|
||||||
|
"""A GitHub call failed transiently (rate limit, 5xx, or a network error)
|
||||||
|
rather than returning real data.
|
||||||
|
|
||||||
|
This MUST NOT be swallowed into a zero/empty count. A contribution count
|
||||||
|
computed from a rate-limited response is 0, and persisting that 0 silently
|
||||||
|
overwrites the last good value in fetcher.db — which is exactly how a
|
||||||
|
traffic spike turns into permanently-wrong "0 commits" cards until the
|
||||||
|
next successful fetch. Propagate it instead so the caller aborts the fetch
|
||||||
|
and keeps the previously-cached record."""
|
||||||
|
|
||||||
|
def __init__(self, msg="", retry_after=None):
|
||||||
|
super().__init__(msg)
|
||||||
|
# Seconds from GitHub's Retry-After header, when it sent one.
|
||||||
|
self.retry_after = retry_after
|
||||||
|
|
||||||
|
|
||||||
|
def _raise_if_transient(resp) -> None:
|
||||||
|
"""Raise GitHubTransientError if `resp` looks like a rate limit or server
|
||||||
|
error. A genuine NOT_FOUND (unknown user) is left alone — that is a real,
|
||||||
|
persistable "this user has no data" answer, not a transient failure."""
|
||||||
|
retry_after = resp.headers.get("Retry-After")
|
||||||
|
retry_after = int(retry_after) if retry_after and retry_after.isdigit() else None
|
||||||
|
if resp.status_code in (429, 500, 502, 503, 504):
|
||||||
|
raise GitHubTransientError(f"HTTP {resp.status_code}", retry_after)
|
||||||
|
# Primary/secondary REST rate limits come back as 403 with the remaining
|
||||||
|
# budget at 0 (or a "secondary rate limit" message).
|
||||||
|
if resp.status_code == 403 and resp.headers.get("X-RateLimit-Remaining") == "0":
|
||||||
|
raise GitHubTransientError("REST rate limit exhausted", retry_after)
|
||||||
|
if resp.status_code == 403 and "rate limit" in (resp.text or "").lower():
|
||||||
|
raise GitHubTransientError("REST rate limit exhausted", retry_after)
|
||||||
|
# GraphQL reports rate limits as HTTP 200 with an `errors` array — the same
|
||||||
|
# 200 that a valid response uses — so the body has to be inspected.
|
||||||
|
try:
|
||||||
|
body = resp.json()
|
||||||
|
except ValueError:
|
||||||
|
return
|
||||||
|
# REST list endpoints (events, repos, contributors) answer with a JSON
|
||||||
|
# array — only a GraphQL-shaped object can carry an `errors` block.
|
||||||
|
if not isinstance(body, dict):
|
||||||
|
return
|
||||||
|
for err in (body.get("errors") or []):
|
||||||
|
if err.get("type") in ("RATE_LIMITED", "SERVICE_UNAVAILABLE"):
|
||||||
|
raise GitHubTransientError(err.get("message") or err.get("type"))
|
||||||
|
|
||||||
|
|
||||||
class GitHubDataSource(Protocol):
|
class GitHubDataSource(Protocol):
|
||||||
"""Protocol for GitHub data sources - allows swapping implementations."""
|
"""Protocol for GitHub data sources - allows swapping implementations."""
|
||||||
|
|
||||||
@@ -59,6 +121,10 @@ class GitHubDataSource(Protocol):
|
|||||||
"""Fetch and encode avatar as base64."""
|
"""Fetch and encode avatar as base64."""
|
||||||
...
|
...
|
||||||
|
|
||||||
|
def fetch_repo_languages(self, full_name: str) -> dict:
|
||||||
|
"""Return {language: bytes} for a single repo, or {} on failure."""
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
class DirectAPISource:
|
class DirectAPISource:
|
||||||
"""Direct GitHub API implementation - for immediate requests."""
|
"""Direct GitHub API implementation - for immediate requests."""
|
||||||
@@ -91,7 +157,7 @@ class DirectAPISource:
|
|||||||
"https://api.github.com/graphql",
|
"https://api.github.com/graphql",
|
||||||
json=payload,
|
json=payload,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=API_TIMEOUT,
|
timeout=config.API_TIMEOUT,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f" GraphQL request failed: {e}")
|
print(f" GraphQL request failed: {e}")
|
||||||
@@ -109,26 +175,36 @@ class DirectAPISource:
|
|||||||
|
|
||||||
def fetch_user_data(self, username: str) -> dict:
|
def fetch_user_data(self, username: str) -> dict:
|
||||||
"""Fetch user profile data."""
|
"""Fetch user profile data."""
|
||||||
return requests.get(
|
_assert_username(username)
|
||||||
|
resp = requests.get(
|
||||||
f"{self.base}/users/{username}",
|
f"{self.base}/users/{username}",
|
||||||
headers=self.headers
|
headers=self.headers,
|
||||||
).json()
|
timeout=config.API_TIMEOUT,
|
||||||
|
)
|
||||||
|
_raise_if_transient(resp)
|
||||||
|
return resp.json()
|
||||||
|
|
||||||
def fetch_repos(self, username: str) -> list:
|
def fetch_repos(self, username: str) -> list:
|
||||||
"""Fetch user repositories (owned + contributed to)."""
|
"""Fetch user repositories (owned + contributed to)."""
|
||||||
# Fetch owned repos
|
_assert_username(username)
|
||||||
owned = requests.get(
|
|
||||||
f"{self.base}/users/{username}/repos",
|
|
||||||
headers=self.headers,
|
|
||||||
params={"per_page": 100, "sort": "pushed", "type": "owner"},
|
|
||||||
).json()
|
|
||||||
|
|
||||||
# Fetch all repos (includes collabs, orgs)
|
def _get(repo_type: str):
|
||||||
all_repos = requests.get(
|
resp = requests.get(
|
||||||
f"{self.base}/users/{username}/repos",
|
f"{self.base}/users/{username}/repos",
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
params={"per_page": 100, "sort": "pushed", "type": "all"},
|
params={"per_page": 100, "sort": "pushed", "type": repo_type},
|
||||||
).json()
|
timeout=config.API_TIMEOUT,
|
||||||
|
)
|
||||||
|
_raise_if_transient(resp)
|
||||||
|
return resp.json()
|
||||||
|
|
||||||
|
# The two REST calls are independent — fire them in parallel so the
|
||||||
|
# second isn't waiting on the first to come back.
|
||||||
|
with ThreadPoolExecutor(max_workers=2, thread_name_prefix="fetch-repos") as pool:
|
||||||
|
fut_owned = pool.submit(_get, "owner")
|
||||||
|
fut_all = pool.submit(_get, "all")
|
||||||
|
owned = fut_owned.result()
|
||||||
|
all_repos = fut_all.result()
|
||||||
|
|
||||||
# Combine and deduplicate
|
# Combine and deduplicate
|
||||||
repos = owned if isinstance(owned, list) else []
|
repos = owned if isinstance(owned, list) else []
|
||||||
@@ -144,12 +220,16 @@ class DirectAPISource:
|
|||||||
|
|
||||||
def fetch_events(self, username: str) -> list:
|
def fetch_events(self, username: str) -> list:
|
||||||
"""Fetch user events."""
|
"""Fetch user events."""
|
||||||
|
_assert_username(username)
|
||||||
resp = requests.get(
|
resp = requests.get(
|
||||||
f"{self.base}/users/{username}/events",
|
f"{self.base}/users/{username}/events",
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
params={"per_page": 100},
|
params={"per_page": 100},
|
||||||
).json()
|
timeout=config.API_TIMEOUT,
|
||||||
return resp if isinstance(resp, list) else []
|
)
|
||||||
|
_raise_if_transient(resp)
|
||||||
|
events = resp.json()
|
||||||
|
return events if isinstance(events, list) else []
|
||||||
|
|
||||||
def fetch_commits(self, username: str, repos: list = None) -> list:
|
def fetch_commits(self, username: str, repos: list = None) -> list:
|
||||||
"""
|
"""
|
||||||
@@ -168,28 +248,33 @@ class DirectAPISource:
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
_assert_username(username)
|
||||||
# Get the last year of contribution data
|
# Get the last year of contribution data
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
one_year_ago = now.replace(year=now.year - 1)
|
one_year_ago = now.replace(year=now.year - 1)
|
||||||
from_date = one_year_ago.strftime("%Y-%m-%dT%H:%M:%SZ")
|
from_date = one_year_ago.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
to_date = now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
to_date = now.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
|
||||||
query = f'''
|
# Parameterize username + date range — interpolating username into
|
||||||
query {{
|
# the query lets a malicious name break out of the string literal
|
||||||
user(login: "{username}") {{
|
# and smuggle additional GraphQL fields. GitHub's PAT scopes bound
|
||||||
contributionsCollection(from: "{from_date}", to: "{to_date}") {{
|
# the damage, but the injection is still worth shutting down.
|
||||||
contributionCalendar {{
|
query = """
|
||||||
weeks {{
|
query($login: String!, $from: DateTime!, $to: DateTime!) {
|
||||||
contributionDays {{
|
user(login: $login) {
|
||||||
|
contributionsCollection(from: $from, to: $to) {
|
||||||
|
contributionCalendar {
|
||||||
|
weeks {
|
||||||
|
contributionDays {
|
||||||
date
|
date
|
||||||
contributionCount
|
contributionCount
|
||||||
}}
|
}
|
||||||
}}
|
}
|
||||||
}}
|
}
|
||||||
}}
|
}
|
||||||
}}
|
}
|
||||||
}}
|
}
|
||||||
'''
|
"""
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
**self.headers,
|
**self.headers,
|
||||||
@@ -201,9 +286,12 @@ class DirectAPISource:
|
|||||||
|
|
||||||
resp = requests.post(
|
resp = requests.post(
|
||||||
'https://api.github.com/graphql',
|
'https://api.github.com/graphql',
|
||||||
json={'query': query},
|
json={
|
||||||
|
'query': query,
|
||||||
|
'variables': {'login': username, 'from': from_date, 'to': to_date},
|
||||||
|
},
|
||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=API_TIMEOUT
|
timeout=config.API_TIMEOUT
|
||||||
)
|
)
|
||||||
|
|
||||||
if not resp.ok:
|
if not resp.ok:
|
||||||
@@ -258,6 +346,13 @@ class DirectAPISource:
|
|||||||
return self._fetch_commit_count_graphql_range(username, since_date)
|
return self._fetch_commit_count_graphql_range(username, since_date)
|
||||||
else:
|
else:
|
||||||
return self._fetch_commit_count_graphql_alltime(username)
|
return self._fetch_commit_count_graphql_alltime(username)
|
||||||
|
except GitHubTransientError:
|
||||||
|
# Rate limit / 5xx: abort the fetch so the caller keeps the last
|
||||||
|
# good count instead of persisting a spurious 0.
|
||||||
|
raise
|
||||||
|
except requests.RequestException as e:
|
||||||
|
# A network-level failure is transient too.
|
||||||
|
raise GitHubTransientError(str(e))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f" Error fetching contribution count: {e}")
|
print(f" Error fetching contribution count: {e}")
|
||||||
return 0
|
return 0
|
||||||
@@ -266,6 +361,7 @@ class DirectAPISource:
|
|||||||
"""Fetch all-time contribution count using GraphQL."""
|
"""Fetch all-time contribution count using GraphQL."""
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
_assert_username(username)
|
||||||
# First, get account creation date
|
# First, get account creation date
|
||||||
query = '''
|
query = '''
|
||||||
query($username: String!) {
|
query($username: String!) {
|
||||||
@@ -287,9 +383,10 @@ class DirectAPISource:
|
|||||||
'https://api.github.com/graphql',
|
'https://api.github.com/graphql',
|
||||||
json={'query': query, 'variables': {'username': username}},
|
json={'query': query, 'variables': {'username': username}},
|
||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=API_TIMEOUT
|
timeout=config.API_TIMEOUT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_raise_if_transient(resp)
|
||||||
if not resp.ok or 'data' not in resp.json():
|
if not resp.ok or 'data' not in resp.json():
|
||||||
print(f" GraphQL error: {resp.status_code}")
|
print(f" GraphQL error: {resp.status_code}")
|
||||||
return 0
|
return 0
|
||||||
@@ -302,39 +399,51 @@ class DirectAPISource:
|
|||||||
created_year = int(created_at[:4])
|
created_year = int(created_at[:4])
|
||||||
current_year = datetime.now().year
|
current_year = datetime.now().year
|
||||||
|
|
||||||
# Fetch year by year
|
# Fetch year by year, in parallel. Sequentially this was 1 request
|
||||||
total_contributions = 0
|
# per year of account age (~7-10 calls for typical accounts), each
|
||||||
|
# ~1s — easily a 10s wall-clock contributor on its own.
|
||||||
print(f" Fetching contributions from {created_year} to {current_year}...")
|
print(f" Fetching contributions from {created_year} to {current_year}...")
|
||||||
for year in range(created_year, current_year + 1):
|
year_query = """
|
||||||
year_query = f'''
|
query($login: String!, $from: DateTime!, $to: DateTime!) {
|
||||||
query {{
|
user(login: $login) {
|
||||||
user(login: "{username}") {{
|
contributionsCollection(from: $from, to: $to) {
|
||||||
contributionsCollection(from: "{year}-01-01T00:00:00Z", to: "{year}-12-31T23:59:59Z") {{
|
contributionCalendar { totalContributions }
|
||||||
contributionCalendar {{
|
}
|
||||||
totalContributions
|
}
|
||||||
}}
|
}
|
||||||
}}
|
"""
|
||||||
}}
|
|
||||||
}}
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
def _fetch_year(year: int) -> tuple[int, int]:
|
||||||
year_resp = requests.post(
|
year_resp = requests.post(
|
||||||
'https://api.github.com/graphql',
|
'https://api.github.com/graphql',
|
||||||
json={'query': year_query},
|
json={
|
||||||
|
'query': year_query,
|
||||||
|
'variables': {
|
||||||
|
'login': username,
|
||||||
|
'from': f"{year}-01-01T00:00:00Z",
|
||||||
|
'to': f"{year}-12-31T23:59:59Z",
|
||||||
|
},
|
||||||
|
},
|
||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=API_TIMEOUT
|
timeout=config.API_TIMEOUT,
|
||||||
)
|
)
|
||||||
|
_raise_if_transient(year_resp)
|
||||||
if year_resp.ok:
|
if not year_resp.ok:
|
||||||
|
print(f" {year}: HTTP {year_resp.status_code}")
|
||||||
|
return year, 0
|
||||||
year_data = year_resp.json()
|
year_data = year_resp.json()
|
||||||
if 'data' in year_data and year_data['data'].get('user'):
|
if 'data' in year_data and year_data['data'].get('user'):
|
||||||
year_contributions = year_data['data']['user']['contributionsCollection']['contributionCalendar']['totalContributions']
|
n = year_data['data']['user']['contributionsCollection']['contributionCalendar']['totalContributions']
|
||||||
total_contributions += year_contributions
|
return year, n
|
||||||
print(f" {year}: {year_contributions:,} contributions")
|
|
||||||
else:
|
|
||||||
print(f" {year}: Error - {year_data}")
|
print(f" {year}: Error - {year_data}")
|
||||||
else:
|
return year, 0
|
||||||
print(f" {year}: HTTP {year_resp.status_code}")
|
|
||||||
|
years = list(range(created_year, current_year + 1))
|
||||||
|
total_contributions = 0
|
||||||
|
with ThreadPoolExecutor(max_workers=min(10, len(years) or 1)) as pool:
|
||||||
|
for year, n in sorted(pool.map(_fetch_year, years)):
|
||||||
|
total_contributions += n
|
||||||
|
print(f" {year}: {n:,} contributions")
|
||||||
|
|
||||||
print(f" GraphQL API found {total_contributions:,} contributions (all-time)")
|
print(f" GraphQL API found {total_contributions:,} contributions (all-time)")
|
||||||
return total_contributions
|
return total_contributions
|
||||||
@@ -343,21 +452,20 @@ class DirectAPISource:
|
|||||||
"""Fetch contribution count for a specific date range using GraphQL."""
|
"""Fetch contribution count for a specific date range using GraphQL."""
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
_assert_username(username)
|
||||||
# Convert since_date to proper format
|
# Convert since_date to proper format
|
||||||
from_date = f"{since_date}T00:00:00Z"
|
from_date = f"{since_date}T00:00:00Z"
|
||||||
to_date = datetime.now().strftime("%Y-%m-%dT%H:%M:%SZ")
|
to_date = datetime.now().strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
|
||||||
query = f'''
|
query = """
|
||||||
query {{
|
query($login: String!, $from: DateTime!, $to: DateTime!) {
|
||||||
user(login: "{username}") {{
|
user(login: $login) {
|
||||||
contributionsCollection(from: "{from_date}", to: "{to_date}") {{
|
contributionsCollection(from: $from, to: $to) {
|
||||||
contributionCalendar {{
|
contributionCalendar { totalContributions }
|
||||||
totalContributions
|
}
|
||||||
}}
|
}
|
||||||
}}
|
}
|
||||||
}}
|
"""
|
||||||
}}
|
|
||||||
'''
|
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
**self.headers,
|
**self.headers,
|
||||||
@@ -369,11 +477,15 @@ class DirectAPISource:
|
|||||||
|
|
||||||
resp = requests.post(
|
resp = requests.post(
|
||||||
'https://api.github.com/graphql',
|
'https://api.github.com/graphql',
|
||||||
json={'query': query},
|
json={
|
||||||
|
'query': query,
|
||||||
|
'variables': {'login': username, 'from': from_date, 'to': to_date},
|
||||||
|
},
|
||||||
headers=headers,
|
headers=headers,
|
||||||
timeout=API_TIMEOUT
|
timeout=config.API_TIMEOUT,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_raise_if_transient(resp)
|
||||||
if resp.ok:
|
if resp.ok:
|
||||||
data = resp.json()
|
data = resp.json()
|
||||||
if 'data' in data and data['data'].get('user'):
|
if 'data' in data and data['data'].get('user'):
|
||||||
@@ -401,12 +513,17 @@ class DirectAPISource:
|
|||||||
f"{self.base}/search/issues",
|
f"{self.base}/search/issues",
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
params={"q": query, "per_page": 1},
|
params={"q": query, "per_page": 1},
|
||||||
timeout=API_TIMEOUT
|
timeout=config.API_TIMEOUT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_raise_if_transient(resp)
|
||||||
if resp.ok:
|
if resp.ok:
|
||||||
data = resp.json()
|
data = resp.json()
|
||||||
return data.get("total_count", 0)
|
return data.get("total_count", 0)
|
||||||
|
except GitHubTransientError:
|
||||||
|
raise
|
||||||
|
except requests.RequestException as e:
|
||||||
|
raise GitHubTransientError(str(e))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Warning: Failed to fetch PR count via search API: {e}")
|
print(f"Warning: Failed to fetch PR count via search API: {e}")
|
||||||
|
|
||||||
@@ -428,9 +545,10 @@ class DirectAPISource:
|
|||||||
f"{self.base}/repos/{repo_name}/contributors",
|
f"{self.base}/repos/{repo_name}/contributors",
|
||||||
headers=self.headers,
|
headers=self.headers,
|
||||||
params={"per_page": 100},
|
params={"per_page": 100},
|
||||||
timeout=API_TIMEOUT
|
timeout=config.API_TIMEOUT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_raise_if_transient(resp)
|
||||||
if resp.ok:
|
if resp.ok:
|
||||||
contributors = resp.json()
|
contributors = resp.json()
|
||||||
# Filter by minimum commits
|
# Filter by minimum commits
|
||||||
@@ -438,6 +556,8 @@ class DirectAPISource:
|
|||||||
c for c in contributors
|
c for c in contributors
|
||||||
if c.get("contributions", 0) >= min_commits
|
if c.get("contributions", 0) >= min_commits
|
||||||
]
|
]
|
||||||
|
except GitHubTransientError:
|
||||||
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Warning: Failed to fetch contributors from {repo_name}: {e}")
|
print(f"Warning: Failed to fetch contributors from {repo_name}: {e}")
|
||||||
|
|
||||||
@@ -508,13 +628,32 @@ class DirectAPISource:
|
|||||||
def fetch_avatar(self, avatar_url: str) -> str:
|
def fetch_avatar(self, avatar_url: str) -> str:
|
||||||
"""Fetch and encode avatar as base64."""
|
"""Fetch and encode avatar as base64."""
|
||||||
try:
|
try:
|
||||||
resp = requests.get(avatar_url + "&s=64", timeout=API_TIMEOUT)
|
resp = requests.get(avatar_url + "&s=64", timeout=config.API_TIMEOUT)
|
||||||
if resp.ok:
|
if resp.ok:
|
||||||
return base64.b64encode(resp.content).decode("ascii")
|
return base64.b64encode(resp.content).decode("ascii")
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
def fetch_repo_languages(self, full_name: str) -> dict:
|
||||||
|
"""Return {language: bytes} for a repo. REST returns exactly this
|
||||||
|
shape — total is summed client-side."""
|
||||||
|
try:
|
||||||
|
resp = requests.get(
|
||||||
|
f"{self.base}/repos/{full_name}/languages",
|
||||||
|
headers=self.headers,
|
||||||
|
timeout=config.API_TIMEOUT,
|
||||||
|
)
|
||||||
|
_raise_if_transient(resp)
|
||||||
|
if resp.ok:
|
||||||
|
data = resp.json()
|
||||||
|
return data if isinstance(data, dict) else {}
|
||||||
|
except GitHubTransientError:
|
||||||
|
raise
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
return {}
|
||||||
|
|
||||||
|
|
||||||
# TODO: Future implementation for queue-based batching
|
# TODO: Future implementation for queue-based batching
|
||||||
# class QueuedAPISource:
|
# class QueuedAPISource:
|
||||||
@@ -549,34 +688,44 @@ def fetch_github_data(
|
|||||||
# Use provided data source or default to direct API
|
# Use provided data source or default to direct API
|
||||||
source = data_source or DirectAPISource(token)
|
source = data_source or DirectAPISource(token)
|
||||||
|
|
||||||
# Fetch all data through the data source abstraction
|
|
||||||
user = source.fetch_user_data(username)
|
|
||||||
repos = source.fetch_repos(username)
|
|
||||||
events = source.fetch_events(username)
|
|
||||||
commits = source.fetch_commits(username)
|
|
||||||
|
|
||||||
# Fetch contribution counts (commits + PRs + issues + reviews)
|
|
||||||
print(" Fetching all-time contribution count...")
|
|
||||||
total_commits = source.fetch_commit_count(username, repos)
|
|
||||||
|
|
||||||
# Recent contributions (last 6 months)
|
|
||||||
six_months_ago = (datetime.now() - timedelta(days=180)).strftime("%Y-%m-%d")
|
six_months_ago = (datetime.now() - timedelta(days=180)).strftime("%Y-%m-%d")
|
||||||
print(" Fetching recent contribution count (last 6 months)...")
|
|
||||||
recent_commits = source.fetch_commit_count(username, repos, since_date=six_months_ago)
|
|
||||||
|
|
||||||
# Fetch PR count
|
# Stage 1: every fetch with no dependencies on another fetch's result
|
||||||
print(" Fetching PR count...")
|
# runs in parallel. Previously these 8 calls ran one at a time, so the
|
||||||
total_prs = source.fetch_pr_count(username)
|
# whole pipeline was wait-time × 8. Each is I/O-bound (a single HTTPS
|
||||||
|
# request to GitHub or a small GraphQL query), so threading is the
|
||||||
|
# right primitive. _fetch_collaborators_data internally calls
|
||||||
|
# fetch_user_commit_repos and ignores the `repos` arg, so it has no
|
||||||
|
# ordering dependency on fetch_repos — start them together.
|
||||||
|
with ThreadPoolExecutor(max_workers=10, thread_name_prefix="fetch-stage1") as pool:
|
||||||
|
fut_user = pool.submit(source.fetch_user_data, username)
|
||||||
|
fut_repos = pool.submit(source.fetch_repos, username)
|
||||||
|
fut_events = pool.submit(source.fetch_events, username)
|
||||||
|
fut_commits = pool.submit(source.fetch_commits, username)
|
||||||
|
fut_total = pool.submit(source.fetch_commit_count, username, [])
|
||||||
|
fut_recent = pool.submit(source.fetch_commit_count, username, [], six_months_ago)
|
||||||
|
fut_prs = pool.submit(source.fetch_pr_count, username)
|
||||||
|
fut_collab = pool.submit(_fetch_collaborators_data, username, [], source)
|
||||||
|
|
||||||
# Fetch collaborators from user's active repos
|
user = fut_user.result()
|
||||||
collaborators_data = _fetch_collaborators_data(
|
repos = fut_repos.result()
|
||||||
username, repos, source
|
events = fut_events.result()
|
||||||
)
|
commits = fut_commits.result()
|
||||||
|
total_commits = fut_total.result()
|
||||||
|
recent_commits = fut_recent.result()
|
||||||
|
total_prs = fut_prs.result()
|
||||||
|
collaborators_data = fut_collab.result()
|
||||||
|
|
||||||
# Fetch avatar
|
# Stage 2: avatar needs user.avatar_url, languages need the repos list.
|
||||||
|
# Both run in parallel against each other.
|
||||||
avatar_b64 = ""
|
avatar_b64 = ""
|
||||||
if user.get("avatar_url"):
|
avatar_url = user.get("avatar_url") if isinstance(user, dict) else None
|
||||||
avatar_b64 = source.fetch_avatar(user["avatar_url"])
|
with ThreadPoolExecutor(max_workers=2, thread_name_prefix="fetch-stage2") as pool:
|
||||||
|
fut_lang = pool.submit(_enrich_repo_languages, repos, source, username)
|
||||||
|
fut_avatar = pool.submit(source.fetch_avatar, avatar_url) if avatar_url else None
|
||||||
|
fut_lang.result()
|
||||||
|
if fut_avatar is not None:
|
||||||
|
avatar_b64 = fut_avatar.result()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"user": user,
|
"user": user,
|
||||||
@@ -591,6 +740,32 @@ def fetch_github_data(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _enrich_repo_languages(repos: list, source: GitHubDataSource, username: str = "") -> None:
|
||||||
|
"""Mutates `repos` in-place, attaching `language_bytes: {lang: bytes}` to
|
||||||
|
each repo. Uses a small thread pool — one REST call per repo is cheap
|
||||||
|
individually, but sequentially N repos would block the fetch noticeably."""
|
||||||
|
if not repos:
|
||||||
|
return
|
||||||
|
names = [(i, r["full_name"]) for i, r in enumerate(repos) if r.get("full_name")]
|
||||||
|
if username:
|
||||||
|
owner = username.lower()
|
||||||
|
names = [(i, fn) for i, fn in names
|
||||||
|
if not repos[i].get("fork") and fn.split("/")[0].lower() == owner]
|
||||||
|
names.sort(key=lambda p: repos[p[0]].get("pushed_at") or "", reverse=True)
|
||||||
|
names = names[:config.LANGUAGE_MAX_REPOS]
|
||||||
|
print(f" Fetching language byte breakdown for {len(names)} repos...")
|
||||||
|
with ThreadPoolExecutor(max_workers=10) as pool:
|
||||||
|
futures = {pool.submit(source.fetch_repo_languages, fn): i for i, fn in names}
|
||||||
|
for fut in as_completed(futures):
|
||||||
|
i = futures[fut]
|
||||||
|
try:
|
||||||
|
repos[i]["language_bytes"] = fut.result() or {}
|
||||||
|
except GitHubTransientError:
|
||||||
|
raise
|
||||||
|
except Exception:
|
||||||
|
repos[i]["language_bytes"] = {}
|
||||||
|
|
||||||
|
|
||||||
def _fetch_collaborators_data(
|
def _fetch_collaborators_data(
|
||||||
username: str,
|
username: str,
|
||||||
repos: list,
|
repos: list,
|
||||||
@@ -627,7 +802,7 @@ def _fetch_collaborators_data(
|
|||||||
low = login.lower()
|
low = login.lower()
|
||||||
return low in BOT_LOGINS or low.endswith("[bot]") or low.endswith("-bot")
|
return low in BOT_LOGINS or low.endswith("[bot]") or low.endswith("-bot")
|
||||||
|
|
||||||
since = (datetime.now() - timedelta(days=COLLABORATOR_LOOKBACK_DAYS)).strftime("%Y-%m-%d")
|
since = (datetime.now() - timedelta(days=config.COLLABORATOR_LOOKBACK_DAYS)).strftime("%Y-%m-%d")
|
||||||
commit_repos = source.fetch_user_commit_repos(username, since)
|
commit_repos = source.fetch_user_commit_repos(username, since)
|
||||||
if not commit_repos:
|
if not commit_repos:
|
||||||
return []
|
return []
|
||||||
@@ -636,33 +811,54 @@ def _fetch_collaborators_data(
|
|||||||
qualifying = []
|
qualifying = []
|
||||||
for r in commit_repos:
|
for r in commit_repos:
|
||||||
user_commits = r.get("user_commits", 0)
|
user_commits = r.get("user_commits", 0)
|
||||||
if user_commits < MEANINGFUL_MIN_COMMITS:
|
if user_commits < config.MEANINGFUL_MIN_COMMITS:
|
||||||
continue
|
continue
|
||||||
if r.get("is_fork") and user_commits < FORK_MIN_COMMITS:
|
if r.get("is_fork") and user_commits < config.FORK_MIN_COMMITS:
|
||||||
continue
|
continue
|
||||||
qualifying.append(r)
|
qualifying.append(r)
|
||||||
|
|
||||||
# Rank user's repos by their own commit count, scan top N
|
# Rank user's repos by their own commit count, scan top N
|
||||||
qualifying.sort(key=lambda r: -r.get("user_commits", 0))
|
qualifying.sort(key=lambda r: -r.get("user_commits", 0))
|
||||||
qualifying = qualifying[:COLLABORATOR_TOP_REPOS]
|
qualifying = qualifying[:config.COLLABORATOR_TOP_REPOS]
|
||||||
print(f" Scoring collaborators across {len(qualifying)} qualifying repos")
|
print(f" Scoring collaborators across {len(qualifying)} qualifying repos")
|
||||||
|
|
||||||
# Step 3+4: fetch contributors and score
|
# Step 3: fetch contributors for all qualifying repos in parallel.
|
||||||
|
# The per-repo REST call is ~300-500ms; sequentially this dominated the
|
||||||
|
# whole fetch (30 repos × ~0.5s ≈ 15s). Fan out with the same pool size
|
||||||
|
# used for languages — GitHub's secondary rate limit tolerates this fine.
|
||||||
|
contributors_by_repo: dict[str, list] = {}
|
||||||
|
with ThreadPoolExecutor(max_workers=10) as pool:
|
||||||
|
futures = {
|
||||||
|
pool.submit(source.fetch_repo_contributors, r["full_name"], 1): r["full_name"]
|
||||||
|
for r in qualifying
|
||||||
|
}
|
||||||
|
for fut in as_completed(futures):
|
||||||
|
full_name = futures[fut]
|
||||||
|
try:
|
||||||
|
contributors_by_repo[full_name] = fut.result() or []
|
||||||
|
except GitHubTransientError:
|
||||||
|
raise
|
||||||
|
except Exception as e:
|
||||||
|
print(f" failed to fetch contributors for {full_name}: {e}")
|
||||||
|
contributors_by_repo[full_name] = []
|
||||||
|
|
||||||
|
# Step 4: score sequentially (cheap, in-memory) preserving the original
|
||||||
|
# `qualifying` order so deterministic-output tests still pass.
|
||||||
collab_stats: dict = {}
|
collab_stats: dict = {}
|
||||||
for r in qualifying:
|
for r in qualifying:
|
||||||
full_name = r["full_name"]
|
full_name = r["full_name"]
|
||||||
user_commits = r["user_commits"]
|
user_commits = r["user_commits"]
|
||||||
boost = OWNER_BOOST if r["is_owner"] else 1.0
|
boost = config.OWNER_BOOST if r["is_owner"] else 1.0
|
||||||
|
|
||||||
contributors = source.fetch_repo_contributors(full_name, min_commits=1)
|
contributors = contributors_by_repo.get(full_name, [])
|
||||||
# Drop huge OSS projects
|
# Drop huge OSS projects
|
||||||
if len(contributors) >= COLLABORATOR_MAX_REPO_SIZE:
|
if len(contributors) >= config.COLLABORATOR_MAX_REPO_SIZE:
|
||||||
print(f" skipping {full_name}: too many contributors ({len(contributors)})")
|
print(f" skipping {full_name}: too many contributors ({len(contributors)})")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# A "tight" repo: one the user owns with few contributors — hackathon
|
# A "tight" repo: one the user owns with few contributors — hackathon
|
||||||
# and side-project partners qualify from a single such repo.
|
# and side-project partners qualify from a single such repo.
|
||||||
is_tight_owned = r["is_owner"] and len(contributors) <= SMALL_OWNED_REPO_SIZE
|
is_tight_owned = r["is_owner"] and len(contributors) <= config.SMALL_OWNED_REPO_SIZE
|
||||||
|
|
||||||
for c in contributors:
|
for c in contributors:
|
||||||
login = c.get("login", "")
|
login = c.get("login", "")
|
||||||
@@ -705,8 +901,8 @@ def _fetch_collaborators_data(
|
|||||||
# or a partner in a tight user-owned project (hackathon/side-project).
|
# or a partner in a tight user-owned project (hackathon/side-project).
|
||||||
filtered = [
|
filtered = [
|
||||||
s for s in scored
|
s for s in scored
|
||||||
if s["shared_repos"] >= MIN_SHARED_REPOS
|
if s["shared_repos"] >= config.MIN_SHARED_REPOS
|
||||||
or s["raw_score"] >= DEEP_COLLAB_THRESHOLD
|
or s["raw_score"] >= config.DEEP_COLLAB_THRESHOLD
|
||||||
or s["tight_owned_partner"]
|
or s["tight_owned_partner"]
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
import pytest
|
||||||
|
import responses
|
||||||
|
from src import analytics as a
|
||||||
|
from src import config as cfg
|
||||||
|
from src import db as dbmod
|
||||||
|
from src import api as apimod
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def client(monkeypatch):
|
||||||
|
with tempfile.TemporaryDirectory() as d:
|
||||||
|
monkeypatch.setattr(dbmod, "DB_PATH", os.path.join(d, "t.db"))
|
||||||
|
monkeypatch.setattr(apimod.config, "INTERNAL_TOKEN", "secret")
|
||||||
|
monkeypatch.setattr(apimod.config, "GITHUB_PAT", "ghp_test")
|
||||||
|
dbmod.init_db()
|
||||||
|
app = apimod.app
|
||||||
|
app.config["TESTING"] = True
|
||||||
|
with app.test_client() as c:
|
||||||
|
yield c
|
||||||
|
|
||||||
|
|
||||||
|
def test_record_fetch():
|
||||||
|
a._reset_for_tests()
|
||||||
|
a.record_fetch("alice", 200, 312)
|
||||||
|
assert len(a._QUEUE) == 1
|
||||||
|
e = a._QUEUE[0]
|
||||||
|
assert e["service"] == "fetcher"
|
||||||
|
assert e["kind"] == "fetch"
|
||||||
|
assert e["status"] == 200
|
||||||
|
assert e["latency_ms"] == 312
|
||||||
|
assert e["endpoint"] == "github/users/<u>"
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_flush_posts(monkeypatch):
|
||||||
|
monkeypatch.setattr(cfg, "GENERATOR_URL", "http://gen:5002")
|
||||||
|
monkeypatch.setattr(cfg, "INTERNAL_TOKEN", "secret")
|
||||||
|
a._reset_for_tests()
|
||||||
|
responses.add(responses.POST, "http://gen:5002/internal/analytics/events",
|
||||||
|
json={"ingested": 1}, status=200)
|
||||||
|
a.record_fetch("alice", 200, 100)
|
||||||
|
a.flush_now()
|
||||||
|
assert len(responses.calls) == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_force_fetch_records_event(monkeypatch, client):
|
||||||
|
a._reset_for_tests()
|
||||||
|
monkeypatch.setattr("src.api.github.fetch_github_data",
|
||||||
|
lambda u, token: {"user": {"login": u}})
|
||||||
|
r = client.post("/fetch",
|
||||||
|
headers={"X-Internal-Token": "secret"},
|
||||||
|
json={"username": "alice"})
|
||||||
|
assert r.status_code == 200
|
||||||
|
assert any(e["kind"] == "fetch" and e["username"] == "alice"
|
||||||
|
for e in a._QUEUE)
|
||||||
@@ -0,0 +1,244 @@
|
|||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
import pytest
|
||||||
|
import responses as resp_lib
|
||||||
|
from src import db as dbmod
|
||||||
|
from src import api as apimod
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def client(monkeypatch):
|
||||||
|
with tempfile.TemporaryDirectory() as d:
|
||||||
|
monkeypatch.setattr(dbmod, "DB_PATH", os.path.join(d, "t.db"))
|
||||||
|
monkeypatch.setattr(apimod.config, "INTERNAL_TOKEN", "secret")
|
||||||
|
monkeypatch.setattr(apimod.config, "GITHUB_PAT", "ghp_test")
|
||||||
|
dbmod.init_db()
|
||||||
|
app = apimod.app
|
||||||
|
app.config["TESTING"] = True
|
||||||
|
with app.test_client() as c:
|
||||||
|
yield c
|
||||||
|
|
||||||
|
|
||||||
|
def test_health_no_auth_required(client):
|
||||||
|
r = client.get("/health")
|
||||||
|
assert r.status_code == 200
|
||||||
|
assert r.get_json()["service"] == "fetcher"
|
||||||
|
|
||||||
|
|
||||||
|
def test_endpoints_require_internal_token(client):
|
||||||
|
r = client.get("/data/alice")
|
||||||
|
assert r.status_code == 401
|
||||||
|
|
||||||
|
|
||||||
|
def test_metrics_endpoint_no_auth_and_prometheus_format(client):
|
||||||
|
from src import db as dbmod
|
||||||
|
dbmod.bump_fetch_metric("ok")
|
||||||
|
dbmod.bump_fetch_metric("rate_limited")
|
||||||
|
r = client.get("/metrics")
|
||||||
|
assert r.status_code == 200
|
||||||
|
body = r.get_data(as_text=True)
|
||||||
|
assert "# TYPE ghstats_fetch_total counter" in body
|
||||||
|
assert 'ghstats_fetch_total{outcome="ok"} 1' in body
|
||||||
|
assert 'ghstats_fetch_total{outcome="rate_limited"} 1' in body
|
||||||
|
# Every outcome is emitted even at zero so rate() has a baseline sample.
|
||||||
|
assert 'ghstats_fetch_total{outcome="not_found"} 0' in body
|
||||||
|
|
||||||
|
|
||||||
|
@resp_lib.activate
|
||||||
|
def test_data_auto_fetches_on_miss(client, monkeypatch):
|
||||||
|
# The fetcher fires the independent GitHub calls in parallel, so we
|
||||||
|
# can't rely on a fixed FIFO order of `resp_lib.add` calls. Match each
|
||||||
|
# GraphQL call by inspecting the request body and returning the right
|
||||||
|
# response for that query — this mirrors how the real GitHub API
|
||||||
|
# routes by query content rather than insertion order.
|
||||||
|
import json as _json
|
||||||
|
|
||||||
|
def _graphql_callback(request):
|
||||||
|
body = _json.loads(request.body)
|
||||||
|
q = body.get("query", "")
|
||||||
|
variables = body.get("variables", {})
|
||||||
|
if "weeks" in q:
|
||||||
|
data = {"user": {"contributionsCollection": {"contributionCalendar": {"weeks": []}}}}
|
||||||
|
elif "createdAt" in q:
|
||||||
|
data = {"user": {"createdAt": "2020-01-01T00:00:00Z"}}
|
||||||
|
elif "commitContributionsByRepository" in q:
|
||||||
|
data = {"user": {"contributionsCollection": {"commitContributionsByRepository": []}}}
|
||||||
|
elif "contributionCalendar" in q and "totalContributions" in q:
|
||||||
|
# Both alltime per-year and 6-month range queries land here. Tests
|
||||||
|
# don't care about the exact totals — just that a number comes back.
|
||||||
|
data = {"user": {"contributionsCollection": {"contributionCalendar": {"totalContributions": 10}}}}
|
||||||
|
else:
|
||||||
|
data = {"user": None}
|
||||||
|
return (200, {}, _json.dumps({"data": data}))
|
||||||
|
|
||||||
|
resp_lib.add_callback(resp_lib.POST, "https://api.github.com/graphql",
|
||||||
|
callback=_graphql_callback)
|
||||||
|
|
||||||
|
resp_lib.add(resp_lib.GET, "https://api.github.com/search/issues",
|
||||||
|
json={"total_count": 0, "items": []}, status=200)
|
||||||
|
resp_lib.add(resp_lib.GET, "https://api.github.com/users/alice",
|
||||||
|
json={"login": "alice", "public_repos": 1, "followers": 0,
|
||||||
|
"avatar_url": "https://avatars.example/a"},
|
||||||
|
status=200)
|
||||||
|
# fetch_repos fires the owner+all calls in parallel; both hit the same URL.
|
||||||
|
resp_lib.add(resp_lib.GET, "https://api.github.com/users/alice/repos", json=[], status=200)
|
||||||
|
resp_lib.add(resp_lib.GET, "https://api.github.com/users/alice/repos", json=[], status=200)
|
||||||
|
resp_lib.add(resp_lib.GET, "https://api.github.com/users/alice/events", json=[], status=200)
|
||||||
|
|
||||||
|
r = client.get("/data/alice", headers={"X-Internal-Token": "secret"})
|
||||||
|
assert r.status_code == 200
|
||||||
|
body = r.get_json()
|
||||||
|
assert body["payload_hash"]
|
||||||
|
assert body["data"]["user"]["login"] == "alice"
|
||||||
|
|
||||||
|
|
||||||
|
def test_force_fetch_requires_auth(client):
|
||||||
|
r = client.post("/fetch", json={"username": "alice"})
|
||||||
|
assert r.status_code == 401
|
||||||
|
|
||||||
|
|
||||||
|
def test_fetch_async_requires_auth(client):
|
||||||
|
r = client.post("/fetch-async", json={"username": "alice"})
|
||||||
|
assert r.status_code == 401
|
||||||
|
|
||||||
|
|
||||||
|
def test_fetch_async_rejects_invalid_username(client):
|
||||||
|
r = client.post("/fetch-async", headers={"X-Internal-Token": "secret"},
|
||||||
|
json={"username": "../etc/passwd"})
|
||||||
|
assert r.status_code == 400
|
||||||
|
|
||||||
|
|
||||||
|
def test_fetch_async_runs_in_background_and_calls_back(client, monkeypatch):
|
||||||
|
"""The async path must (a) return 202 immediately without waiting for
|
||||||
|
GitHub, and (b) POST back to the generator's /internal/data-ready when
|
||||||
|
the background fetch completes. Without (a) we'd be back to the old
|
||||||
|
synchronous-blocking design that timed out the worker; without (b)
|
||||||
|
nothing would ever enqueue the build job."""
|
||||||
|
import threading
|
||||||
|
from src import api as apimod
|
||||||
|
|
||||||
|
fetch_done = threading.Event()
|
||||||
|
callback_calls: list = []
|
||||||
|
|
||||||
|
def fake_fetch(username, token=None):
|
||||||
|
# Block briefly so the test can prove /fetch-async returned before
|
||||||
|
# this finished.
|
||||||
|
fetch_done.wait(timeout=2)
|
||||||
|
return {"user": {"login": username, "avatar_url": "x"}, "repos": []}
|
||||||
|
|
||||||
|
def fake_post(url, headers=None, json=None, timeout=None):
|
||||||
|
callback_calls.append({"url": url, "json": json, "headers": headers})
|
||||||
|
class _R: status_code = 200
|
||||||
|
return _R()
|
||||||
|
|
||||||
|
monkeypatch.setattr(apimod.github, "fetch_github_data", fake_fetch)
|
||||||
|
monkeypatch.setattr(apimod.requests, "post", fake_post)
|
||||||
|
monkeypatch.setattr(apimod.config, "GENERATOR_URL", "http://gen:5002")
|
||||||
|
|
||||||
|
r = client.post("/fetch-async", headers={"X-Internal-Token": "secret"},
|
||||||
|
json={"username": "alice"})
|
||||||
|
assert r.status_code == 202
|
||||||
|
assert r.get_json()["queued"] is True
|
||||||
|
|
||||||
|
# Let the background fetch finish; wait for the callback.
|
||||||
|
fetch_done.set()
|
||||||
|
for _ in range(50):
|
||||||
|
if callback_calls:
|
||||||
|
break
|
||||||
|
threading.Event().wait(0.05)
|
||||||
|
|
||||||
|
assert len(callback_calls) == 1
|
||||||
|
cb = callback_calls[0]
|
||||||
|
assert cb["url"] == "http://gen:5002/internal/data-ready"
|
||||||
|
assert cb["json"]["username"] == "alice"
|
||||||
|
assert cb["json"]["ok"] is True
|
||||||
|
assert cb["json"]["payload_hash"]
|
||||||
|
|
||||||
|
|
||||||
|
def test_fetch_async_dedupes_inflight(client, monkeypatch):
|
||||||
|
"""A second /fetch-async call for the same user while the first is
|
||||||
|
still in flight must not start a second GitHub fetch."""
|
||||||
|
import threading
|
||||||
|
from src import api as apimod
|
||||||
|
|
||||||
|
started = threading.Event()
|
||||||
|
release = threading.Event()
|
||||||
|
fetch_calls = {"n": 0}
|
||||||
|
|
||||||
|
def fake_fetch(username, token=None):
|
||||||
|
fetch_calls["n"] += 1
|
||||||
|
started.set()
|
||||||
|
release.wait(timeout=2)
|
||||||
|
return {"user": {"login": username, "avatar_url": "x"}, "repos": []}
|
||||||
|
|
||||||
|
monkeypatch.setattr(apimod.github, "fetch_github_data", fake_fetch)
|
||||||
|
monkeypatch.setattr(apimod.requests, "post", lambda *a, **kw: type("R", (), {"status_code": 200})())
|
||||||
|
monkeypatch.setattr(apimod.config, "GENERATOR_URL", "")
|
||||||
|
|
||||||
|
r1 = client.post("/fetch-async", headers={"X-Internal-Token": "secret"},
|
||||||
|
json={"username": "alice"})
|
||||||
|
assert r1.status_code == 202
|
||||||
|
assert started.wait(timeout=2)
|
||||||
|
|
||||||
|
r2 = client.post("/fetch-async", headers={"X-Internal-Token": "secret"},
|
||||||
|
json={"username": "alice"})
|
||||||
|
assert r2.status_code == 202
|
||||||
|
assert r2.get_json().get("already_inflight") is True
|
||||||
|
|
||||||
|
release.set()
|
||||||
|
# Drain
|
||||||
|
for _ in range(50):
|
||||||
|
if fetch_calls["n"] >= 1 and "alice" not in apimod._INFLIGHT:
|
||||||
|
break
|
||||||
|
threading.Event().wait(0.05)
|
||||||
|
assert fetch_calls["n"] == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_rate_limit_body_is_not_classified_as_valid_user_data():
|
||||||
|
# A rate-limit body reaching the classifier must never take the success
|
||||||
|
# branch — that is what overwrote a good record with a blank card.
|
||||||
|
data = {"user": {"message": "API rate limit exceeded for user ID 123.",
|
||||||
|
"documentation_url": "https://docs.github.com/"}}
|
||||||
|
assert apimod._is_github_not_found(data) is True
|
||||||
|
assert apimod._is_github_not_found({"user": {"login": "alice"}}) is False
|
||||||
|
assert apimod._is_github_not_found({"user": {"message": "Not Found"}}) is True
|
||||||
|
assert apimod._is_github_not_found({"user": None}) is True
|
||||||
|
|
||||||
|
|
||||||
|
def test_data_miss_rate_limited_returns_503(client, monkeypatch):
|
||||||
|
# A spent GitHub quota is transient: the fetcher says so (503), so the
|
||||||
|
# generator can tell the user the card will build after the reset.
|
||||||
|
def fake_fetch(*_a, **_kw):
|
||||||
|
raise apimod.github.GitHubTransientError("REST rate limit exhausted")
|
||||||
|
monkeypatch.setattr(apimod.github, "fetch_github_data", fake_fetch)
|
||||||
|
r = client.get("/data/alice", headers={"X-Internal-Token": "secret"})
|
||||||
|
assert r.status_code == 503
|
||||||
|
assert r.get_json() == {"error": "github_rate_limited"}
|
||||||
|
assert dbmod.get_user("alice") is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_concurrent_data_misses_fetch_once(client, monkeypatch):
|
||||||
|
# Concurrent misses for one user used to each run a full GitHub fetch;
|
||||||
|
# the per-user lock makes later callers read what the first stored.
|
||||||
|
import threading, time as _time
|
||||||
|
calls = []
|
||||||
|
|
||||||
|
def fake_fetch(username, **_kw):
|
||||||
|
calls.append(username)
|
||||||
|
_time.sleep(0.3)
|
||||||
|
return {"user": {"login": username}, "repos": [], "events": []}
|
||||||
|
monkeypatch.setattr(apimod.github, "fetch_github_data", fake_fetch)
|
||||||
|
monkeypatch.setattr(apimod, "_is_github_not_found", lambda _d: False)
|
||||||
|
app = apimod.app
|
||||||
|
codes = []
|
||||||
|
|
||||||
|
def hit():
|
||||||
|
with app.test_client() as c:
|
||||||
|
codes.append(c.get("/data/alice", headers={"X-Internal-Token": "secret"}).status_code)
|
||||||
|
threads = [threading.Thread(target=hit) for _ in range(3)]
|
||||||
|
for t in threads:
|
||||||
|
t.start()
|
||||||
|
for t in threads:
|
||||||
|
t.join()
|
||||||
|
assert codes == [200, 200, 200]
|
||||||
|
assert calls == ["alice"]
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
import pytest
|
||||||
|
from unittest.mock import patch
|
||||||
|
from src import db as dbmod
|
||||||
|
from src import cron as cronmod
|
||||||
|
from src import github as ghmod
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def tmp_db(monkeypatch):
|
||||||
|
with tempfile.TemporaryDirectory() as d:
|
||||||
|
monkeypatch.setattr(dbmod, "DB_PATH", os.path.join(d, "t.db"))
|
||||||
|
dbmod.init_db()
|
||||||
|
yield
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def sleeps(monkeypatch):
|
||||||
|
# The tick pauses between users and before a retry; record, don't wait.
|
||||||
|
calls = []
|
||||||
|
monkeypatch.setattr(cronmod.time, "sleep", calls.append)
|
||||||
|
return calls
|
||||||
|
|
||||||
|
|
||||||
|
def test_refresh_tick_calls_github_for_due_users(tmp_db):
|
||||||
|
dbmod.upsert_user("alice", {"user": {"login": "alice"}})
|
||||||
|
# Backdate
|
||||||
|
with dbmod._connect() as c:
|
||||||
|
c.execute("UPDATE users SET fetched_at='2020-01-01T00:00:00Z', last_requested_at=? WHERE username='alice'",
|
||||||
|
(dbmod._now(),))
|
||||||
|
with patch("src.cron.github.fetch_github_data", return_value={"user": {"login": "alice", "updated": True}}) as gh:
|
||||||
|
stats = cronmod.tick(hours=24, active_within_days=7, gc_days=7)
|
||||||
|
assert gh.called
|
||||||
|
assert stats["refreshed"] == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_refresh_rate_limit_keeps_last_good_and_counts_metric(tmp_db):
|
||||||
|
# A rate-limited refresh must NOT overwrite the cached row, and must be
|
||||||
|
# counted as rate_limited so the monitoring stack can see it.
|
||||||
|
dbmod.upsert_user("alice", {"user": {"login": "alice"}, "total_commits": 1841})
|
||||||
|
with dbmod._connect() as c:
|
||||||
|
c.execute("UPDATE users SET fetched_at='2020-01-01T00:00:00Z', last_requested_at=? WHERE username='alice'",
|
||||||
|
(dbmod._now(),))
|
||||||
|
with patch("src.cron.github.fetch_github_data",
|
||||||
|
side_effect=ghmod.GitHubTransientError("rate limited")):
|
||||||
|
stats = cronmod.tick(hours=24, active_within_days=7, gc_days=7)
|
||||||
|
assert stats["failed"] == 1 and stats["refreshed"] == 0
|
||||||
|
# Last-good data retained.
|
||||||
|
assert dbmod.get_user("alice")["data"]["total_commits"] == 1841
|
||||||
|
assert dbmod.read_fetch_metrics()["rate_limited"] == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_tick_runs_gc_for_abandoned_trial_users(tmp_db):
|
||||||
|
dbmod.upsert_user("ghost", {"user": {"login": "ghost"}})
|
||||||
|
with dbmod._connect() as c:
|
||||||
|
c.execute("UPDATE users SET last_requested_at='2020-01-01T00:00:00Z' WHERE username='ghost'")
|
||||||
|
stats = cronmod.tick(hours=24, active_within_days=7, gc_days=7)
|
||||||
|
assert stats["gc_removed"] == 1
|
||||||
|
assert dbmod.get_user("ghost") is None
|
||||||
|
|
||||||
|
|
||||||
|
def _due(*names):
|
||||||
|
# Backdate each user so they're due; later names are fetched more recently.
|
||||||
|
for i, n in enumerate(names):
|
||||||
|
dbmod.upsert_user(n, {"user": {"login": n}})
|
||||||
|
with dbmod._connect() as c:
|
||||||
|
c.execute("UPDATE users SET fetched_at=?, last_requested_at=? WHERE username=?",
|
||||||
|
(f"2020-01-0{i + 1}T00:00:00Z", dbmod._now(), n))
|
||||||
|
|
||||||
|
|
||||||
|
def test_tick_caps_refreshes_oldest_first(tmp_db, monkeypatch):
|
||||||
|
_due("old", "mid", "new")
|
||||||
|
monkeypatch.setattr(cronmod.config, "REFRESH_MAX_PER_TICK", 2)
|
||||||
|
monkeypatch.setattr(cronmod, "_core_remaining", lambda: None)
|
||||||
|
with patch("src.cron.github.fetch_github_data", side_effect=lambda u, **_k: {"user": {"login": u}}) as gh:
|
||||||
|
stats = cronmod.tick(hours=24, active_within_days=7, gc_days=7)
|
||||||
|
assert [c.args[0] for c in gh.call_args_list] == ["old", "mid"]
|
||||||
|
assert stats["refreshed"] == 2 and stats["deferred"] == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_tick_stops_under_core_reserve(tmp_db, monkeypatch):
|
||||||
|
# New sign-ups need the quota more than a day-old card does: once the
|
||||||
|
# PAT's core budget drops under the reserve, the tick stops refreshing.
|
||||||
|
_due("a", "b", "c")
|
||||||
|
monkeypatch.setattr(cronmod.config, "REFRESH_CORE_RESERVE", 1500)
|
||||||
|
left = iter([4000, 1400, 1400])
|
||||||
|
monkeypatch.setattr(cronmod, "_core_remaining", lambda: next(left))
|
||||||
|
with patch("src.cron.github.fetch_github_data", side_effect=lambda u, **_k: {"user": {"login": u}}) as gh:
|
||||||
|
stats = cronmod.tick(hours=24, active_within_days=7, gc_days=7)
|
||||||
|
assert [c.args[0] for c in gh.call_args_list] == ["a"]
|
||||||
|
assert stats["refreshed"] == 1 and stats["deferred"] == 2
|
||||||
|
|
||||||
|
|
||||||
|
def test_tick_retries_once_after_capped_retry_after(tmp_db, monkeypatch, sleeps):
|
||||||
|
# A secondary rate limit clears after a wait: honour Retry-After (capped)
|
||||||
|
# and retry the same user once; pause between users.
|
||||||
|
_due("a", "b")
|
||||||
|
monkeypatch.setattr(cronmod, "_core_remaining", lambda: None)
|
||||||
|
results = iter([ghmod.GitHubTransientError("rate limited", retry_after=500),
|
||||||
|
{"user": {"login": "a"}}, {"user": {"login": "b"}}])
|
||||||
|
|
||||||
|
def fake(u, **_k):
|
||||||
|
r = next(results)
|
||||||
|
if isinstance(r, Exception):
|
||||||
|
raise r
|
||||||
|
return r
|
||||||
|
with patch("src.cron.github.fetch_github_data", side_effect=fake) as gh:
|
||||||
|
stats = cronmod.tick(hours=24, active_within_days=7, gc_days=7)
|
||||||
|
assert [c.args[0] for c in gh.call_args_list] == ["a", "a", "b"]
|
||||||
|
assert sleeps == [120, 1.5]
|
||||||
|
assert stats["refreshed"] == 2 and stats["failed"] == 0
|
||||||
|
|
||||||
|
|
||||||
|
def test_tick_stops_and_defers_after_second_rate_limit(tmp_db, monkeypatch, sleeps):
|
||||||
|
# Hammering on after a repeat rate limit only fails every remaining user;
|
||||||
|
# stop the tick and leave them due for the next one.
|
||||||
|
_due("a", "b", "c")
|
||||||
|
monkeypatch.setattr(cronmod, "_core_remaining", lambda: None)
|
||||||
|
with patch("src.cron.github.fetch_github_data",
|
||||||
|
side_effect=ghmod.GitHubTransientError("rate limited")) as gh:
|
||||||
|
stats = cronmod.tick(hours=24, active_within_days=7, gc_days=7)
|
||||||
|
assert [c.args[0] for c in gh.call_args_list] == ["a", "a"]
|
||||||
|
assert sleeps == [60]
|
||||||
|
assert stats["failed"] == 1 and stats["refreshed"] == 0 and stats["deferred"] == 2
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
import pytest
|
||||||
|
from src import db as dbmod
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def tmp_db(monkeypatch):
|
||||||
|
with tempfile.TemporaryDirectory() as d:
|
||||||
|
path = os.path.join(d, "t.db")
|
||||||
|
monkeypatch.setattr(dbmod, "DB_PATH", path)
|
||||||
|
dbmod.init_db()
|
||||||
|
yield path
|
||||||
|
|
||||||
|
|
||||||
|
def test_init_creates_schema_with_wal(tmp_db):
|
||||||
|
with dbmod._connect() as c:
|
||||||
|
mode = c.execute("PRAGMA journal_mode").fetchone()[0]
|
||||||
|
assert mode.lower() == "wal"
|
||||||
|
cols = [r[1] for r in c.execute("PRAGMA table_info(users)").fetchall()]
|
||||||
|
assert set(cols) == {"username", "data_json", "payload_hash",
|
||||||
|
"fetched_at", "last_requested_at"}
|
||||||
|
|
||||||
|
|
||||||
|
def test_upsert_and_get_round_trip(tmp_db):
|
||||||
|
dbmod.upsert_user("alice", {"user": {"login": "alice"}, "repos": []})
|
||||||
|
row = dbmod.get_user("alice")
|
||||||
|
assert row["data"]["user"]["login"] == "alice"
|
||||||
|
assert row["payload_hash"]
|
||||||
|
assert row["fetched_at"]
|
||||||
|
|
||||||
|
|
||||||
|
def test_fetch_metrics_round_trip(tmp_db):
|
||||||
|
# Zero-filled for every known outcome before anything is recorded.
|
||||||
|
assert dbmod.read_fetch_metrics() == {o: 0 for o in dbmod.FETCH_OUTCOMES}
|
||||||
|
dbmod.bump_fetch_metric("ok")
|
||||||
|
dbmod.bump_fetch_metric("ok")
|
||||||
|
dbmod.bump_fetch_metric("rate_limited")
|
||||||
|
counts = dbmod.read_fetch_metrics()
|
||||||
|
assert counts["ok"] == 2
|
||||||
|
assert counts["rate_limited"] == 1
|
||||||
|
assert counts["not_found"] == 0
|
||||||
|
|
||||||
|
|
||||||
|
def test_fetch_metric_unknown_outcome_buckets_to_error(tmp_db):
|
||||||
|
dbmod.bump_fetch_metric("bogus")
|
||||||
|
assert dbmod.read_fetch_metrics()["error"] == 1
|
||||||
|
|
||||||
|
|
||||||
|
def test_payload_hash_is_deterministic_and_changes_on_diff():
|
||||||
|
h1 = dbmod.payload_hash({"a": 1, "b": 2})
|
||||||
|
h2 = dbmod.payload_hash({"b": 2, "a": 1})
|
||||||
|
h3 = dbmod.payload_hash({"a": 1, "b": 3})
|
||||||
|
assert h1 == h2
|
||||||
|
assert h1 != h3
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_updates_last_requested_at(tmp_db):
|
||||||
|
dbmod.upsert_user("alice", {"user": {"login": "alice"}})
|
||||||
|
first = dbmod.get_user("alice")["last_requested_at"]
|
||||||
|
import time; time.sleep(1.1)
|
||||||
|
second = dbmod.get_user("alice")["last_requested_at"]
|
||||||
|
assert second > first
|
||||||
|
|
||||||
|
|
||||||
|
def test_delete_stale_removes_old_rows(tmp_db):
|
||||||
|
dbmod.upsert_user("ghost", {"user": {"login": "ghost"}})
|
||||||
|
# Manually backdate last_requested_at
|
||||||
|
with dbmod._connect() as c:
|
||||||
|
c.execute("UPDATE users SET last_requested_at='2020-01-01T00:00:00Z' WHERE username='ghost'")
|
||||||
|
removed = dbmod.delete_stale(days=7)
|
||||||
|
assert removed == 1
|
||||||
|
assert dbmod.get_user("ghost") is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_users_due_for_refresh(tmp_db):
|
||||||
|
dbmod.upsert_user("alice", {"user": {"login": "alice"}})
|
||||||
|
# Backdate fetched_at so alice is due
|
||||||
|
with dbmod._connect() as c:
|
||||||
|
c.execute("UPDATE users SET fetched_at='2020-01-01T00:00:00Z' WHERE username='alice'")
|
||||||
|
due = dbmod.users_due_for_refresh(hours=24, active_within_days=7)
|
||||||
|
assert "alice" in due
|
||||||
@@ -0,0 +1,292 @@
|
|||||||
|
import responses
|
||||||
|
import pytest
|
||||||
|
from src import github
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_user_data_returns_user_payload():
|
||||||
|
# The fetcher fires the independent GitHub calls in parallel, so the
|
||||||
|
# mock registry can't depend on FIFO ordering. Route GraphQL requests
|
||||||
|
# by query content instead.
|
||||||
|
import json as _json
|
||||||
|
|
||||||
|
def _graphql_callback(request):
|
||||||
|
q = _json.loads(request.body).get("query", "")
|
||||||
|
if "weeks" in q:
|
||||||
|
data = {"user": {"contributionsCollection": {"contributionCalendar": {"weeks": []}}}}
|
||||||
|
elif "createdAt" in q:
|
||||||
|
data = {"user": {"createdAt": "2020-01-01T00:00:00Z"}}
|
||||||
|
elif "commitContributionsByRepository" in q:
|
||||||
|
data = {"user": {"contributionsCollection": {"commitContributionsByRepository": []}}}
|
||||||
|
elif "totalContributions" in q:
|
||||||
|
data = {"user": {"contributionsCollection": {"contributionCalendar": {"totalContributions": 10}}}}
|
||||||
|
else:
|
||||||
|
data = {"user": None}
|
||||||
|
return (200, {}, _json.dumps({"data": data}))
|
||||||
|
|
||||||
|
responses.add_callback(responses.POST, "https://api.github.com/graphql",
|
||||||
|
callback=_graphql_callback)
|
||||||
|
responses.add(responses.GET, "https://api.github.com/search/issues",
|
||||||
|
json={"total_count": 0, "items": []}, status=200)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice",
|
||||||
|
json={"login": "alice", "public_repos": 3, "followers": 5,
|
||||||
|
"avatar_url": "https://avatars.example/1"},
|
||||||
|
status=200,
|
||||||
|
)
|
||||||
|
responses.add(responses.GET, "https://api.github.com/users/alice/repos", json=[], status=200)
|
||||||
|
responses.add(responses.GET, "https://api.github.com/users/alice/repos", json=[], status=200)
|
||||||
|
responses.add(responses.GET, "https://api.github.com/users/alice/events", json=[], status=200)
|
||||||
|
data = github.fetch_github_data("alice", token="t")
|
||||||
|
assert data["user"]["login"] == "alice"
|
||||||
|
assert "repos" in data
|
||||||
|
assert "events" in data
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_handles_404():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/nope",
|
||||||
|
json={"message": "Not Found"}, status=404,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.POST, "https://api.github.com/graphql",
|
||||||
|
json={"data": {"user": None}}, status=200,
|
||||||
|
)
|
||||||
|
# Both fetch_repos calls (owner + all) hit the same URL — register
|
||||||
|
# twice so the parallel firing gets a response either way round.
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/nope/repos",
|
||||||
|
json={"message": "Not Found"}, status=404,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/nope/repos",
|
||||||
|
json={"message": "Not Found"}, status=404,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/nope/events",
|
||||||
|
json={"message": "Not Found"}, status=404,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/search/issues",
|
||||||
|
json={"total_count": 0, "items": []}, status=200,
|
||||||
|
)
|
||||||
|
data = github.fetch_github_data("nope", token="t")
|
||||||
|
assert data["user"].get("message") == "Not Found" or data["user"] is None
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_commit_count_raises_on_graphql_rate_limit():
|
||||||
|
# GraphQL reports a rate limit as HTTP 200 with an `errors` array — the
|
||||||
|
# exact shape a valid response uses. It must NOT be swallowed into a 0
|
||||||
|
# that would overwrite the last good count in fetcher.db.
|
||||||
|
responses.add(
|
||||||
|
responses.POST, "https://api.github.com/graphql",
|
||||||
|
json={"data": {"user": None},
|
||||||
|
"errors": [{"type": "RATE_LIMITED", "message": "API rate limit exceeded"}]},
|
||||||
|
status=200,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_commit_count("alice", [])
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_commit_count_raises_on_rest_rate_limit():
|
||||||
|
# A 403 with the remaining budget at 0 is a rate limit, not a real answer.
|
||||||
|
responses.add(
|
||||||
|
responses.POST, "https://api.github.com/graphql",
|
||||||
|
json={"message": "rate limited"}, status=403,
|
||||||
|
headers={"X-RateLimit-Remaining": "0"},
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_commit_count("alice", [])
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_commit_count_zero_on_not_found_is_not_transient():
|
||||||
|
# A genuinely unknown user (NOT_FOUND, no rate-limit error) is a real,
|
||||||
|
# persistable "no data" answer — return 0, don't raise.
|
||||||
|
responses.add(
|
||||||
|
responses.POST, "https://api.github.com/graphql",
|
||||||
|
json={"data": {"user": None}}, status=200,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
assert src.fetch_commit_count("ghost", []) == 0
|
||||||
|
|
||||||
|
|
||||||
|
# --- REST rate-limit guards -------------------------------------------------
|
||||||
|
# The REST calls used to hand `.json()` straight back, so a 403 rate-limit body
|
||||||
|
# ({"message": "API rate limit exceeded for user ID ..."}) was persisted as if
|
||||||
|
# it were real data, wiping the user's last-good record for up to 24h.
|
||||||
|
|
||||||
|
RATE_LIMIT_BODY = {
|
||||||
|
"message": "API rate limit exceeded for user ID 123.",
|
||||||
|
"documentation_url": "https://docs.github.com/rest/overview/rate-limits",
|
||||||
|
}
|
||||||
|
RATE_LIMIT_HEADERS = {"X-RateLimit-Remaining": "0"}
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_user_data_raises_on_rest_rate_limit():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice",
|
||||||
|
json=RATE_LIMIT_BODY, status=403, headers=RATE_LIMIT_HEADERS,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_user_data("alice")
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_user_data_raises_on_rate_limit_without_header():
|
||||||
|
# Secondary rate limits come back as 403 without the remaining-budget
|
||||||
|
# header — the message is the only signal.
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice",
|
||||||
|
json={"message": "You have exceeded a secondary rate limit."}, status=403,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_user_data("alice")
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_repos_raises_on_rest_rate_limit():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice/repos",
|
||||||
|
json=RATE_LIMIT_BODY, status=403, headers=RATE_LIMIT_HEADERS,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_repos("alice")
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_events_raises_on_rest_rate_limit():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice/events",
|
||||||
|
json=RATE_LIMIT_BODY, status=403, headers=RATE_LIMIT_HEADERS,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_events("alice")
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_repo_contributors_raises_on_rest_rate_limit():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/repos/alice/proj/contributors",
|
||||||
|
json=RATE_LIMIT_BODY, status=403, headers=RATE_LIMIT_HEADERS,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_repo_contributors("alice/proj")
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_fetch_repo_languages_raises_on_rest_rate_limit():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/repos/alice/proj/languages",
|
||||||
|
json=RATE_LIMIT_BODY, status=403, headers=RATE_LIMIT_HEADERS,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
src.fetch_repo_languages("alice/proj")
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_single_repo_404_stays_non_fatal():
|
||||||
|
# A deleted/renamed repo is a real per-repo answer, not a budget problem:
|
||||||
|
# it must keep degrading gracefully instead of aborting the whole fetch.
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/repos/alice/gone/languages",
|
||||||
|
json={"message": "Not Found"}, status=404,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/repos/alice/gone/contributors",
|
||||||
|
json={"message": "Not Found"}, status=404,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
assert src.fetch_repo_languages("alice/gone") == {}
|
||||||
|
assert src.fetch_repo_contributors("alice/gone") == []
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_rest_success_path_unchanged():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice",
|
||||||
|
json={"login": "alice", "followers": 5}, status=200,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice/events",
|
||||||
|
json=[{"type": "PushEvent"}], status=200,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/repos/alice/proj/languages",
|
||||||
|
json={"Python": 100}, status=200,
|
||||||
|
)
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/repos/alice/proj/contributors",
|
||||||
|
json=[{"login": "bob", "contributions": 4}], status=200,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
assert src.fetch_user_data("alice")["login"] == "alice"
|
||||||
|
assert src.fetch_events("alice") == [{"type": "PushEvent"}]
|
||||||
|
assert src.fetch_repo_languages("alice/proj") == {"Python": 100}
|
||||||
|
assert src.fetch_repo_contributors("alice/proj") == [{"login": "bob", "contributions": 4}]
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_rate_limited_repo_languages_aborts_whole_fetch():
|
||||||
|
# A rate limit inside the per-repo fan-out means the budget is gone, so it
|
||||||
|
# must propagate rather than being swallowed into an empty breakdown.
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/repos/alice/proj/languages",
|
||||||
|
json=RATE_LIMIT_BODY, status=403, headers=RATE_LIMIT_HEADERS,
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
repos = [{"full_name": "alice/proj"}]
|
||||||
|
with pytest.raises(github.GitHubTransientError):
|
||||||
|
github._enrich_repo_languages(repos, src)
|
||||||
|
|
||||||
|
|
||||||
|
def test_repo_languages_capped_to_recent_owned_repos(monkeypatch):
|
||||||
|
# One REST call per repo, so only the most recently pushed non-fork repos
|
||||||
|
# the user owns get a byte breakdown.
|
||||||
|
monkeypatch.setattr(github.config, "LANGUAGE_MAX_REPOS", 2)
|
||||||
|
|
||||||
|
class _Src:
|
||||||
|
def __init__(self):
|
||||||
|
self.calls = []
|
||||||
|
|
||||||
|
def fetch_repo_languages(self, full_name):
|
||||||
|
self.calls.append(full_name)
|
||||||
|
return {"Python": 1}
|
||||||
|
|
||||||
|
repos = [
|
||||||
|
{"full_name": "Alice/old", "pushed_at": "2024-01-01T00:00:00Z"},
|
||||||
|
{"full_name": "alice/new", "pushed_at": "2026-01-01T00:00:00Z"},
|
||||||
|
{"full_name": "alice/mid", "pushed_at": "2025-01-01T00:00:00Z"},
|
||||||
|
{"full_name": "alice/fork", "pushed_at": "2026-06-01T00:00:00Z", "fork": True},
|
||||||
|
{"full_name": "org/other", "pushed_at": "2026-06-01T00:00:00Z"},
|
||||||
|
]
|
||||||
|
src = _Src()
|
||||||
|
github._enrich_repo_languages(repos, src, "alice")
|
||||||
|
assert sorted(src.calls) == ["alice/mid", "alice/new"]
|
||||||
|
assert repos[1]["language_bytes"] == {"Python": 1}
|
||||||
|
assert "language_bytes" not in repos[0]
|
||||||
|
|
||||||
|
|
||||||
|
@responses.activate
|
||||||
|
def test_rate_limit_error_carries_retry_after():
|
||||||
|
responses.add(
|
||||||
|
responses.GET, "https://api.github.com/users/alice",
|
||||||
|
json={"message": "You have exceeded a secondary rate limit."}, status=403,
|
||||||
|
headers={"Retry-After": "42"},
|
||||||
|
)
|
||||||
|
src = github.DirectAPISource(token="t")
|
||||||
|
with pytest.raises(github.GitHubTransientError) as exc:
|
||||||
|
src.fetch_user_data("alice")
|
||||||
|
assert exc.value.retry_after == 42
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# --- stage 1: build the React SPA ---
|
||||||
|
FROM node:20-alpine AS frontend-build
|
||||||
|
WORKDIR /app/frontend
|
||||||
|
COPY frontend/package.json frontend/package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
COPY frontend/ ./
|
||||||
|
ARG VITE_GENERATOR_URL=""
|
||||||
|
ARG VITE_EDGE_URL=""
|
||||||
|
ENV VITE_GENERATOR_URL=$VITE_GENERATOR_URL
|
||||||
|
ENV VITE_EDGE_URL=$VITE_EDGE_URL
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# --- stage 2: python runtime ---
|
||||||
|
FROM python:3.11-slim AS runtime
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
COPY src ./src
|
||||||
|
COPY gunicorn.conf.py ./
|
||||||
|
RUN mkdir -p /app/src/static /app/data
|
||||||
|
COPY --from=frontend-build /app/frontend/dist/ /app/src/static/
|
||||||
|
|
||||||
|
EXPOSE 5002
|
||||||
|
ENV GENERATOR_SETTINGS_DB_PATH=/app/data/settings.db
|
||||||
|
ENV GENERATOR_WIDGETS_DB_PATH=/app/data/widgets.db
|
||||||
|
|
||||||
|
CMD ["gunicorn", "-b", "0.0.0.0:5002", "-w", "2", "src.api:app"]
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# Generator Service
|
||||||
|
|
||||||
|
Serves precomputed SVGs to the public internet. Holds user settings and
|
||||||
|
the widgets cache. Runs a build worker + cron in the background. Also
|
||||||
|
serves the React SPA (frontend sources live under `frontend/`).
|
||||||
|
|
||||||
|
## Run locally (3 processes)
|
||||||
|
|
||||||
|
cd generator
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# API
|
||||||
|
FETCHER_URL=http://localhost:5001 FETCHER_INTERNAL_TOKEN=dev python -m src.api
|
||||||
|
# Build worker
|
||||||
|
FETCHER_URL=http://localhost:5001 FETCHER_INTERNAL_TOKEN=dev python -m src.worker
|
||||||
|
# Poll cron
|
||||||
|
FETCHER_URL=http://localhost:5001 FETCHER_INTERNAL_TOKEN=dev python -m src.cron
|
||||||
|
|
||||||
|
## Frontend (dev)
|
||||||
|
|
||||||
|
cd generator/frontend && npm install && npm run dev
|
||||||
|
# Vite dev server proxies /api to the Flask app.
|
||||||
|
|
||||||
|
## Test
|
||||||
|
|
||||||
|
cd generator && pytest
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
Multi-stage (builds the frontend with node, serves everything from Python):
|
||||||
|
|
||||||
|
docker build -t ghstats-generator .
|
||||||
|
docker run --rm -e FETCHER_URL=http://fetcher:5001 -e FETCHER_INTERNAL_TOKEN=dev \
|
||||||
|
-p 5002:5002 -v $(pwd)/data:/app/data ghstats-generator
|
||||||
|
# Worker: override CMD to ["python","-m","src.worker"]
|
||||||
|
# Cron: override CMD to ["python","-m","src.cron"]
|
||||||
|
|
||||||
|
## Endpoints
|
||||||
|
|
||||||
|
All API endpoints are under `/api/`. The root and `/assets/*` serve the SPA.
|
||||||
|
|
||||||
|
| Method | Path | Auth | Description |
|
||||||
|
|---|---|---|---|
|
||||||
|
| GET | /api/health | none | health |
|
||||||
|
| GET | /api/<u> | none | composite SVG; auto-enrolls unknown users |
|
||||||
|
| GET | /api/<u>/<w>.svg | none | individual widget SVG |
|
||||||
|
| POST | /api/enroll | none | explicit enroll (body: {username}) |
|
||||||
|
| GET | /api/<u>/settings | stub | current settings |
|
||||||
|
| PATCH | /api/<u>/settings | stub | update settings (enqueues rebuild) |
|
||||||
|
| POST | /api/<u>/refresh | stub | one-shot re-fetch + rebuild |
|
||||||
|
|
||||||
|
Responses carry `X-Widget-Status: ready | building | rate_limited | not_found`.
|
||||||
|
|
||||||
|
## Env
|
||||||
|
|
||||||
|
See `src/config.py`.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VITE_GENERATOR_URL=http://localhost:5002
|
||||||
|
VITE_EDGE_URL=http://localhost:5003
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Frontend (Vite + React)
|
||||||
|
|
||||||
|
Part of the generator service. Sources live here; the production build
|
||||||
|
is served as static files by the generator's Flask app (at `/`) and
|
||||||
|
produced by the generator's Dockerfile.
|
||||||
|
|
||||||
|
## Dev
|
||||||
|
|
||||||
|
npm install
|
||||||
|
VITE_GENERATOR_URL=http://localhost:5002 VITE_EDGE_URL=http://localhost:5003 npm run dev
|
||||||
|
|
||||||
|
Vite proxies `/api/*` to the Flask app at :5002.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
npm run build
|
||||||
|
# produces dist/ which is copied into generator/src/static/ by the Docker build
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import js from '@eslint/js'
|
||||||
|
import globals from 'globals'
|
||||||
|
import reactHooks from 'eslint-plugin-react-hooks'
|
||||||
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||||
|
import tseslint from 'typescript-eslint'
|
||||||
|
import { defineConfig, globalIgnores } from 'eslint/config'
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
globalIgnores(['dist']),
|
||||||
|
{
|
||||||
|
files: ['**/*.{ts,tsx}'],
|
||||||
|
extends: [
|
||||||
|
js.configs.recommended,
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
reactHooks.configs.flat.recommended,
|
||||||
|
reactRefresh.configs.vite,
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 2020,
|
||||||
|
globals: globals.browser,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
])
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>gh-stats - one stats card for your GitHub profile README</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="Drop one line into your GitHub profile README and get a single SVG card: your score, contribution timeline, top collaborators, language breakdown, commit streaks and auto-awarded tags. Free, no signup needed."/>
|
||||||
|
<link rel="canonical" href="https://gh-stats.com/"/>
|
||||||
|
<meta property="og:type" content="website"/>
|
||||||
|
<meta property="og:site_name" content="gh-stats"/>
|
||||||
|
<meta property="og:url" content="https://gh-stats.com/"/>
|
||||||
|
<meta property="og:title" content="One stats card for your GitHub profile README"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="Score, contribution timeline, top collaborators, languages, streaks and tags. One line of markdown, five themes, no signup."/>
|
||||||
|
<meta property="og:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<meta property="og:image:width" content="1200"/>
|
||||||
|
<meta property="og:image:height" content="630"/>
|
||||||
|
<meta property="og:image:alt" content="A gh-stats card on a GitHub profile README."/>
|
||||||
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
<meta name="twitter:title" content="One stats card for your GitHub profile README"/>
|
||||||
|
<meta name="twitter:description"
|
||||||
|
content="Score, contribution timeline, top collaborators, languages, streaks and tags. One line of markdown, five themes, no signup."/>
|
||||||
|
<meta name="twitter:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<script type="module">
|
||||||
|
// Import the functions you need from the SDKs you need
|
||||||
|
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
|
||||||
|
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
|
||||||
|
// TODO: Add SDKs for Firebase products that you want to use
|
||||||
|
// https://firebase.google.com/docs/web/setup#available-libraries
|
||||||
|
|
||||||
|
// Your web app's Firebase configuration
|
||||||
|
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
|
||||||
|
const firebaseConfig = {
|
||||||
|
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
|
||||||
|
authDomain: "gh-stats-284de.firebaseapp.com",
|
||||||
|
projectId: "gh-stats-284de",
|
||||||
|
storageBucket: "gh-stats-284de.firebasestorage.app",
|
||||||
|
messagingSenderId: "723662839762",
|
||||||
|
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
|
||||||
|
measurementId: "G-228GR89RYX"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Initialize Firebase
|
||||||
|
const app = initializeApp(firebaseConfig);
|
||||||
|
const analytics = getAnalytics(app);
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root"></div>
|
||||||
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"name": "frontend",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "tsc -b && vite build",
|
||||||
|
"lint": "eslint .",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"dompurify": "^3.4.0",
|
||||||
|
"react": "^19.2.4",
|
||||||
|
"react-dom": "^19.2.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint/js": "^9.39.4",
|
||||||
|
"@tailwindcss/vite": "^4.2.2",
|
||||||
|
"@types/dompurify": "^3.0.5",
|
||||||
|
"@types/node": "^24.12.2",
|
||||||
|
"@types/react": "^19.2.14",
|
||||||
|
"@types/react-dom": "^19.2.3",
|
||||||
|
"@vitejs/plugin-react": "^6.0.1",
|
||||||
|
"eslint": "^9.39.4",
|
||||||
|
"eslint-plugin-react-hooks": "^7.0.1",
|
||||||
|
"eslint-plugin-react-refresh": "^0.5.2",
|
||||||
|
"globals": "^17.4.0",
|
||||||
|
"tailwindcss": "^4.2.2",
|
||||||
|
"typescript": "~6.0.2",
|
||||||
|
"typescript-eslint": "^8.58.0",
|
||||||
|
"vite": "^8.0.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
45e91fcd547e2331201dd125dd388d94
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
||||||
|
<rect width="64" height="64" rx="14" ry="14" fill="#121820"/>
|
||||||
|
<text x="32" y="47"
|
||||||
|
text-anchor="middle"
|
||||||
|
font-family="'Instrument Serif', Georgia, 'Times New Roman', serif"
|
||||||
|
font-size="46"
|
||||||
|
font-style="italic"
|
||||||
|
fill="#f5f1e8">G</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 365 B |
@@ -0,0 +1,197 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>How to create a GitHub profile README (and add a stats card)</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="Create the special repository that GitHub shows on your profile, then add a live stats card with one line of markdown. Five steps, about two minutes, no signup."/>
|
||||||
|
<link rel="canonical" href="https://gh-stats.com/github-profile-readme.html"/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
|
||||||
|
<meta property="og:type" content="article"/>
|
||||||
|
<meta property="og:site_name" content="gh-stats"/>
|
||||||
|
<meta property="og:url" content="https://gh-stats.com/github-profile-readme.html"/>
|
||||||
|
<meta property="og:title" content="How to create a GitHub profile README"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="The special repository, the one setting that trips people up, and a stats card in one line."/>
|
||||||
|
<meta property="og:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
|
||||||
|
<script type="module">
|
||||||
|
// Same GA4 stream as the SPA (index.html), so this page's traffic and its
|
||||||
|
// referrers land in the existing property instead of going unmeasured.
|
||||||
|
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
|
||||||
|
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
|
||||||
|
getAnalytics(initializeApp({
|
||||||
|
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
|
||||||
|
authDomain: "gh-stats-284de.firebaseapp.com",
|
||||||
|
projectId: "gh-stats-284de",
|
||||||
|
storageBucket: "gh-stats-284de.firebasestorage.app",
|
||||||
|
messagingSenderId: "723662839762",
|
||||||
|
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
|
||||||
|
measurementId: "G-228GR89RYX"
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
:root{
|
||||||
|
--bg:#f9fafb; --card:#ffffff; --line:#e5e7eb;
|
||||||
|
--ink:#1f2937; --muted:#6b7280; --faint:#9ca3af; --accent:#0969da;
|
||||||
|
}
|
||||||
|
*{box-sizing:border-box}
|
||||||
|
body{margin:0;background:var(--bg);color:var(--ink);
|
||||||
|
font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
|
||||||
|
line-height:1.65}
|
||||||
|
main{max-width:760px;margin:0 auto;padding:56px 24px 96px}
|
||||||
|
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin:0 0 16px}
|
||||||
|
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:1.65rem;margin:48px 0 12px;letter-spacing:-.01em}
|
||||||
|
p{margin:0 0 16px}
|
||||||
|
.lede{font-size:1.08rem;color:var(--muted);margin-bottom:32px}
|
||||||
|
a{color:var(--accent);text-decoration:none}
|
||||||
|
a:hover{text-decoration:underline}
|
||||||
|
code,pre{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.86rem}
|
||||||
|
pre{background:var(--card);border:1px solid var(--line);border-radius:10px;
|
||||||
|
padding:14px 16px;overflow-x:auto;margin:0 0 16px}
|
||||||
|
code:not(pre code){background:#f3f4f6;border-radius:5px;padding:.12em .38em;font-size:.85em}
|
||||||
|
.tablewrap{overflow-x:auto;margin:0 0 16px}
|
||||||
|
table{border-collapse:collapse;width:100%;font-size:.86rem;background:var(--card);
|
||||||
|
border:1px solid var(--line);border-radius:10px}
|
||||||
|
th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top}
|
||||||
|
th{font-weight:600;color:var(--muted);font-size:.78rem;text-transform:uppercase;
|
||||||
|
letter-spacing:.04em}
|
||||||
|
tr:last-child td{border-bottom:none}
|
||||||
|
td code{white-space:nowrap}
|
||||||
|
figure{margin:0 0 28px}
|
||||||
|
figure img{width:100%;max-width:400px;display:block;border-radius:12px}
|
||||||
|
figcaption{color:var(--faint);font-size:.8rem;margin-top:8px}
|
||||||
|
.clip{position:relative;max-width:340px;max-height:400px;overflow:hidden;
|
||||||
|
border-radius:12px}
|
||||||
|
.clip img{width:100%;display:block;border-radius:12px}
|
||||||
|
.clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;
|
||||||
|
background:linear-gradient(to top,var(--bg),transparent)}
|
||||||
|
.cta{display:inline-block;background:var(--ink);color:#fff;border-radius:9px;
|
||||||
|
padding:11px 20px;font-weight:600;font-size:.92rem;margin:8px 0 0}
|
||||||
|
.cta:hover{text-decoration:none;opacity:.9}
|
||||||
|
.note{border-left:3px solid var(--line);padding:2px 0 2px 16px;color:var(--muted);
|
||||||
|
font-size:.92rem;margin:0 0 16px}
|
||||||
|
footer{border-top:1px solid var(--line);margin-top:64px;padding-top:20px;
|
||||||
|
color:var(--faint);font-size:.82rem}
|
||||||
|
@media (max-width:640px){h1{font-size:2.05rem}main{padding:36px 20px 72px}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>How to create a GitHub profile README</h1>
|
||||||
|
|
||||||
|
<p class="lede">
|
||||||
|
A profile README is the block of text and images at the top of your GitHub profile
|
||||||
|
page. GitHub builds it from one specific repository, so setting it up is a matter of
|
||||||
|
creating that repository and writing a README in it.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>What GitHub needs</h2>
|
||||||
|
|
||||||
|
<p>GitHub shows a README on your profile when all four of these hold:</p>
|
||||||
|
|
||||||
|
<div class="tablewrap">
|
||||||
|
<table>
|
||||||
|
<tr><th>Requirement</th><th>Example for the username <code>octocat</code></th></tr>
|
||||||
|
<tr><td>A repository named exactly like your username</td><td><code>octocat/octocat</code></td></tr>
|
||||||
|
<tr><td>The repository is public</td><td>Visibility: Public</td></tr>
|
||||||
|
<tr><td>A file named <code>README.md</code> in its root</td><td><code>octocat/octocat/README.md</code></td></tr>
|
||||||
|
<tr><td>The file is not empty</td><td>Any text at all</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Create it in five steps</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
1. Open <a href="https://github.com/new">github.com/new</a>.<br/>
|
||||||
|
2. Under Repository name, type your username exactly. GitHub confirms with a
|
||||||
|
note that this is a special repository.<br/>
|
||||||
|
3. Select <strong>Public</strong>.<br/>
|
||||||
|
4. Turn on <strong>Add a README file</strong>.<br/>
|
||||||
|
5. Click <strong>Create repository</strong>, then <strong>Edit README</strong>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Save any text and your profile page shows it. The pre-filled template is fine to
|
||||||
|
keep, replace, or delete.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
To start from a finished layout instead, open the
|
||||||
|
<a href="https://github.com/ShayManor/profile-readme-template">profile README template</a>,
|
||||||
|
click <strong>Use this template</strong>, name the new repository after your username,
|
||||||
|
and replace <code>YOUR_USERNAME</code> in its README.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="note">
|
||||||
|
If you made a public repository with your username before July 2020, GitHub does
|
||||||
|
not show it automatically. Open the repository and click <strong>Share to
|
||||||
|
profile</strong>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Add a stats card</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Paste this line into the README, replace the username in both places, and commit:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre><code>[](https://gh-stats.com)</code></pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
It renders one card with a score out of 100, your contribution timeline, top
|
||||||
|
collaborators, language breakdown and commit streaks, and it updates on its own.
|
||||||
|
The first request for a new username queues a build, so give it a minute.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<div class="clip">
|
||||||
|
<img src="https://gh-stats.com/api/ShayManor" alt="A gh-stats card: profile score, impact timeline, collaborators, languages, streaks and achievements."/>
|
||||||
|
</div>
|
||||||
|
<figcaption>A stats card in a profile README, cropped.</figcaption>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<a class="cta" href="https://gh-stats.com/">Preview the card for your username</a>
|
||||||
|
|
||||||
|
<p style="margin-top:24px">
|
||||||
|
Want only one part? The
|
||||||
|
<a href="https://gh-stats.com/github-top-languages-card.html">top languages card</a>
|
||||||
|
works the same way, and there are <a href="https://gh-stats.com/github-readme-themes.html">five
|
||||||
|
themes</a> to pick from. Already using github-readme-stats? See the
|
||||||
|
<a href="https://gh-stats.com/github-readme-stats-alternative.html">migration guide</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Common questions</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>I created the repository but my profile shows nothing.</strong> Check the
|
||||||
|
four requirements above. The usual cause is a private repository or a name that does
|
||||||
|
not match the username exactly.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Can I edit it later?</strong> Yes. Every commit to that <code>README.md</code>
|
||||||
|
updates your profile page.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Does the card need a token or an account?</strong> No. It reads public
|
||||||
|
GitHub activity only, and there is nothing to sign up for.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<a href="https://gh-stats.com/">gh-stats.com</a> ·
|
||||||
|
<a href="https://github.com/ShayManor/github-readme-stats">source on GitHub</a> ·
|
||||||
|
MIT licensed
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>github-profile-trophy not loading (402)? Two fixes</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="github-profile-trophy.vercel.app returns HTTP 402, so trophy images in GitHub profile READMEs are broken. Self-host it, or swap in a rank card with one line."/>
|
||||||
|
<link rel="canonical" href="https://gh-stats.com/github-profile-trophy-alternative.html"/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
|
||||||
|
<meta property="og:type" content="article"/>
|
||||||
|
<meta property="og:site_name" content="gh-stats"/>
|
||||||
|
<meta property="og:url" content="https://gh-stats.com/github-profile-trophy-alternative.html"/>
|
||||||
|
<meta property="og:title" content="github-profile-trophy not loading? Two fixes"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="The public trophy instance returns 402. Self-host it, or use a rank card instead."/>
|
||||||
|
<meta property="og:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
|
||||||
|
<script type="module">
|
||||||
|
// Same GA4 stream as the SPA (index.html), so this page's traffic and its
|
||||||
|
// referrers land in the existing property instead of going unmeasured.
|
||||||
|
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
|
||||||
|
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
|
||||||
|
getAnalytics(initializeApp({
|
||||||
|
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
|
||||||
|
authDomain: "gh-stats-284de.firebaseapp.com",
|
||||||
|
projectId: "gh-stats-284de",
|
||||||
|
storageBucket: "gh-stats-284de.firebasestorage.app",
|
||||||
|
messagingSenderId: "723662839762",
|
||||||
|
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
|
||||||
|
measurementId: "G-228GR89RYX"
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
:root{
|
||||||
|
--bg:#f9fafb; --card:#ffffff; --line:#e5e7eb;
|
||||||
|
--ink:#1f2937; --muted:#6b7280; --faint:#9ca3af; --accent:#0969da;
|
||||||
|
}
|
||||||
|
*{box-sizing:border-box}
|
||||||
|
body{margin:0;background:var(--bg);color:var(--ink);
|
||||||
|
font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
|
||||||
|
line-height:1.65}
|
||||||
|
main{max-width:760px;margin:0 auto;padding:56px 24px 96px}
|
||||||
|
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin:0 0 16px}
|
||||||
|
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:1.65rem;margin:48px 0 12px;letter-spacing:-.01em}
|
||||||
|
p{margin:0 0 16px}
|
||||||
|
.lede{font-size:1.08rem;color:var(--muted);margin-bottom:32px}
|
||||||
|
a{color:var(--accent);text-decoration:none}
|
||||||
|
a:hover{text-decoration:underline}
|
||||||
|
code,pre{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.86rem}
|
||||||
|
pre{background:var(--card);border:1px solid var(--line);border-radius:10px;
|
||||||
|
padding:14px 16px;overflow-x:auto;margin:0 0 16px}
|
||||||
|
code:not(pre code){background:#f3f4f6;border-radius:5px;padding:.12em .38em;font-size:.85em}
|
||||||
|
.tablewrap{overflow-x:auto;margin:0 0 16px}
|
||||||
|
table{border-collapse:collapse;width:100%;font-size:.86rem;background:var(--card);
|
||||||
|
border:1px solid var(--line);border-radius:10px}
|
||||||
|
th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top}
|
||||||
|
th{font-weight:600;color:var(--muted);font-size:.78rem;text-transform:uppercase;
|
||||||
|
letter-spacing:.04em}
|
||||||
|
tr:last-child td{border-bottom:none}
|
||||||
|
td code{white-space:nowrap}
|
||||||
|
figure{margin:0 0 28px}
|
||||||
|
figure img{width:100%;max-width:400px;display:block;border-radius:12px}
|
||||||
|
figcaption{color:var(--faint);font-size:.8rem;margin-top:8px}
|
||||||
|
.clip{position:relative;max-width:340px;max-height:400px;overflow:hidden;
|
||||||
|
border-radius:12px}
|
||||||
|
.clip img{width:100%;display:block;border-radius:12px}
|
||||||
|
.clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;
|
||||||
|
background:linear-gradient(to top,var(--bg),transparent)}
|
||||||
|
.cta{display:inline-block;background:var(--ink);color:#fff;border-radius:9px;
|
||||||
|
padding:11px 20px;font-weight:600;font-size:.92rem;margin:8px 0 0}
|
||||||
|
.cta:hover{text-decoration:none;opacity:.9}
|
||||||
|
.note{border-left:3px solid var(--line);padding:2px 0 2px 16px;color:var(--muted);
|
||||||
|
font-size:.92rem;margin:0 0 16px}
|
||||||
|
footer{border-top:1px solid var(--line);margin-top:64px;padding-top:20px;
|
||||||
|
color:var(--faint);font-size:.82rem}
|
||||||
|
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin:0 0 16px}
|
||||||
|
.grid .clip{max-height:300px}
|
||||||
|
.grid h3{font-size:1rem;margin:0 0 8px}
|
||||||
|
.grid pre{font-size:.72rem;margin-top:10px}
|
||||||
|
@media (max-width:640px){h1{font-size:2.05rem}main{padding:36px 20px 72px}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>github-profile-trophy not loading?</h1>
|
||||||
|
|
||||||
|
<p class="lede">
|
||||||
|
The public instance at <code>github-profile-trophy.vercel.app</code> returns
|
||||||
|
<code>402 Payment required</code> (Vercel's <code>DEPLOYMENT_DISABLED</code>), so every
|
||||||
|
README that embeds it shows a broken image. There are two ways to fix it: run your own
|
||||||
|
copy, or switch to a different card.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Is yours broken?</h2>
|
||||||
|
|
||||||
|
<p>Open your profile. If the trophies are a broken-image icon or alt text, your README
|
||||||
|
points at the disabled instance. The line looks like this:</p>
|
||||||
|
|
||||||
|
<pre><code>[](https://github.com/ryo-ma/github-profile-trophy)</code></pre>
|
||||||
|
|
||||||
|
<h2>Fix 1: host your own copy</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The project is open source and its README asks users to fork it and deploy the fork to
|
||||||
|
Vercel, then point the image at the new address. Its README also lists volunteer
|
||||||
|
mirrors, but most of them returned errors when this page was written (November 2026),
|
||||||
|
so a mirror may break again.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Fix 2: a rank card, in one line</h2>
|
||||||
|
|
||||||
|
<p>To switch to gh-stats instead, replace the line with this one, change the username, and commit:</p>
|
||||||
|
|
||||||
|
<pre><code>[](https://gh-stats.com)</code></pre>
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<img src="https://gh-stats.com/api/torvalds/grade.svg" alt="gh-stats grade card: a letter rank, a score out of 100, and commit, PR, star, repo and follower counts." style="max-width:380px"/>
|
||||||
|
<figcaption>The grade card for torvalds, rendered live.</figcaption>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
There is no token to create, no signup and nothing to deploy. The first request for a
|
||||||
|
new username queues a build, so the image can take a minute to appear.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>How it differs</h2>
|
||||||
|
|
||||||
|
<div class="tablewrap">
|
||||||
|
<table>
|
||||||
|
<tr><th></th><th>github-profile-trophy</th><th>gh-stats grade card</th></tr>
|
||||||
|
<tr><td>Shows</td><td>A row of trophies, each with its own rank</td><td>One overall rank and score, plus commits, PRs, stars, repos and followers</td></tr>
|
||||||
|
<tr><td>Extras</td><td>Many themes, row and column layout</td><td>Role tags worked out from your repos; five themes</td></tr>
|
||||||
|
<tr><td>Hosting</td><td>Public instance returns 402; self-host on Vercel</td><td>gh-stats.com, or self-host (MIT)</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Want the whole profile?</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Drop the <code>/grade.svg</code> and the same URL renders one card with the rank, a
|
||||||
|
contribution timeline, top collaborators, languages and streaks:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre><code>[](https://gh-stats.com)</code></pre>
|
||||||
|
|
||||||
|
<a class="cta" href="https://gh-stats.com/">Preview it for your username</a>
|
||||||
|
|
||||||
|
<p style="margin-top:24px">
|
||||||
|
See the <a href="https://gh-stats.com/github-readme-themes.html">five themes</a>, or
|
||||||
|
<a href="https://gh-stats.com/github-profile-readme.html">how to create a profile README</a>
|
||||||
|
if you do not have one yet.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Common questions</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Does gh-stats need access to my account?</strong> No. It reads public GitHub
|
||||||
|
activity only.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<a href="https://gh-stats.com/">gh-stats.com</a> ·
|
||||||
|
<a href="https://github.com/ShayManor/github-readme-stats">source on GitHub</a> ·
|
||||||
|
MIT licensed
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>github-readme-activity-graph not loading (402)? Two fixes</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="The vercel.app address of github-readme-activity-graph returns HTTP 402. Point at the project's new address, or swap in a different contribution graph with one line."/>
|
||||||
|
<link rel="canonical" href="https://gh-stats.com/github-readme-activity-graph-alternative.html"/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
|
||||||
|
<meta property="og:type" content="article"/>
|
||||||
|
<meta property="og:site_name" content="gh-stats"/>
|
||||||
|
<meta property="og:url" content="https://gh-stats.com/github-readme-activity-graph-alternative.html"/>
|
||||||
|
<meta property="og:title" content="github-readme-activity-graph not loading? Two fixes"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="The old vercel.app address returns 402. Here is the new one, and an alternative."/>
|
||||||
|
<meta property="og:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
|
||||||
|
<script type="module">
|
||||||
|
// Same GA4 stream as the SPA (index.html), so this page's traffic and its
|
||||||
|
// referrers land in the existing property instead of going unmeasured.
|
||||||
|
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
|
||||||
|
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
|
||||||
|
getAnalytics(initializeApp({
|
||||||
|
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
|
||||||
|
authDomain: "gh-stats-284de.firebaseapp.com",
|
||||||
|
projectId: "gh-stats-284de",
|
||||||
|
storageBucket: "gh-stats-284de.firebasestorage.app",
|
||||||
|
messagingSenderId: "723662839762",
|
||||||
|
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
|
||||||
|
measurementId: "G-228GR89RYX"
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
:root{
|
||||||
|
--bg:#f9fafb; --card:#ffffff; --line:#e5e7eb;
|
||||||
|
--ink:#1f2937; --muted:#6b7280; --faint:#9ca3af; --accent:#0969da;
|
||||||
|
}
|
||||||
|
*{box-sizing:border-box}
|
||||||
|
body{margin:0;background:var(--bg);color:var(--ink);
|
||||||
|
font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
|
||||||
|
line-height:1.65}
|
||||||
|
main{max-width:760px;margin:0 auto;padding:56px 24px 96px}
|
||||||
|
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin:0 0 16px}
|
||||||
|
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:1.65rem;margin:48px 0 12px;letter-spacing:-.01em}
|
||||||
|
p{margin:0 0 16px}
|
||||||
|
.lede{font-size:1.08rem;color:var(--muted);margin-bottom:32px}
|
||||||
|
a{color:var(--accent);text-decoration:none}
|
||||||
|
a:hover{text-decoration:underline}
|
||||||
|
code,pre{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.86rem}
|
||||||
|
pre{background:var(--card);border:1px solid var(--line);border-radius:10px;
|
||||||
|
padding:14px 16px;overflow-x:auto;margin:0 0 16px}
|
||||||
|
code:not(pre code){background:#f3f4f6;border-radius:5px;padding:.12em .38em;font-size:.85em}
|
||||||
|
.tablewrap{overflow-x:auto;margin:0 0 16px}
|
||||||
|
table{border-collapse:collapse;width:100%;font-size:.86rem;background:var(--card);
|
||||||
|
border:1px solid var(--line);border-radius:10px}
|
||||||
|
th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top}
|
||||||
|
th{font-weight:600;color:var(--muted);font-size:.78rem;text-transform:uppercase;
|
||||||
|
letter-spacing:.04em}
|
||||||
|
tr:last-child td{border-bottom:none}
|
||||||
|
td code{white-space:nowrap}
|
||||||
|
figure{margin:0 0 28px}
|
||||||
|
figure img{width:100%;max-width:400px;display:block;border-radius:12px}
|
||||||
|
figcaption{color:var(--faint);font-size:.8rem;margin-top:8px}
|
||||||
|
.clip{position:relative;max-width:340px;max-height:400px;overflow:hidden;
|
||||||
|
border-radius:12px}
|
||||||
|
.clip img{width:100%;display:block;border-radius:12px}
|
||||||
|
.clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;
|
||||||
|
background:linear-gradient(to top,var(--bg),transparent)}
|
||||||
|
.cta{display:inline-block;background:var(--ink);color:#fff;border-radius:9px;
|
||||||
|
padding:11px 20px;font-weight:600;font-size:.92rem;margin:8px 0 0}
|
||||||
|
.cta:hover{text-decoration:none;opacity:.9}
|
||||||
|
.note{border-left:3px solid var(--line);padding:2px 0 2px 16px;color:var(--muted);
|
||||||
|
font-size:.92rem;margin:0 0 16px}
|
||||||
|
footer{border-top:1px solid var(--line);margin-top:64px;padding-top:20px;
|
||||||
|
color:var(--faint);font-size:.82rem}
|
||||||
|
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin:0 0 16px}
|
||||||
|
.grid .clip{max-height:300px}
|
||||||
|
.grid h3{font-size:1rem;margin:0 0 8px}
|
||||||
|
.grid pre{font-size:.72rem;margin-top:10px}
|
||||||
|
@media (max-width:640px){h1{font-size:2.05rem}main{padding:36px 20px 72px}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>github-readme-activity-graph not loading?</h1>
|
||||||
|
|
||||||
|
<p class="lede">
|
||||||
|
The old github-readme-activity-graph address on vercel.app has returned
|
||||||
|
<code>402 Payment required</code> (Vercel's <code>DEPLOYMENT_DISABLED</code>) since
|
||||||
|
September 2026, so READMEs that still use it show a broken image. There are two ways
|
||||||
|
to fix it: point at the project's new address, or switch to a different graph.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Is yours broken?</h2>
|
||||||
|
|
||||||
|
<p>Open your profile. If the graph is a broken-image icon or alt text, your README points at
|
||||||
|
the disabled instance. The line looks like this:</p>
|
||||||
|
|
||||||
|
<pre><code></code></pre>
|
||||||
|
|
||||||
|
<p>The older address <code>activity-graph.herokuapp.com</code> returns 404 too, and both fixes below work for it.</p>
|
||||||
|
|
||||||
|
<h2>Fix 1: the project's new address</h2>
|
||||||
|
|
||||||
|
<p>The project now runs on Cloudflare Workers. Change the domain and keep everything else:</p>
|
||||||
|
|
||||||
|
<pre><code>https://github-readme-activity-graph.ashutosh-dwivedi0710.workers.dev/graph?username=YOUR_USERNAME</code></pre>
|
||||||
|
|
||||||
|
<h2>Fix 2: a different graph, in one line</h2>
|
||||||
|
|
||||||
|
<p>To switch to gh-stats instead, replace the line with this one, change the username, and commit:</p>
|
||||||
|
|
||||||
|
<pre><code>[](https://gh-stats.com)</code></pre>
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<img src="https://gh-stats.com/api/torvalds/impact.svg" alt="gh-stats impact timeline: weekly contributions over the last six months." style="max-width:380px"/>
|
||||||
|
<figcaption>The impact timeline for torvalds, rendered live.</figcaption>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
There is no token to create and no signup. The first request for a new username queues
|
||||||
|
a build, so the image can take a minute to appear.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>How it differs</h2>
|
||||||
|
|
||||||
|
<div class="tablewrap">
|
||||||
|
<table>
|
||||||
|
<tr><th></th><th>github-readme-activity-graph</th><th>gh-stats impact timeline</th></tr>
|
||||||
|
<tr><td>Window</td><td>Last 31 days by default (up to 90), one point per day</td><td>Last six months, one point per week</td></tr>
|
||||||
|
<tr><td>Counts</td><td>Daily contributions</td><td>Weekly totals from your contribution calendar</td></tr>
|
||||||
|
<tr><td>Themes</td><td>Many, plus custom colours and title</td><td>Five: <code>?theme=midnight</code>, <code>onyx</code>, <code>nord</code>, <code>clean</code>, <code>paper</code></td></tr>
|
||||||
|
<tr><td>Address</td><td>Moved from vercel.app to workers.dev</td><td>gh-stats.com</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
A weekly line over six months is smoother than a daily one. It shows the shape of your
|
||||||
|
year, and a quiet weekend does not read as a gap.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Want the whole profile?</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Drop the <code>/impact.svg</code> and the same URL renders one card with a score out of
|
||||||
|
100, the timeline, top collaborators, languages and streaks:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre><code>[](https://gh-stats.com)</code></pre>
|
||||||
|
|
||||||
|
<a class="cta" href="https://gh-stats.com/">Preview it for your username</a>
|
||||||
|
|
||||||
|
<p style="margin-top:24px">
|
||||||
|
See the <a href="https://gh-stats.com/github-readme-themes.html">five themes</a>, or
|
||||||
|
<a href="https://gh-stats.com/github-profile-readme.html">how to create a profile README</a>
|
||||||
|
if you do not have one yet.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Common questions</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Can I keep using github-readme-activity-graph?</strong> Yes. Use Fix 1; the
|
||||||
|
project is maintained and only its old vercel.app address is disabled.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Does gh-stats need access to my account?</strong> No. It reads public GitHub
|
||||||
|
activity only.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<a href="https://gh-stats.com/">gh-stats.com</a> ·
|
||||||
|
<a href="https://github.com/ShayManor/github-readme-stats">source on GitHub</a> ·
|
||||||
|
MIT licensed
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,214 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>github-readme-stats alternative: a maintained stats card for your profile README</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="anuraghazra/github-readme-stats is marked no longer maintained. gh-stats is a maintained, MIT-licensed stats card you can drop into your GitHub profile README by changing the domain in your existing URL, or self-host on your own API quota."/>
|
||||||
|
<link rel="canonical" href="https://gh-stats.com/github-readme-stats-alternative.html"/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
|
||||||
|
<meta property="og:type" content="article"/>
|
||||||
|
<meta property="og:site_name" content="gh-stats"/>
|
||||||
|
<meta property="og:url" content="https://gh-stats.com/github-readme-stats-alternative.html"/>
|
||||||
|
<meta property="og:title" content="github-readme-stats alternative: a maintained stats card"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="The card most profile READMEs use is marked no longer maintained. Here is how to move, with the URL shapes you already have."/>
|
||||||
|
<meta property="og:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
|
||||||
|
<script type="module">
|
||||||
|
// Same GA4 stream as the SPA (index.html), so this page's traffic and its
|
||||||
|
// referrers land in the existing property instead of going unmeasured.
|
||||||
|
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
|
||||||
|
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
|
||||||
|
getAnalytics(initializeApp({
|
||||||
|
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
|
||||||
|
authDomain: "gh-stats-284de.firebaseapp.com",
|
||||||
|
projectId: "gh-stats-284de",
|
||||||
|
storageBucket: "gh-stats-284de.firebasestorage.app",
|
||||||
|
messagingSenderId: "723662839762",
|
||||||
|
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
|
||||||
|
measurementId: "G-228GR89RYX"
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
:root{
|
||||||
|
--bg:#f9fafb; --card:#ffffff; --line:#e5e7eb;
|
||||||
|
--ink:#1f2937; --muted:#6b7280; --faint:#9ca3af; --accent:#0969da;
|
||||||
|
}
|
||||||
|
*{box-sizing:border-box}
|
||||||
|
body{margin:0;background:var(--bg);color:var(--ink);
|
||||||
|
font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
|
||||||
|
line-height:1.65}
|
||||||
|
main{max-width:760px;margin:0 auto;padding:56px 24px 96px}
|
||||||
|
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin:0 0 16px}
|
||||||
|
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:1.65rem;margin:48px 0 12px;letter-spacing:-.01em}
|
||||||
|
p{margin:0 0 16px}
|
||||||
|
.lede{font-size:1.08rem;color:var(--muted);margin-bottom:32px}
|
||||||
|
a{color:var(--accent);text-decoration:none}
|
||||||
|
a:hover{text-decoration:underline}
|
||||||
|
code,pre{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.86rem}
|
||||||
|
pre{background:var(--card);border:1px solid var(--line);border-radius:10px;
|
||||||
|
padding:14px 16px;overflow-x:auto;margin:0 0 16px}
|
||||||
|
code:not(pre code){background:#f3f4f6;border-radius:5px;padding:.12em .38em;font-size:.85em}
|
||||||
|
.tablewrap{overflow-x:auto;margin:0 0 16px}
|
||||||
|
table{border-collapse:collapse;width:100%;font-size:.86rem;background:var(--card);
|
||||||
|
border:1px solid var(--line);border-radius:10px}
|
||||||
|
th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top}
|
||||||
|
th{font-weight:600;color:var(--muted);font-size:.78rem;text-transform:uppercase;
|
||||||
|
letter-spacing:.04em}
|
||||||
|
tr:last-child td{border-bottom:none}
|
||||||
|
td code{white-space:nowrap}
|
||||||
|
figure{margin:0 0 28px}
|
||||||
|
figure img{width:100%;max-width:400px;display:block;border-radius:12px}
|
||||||
|
figcaption{color:var(--faint);font-size:.8rem;margin-top:8px}
|
||||||
|
.clip{position:relative;max-width:340px;max-height:400px;overflow:hidden;
|
||||||
|
border-radius:12px}
|
||||||
|
.clip img{width:100%;display:block;border-radius:12px}
|
||||||
|
.clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;
|
||||||
|
background:linear-gradient(to top,var(--bg),transparent)}
|
||||||
|
.cta{display:inline-block;background:var(--ink);color:#fff;border-radius:9px;
|
||||||
|
padding:11px 20px;font-weight:600;font-size:.92rem;margin:8px 0 0}
|
||||||
|
.cta:hover{text-decoration:none;opacity:.9}
|
||||||
|
.note{border-left:3px solid var(--line);padding:2px 0 2px 16px;color:var(--muted);
|
||||||
|
font-size:.92rem;margin:0 0 16px}
|
||||||
|
footer{border-top:1px solid var(--line);margin-top:64px;padding-top:20px;
|
||||||
|
color:var(--faint);font-size:.82rem}
|
||||||
|
@media (max-width:640px){h1{font-size:2.05rem}main{padding:36px 20px 72px}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>A maintained alternative to github-readme-stats</h1>
|
||||||
|
|
||||||
|
<p class="lede">
|
||||||
|
<a href="https://github.com/anuraghazra/github-readme-stats">anuraghazra/github-readme-stats</a>
|
||||||
|
is the stats card most GitHub profile READMEs use, and it earned that place.
|
||||||
|
Its README now opens with a caution notice saying the repository is no longer
|
||||||
|
maintained. If you are looking for somewhere to move, this page shows the swap.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<img src="https://gh-stats.com/?username=ShayManor" alt="A gh-stats developer profile card showing score, commits, pull requests, stars and role tags."/>
|
||||||
|
<figcaption>The profile card: score out of 100, headline counts, and role tags earned from your repositories.</figcaption>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<h2>Change the domain, keep the URL</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The common URL shapes work here with only the domain changed, so migrating is
|
||||||
|
an edit to one line of markdown.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="tablewrap">
|
||||||
|
<table>
|
||||||
|
<tr><th>Your current URL</th><th>Change it to</th></tr>
|
||||||
|
<tr><td><code>github-readme-stats.vercel.app/api?username=U</code></td>
|
||||||
|
<td><code>gh-stats.com/api?username=U</code></td></tr>
|
||||||
|
<tr><td><code>github-readme-stats.vercel.app/api/top-langs?username=U</code></td>
|
||||||
|
<td><code>gh-stats.com/api/top-langs?username=U</code></td></tr>
|
||||||
|
<tr><td><code>github-readme-stats-sigma-five.vercel.app/api?username=U</code> (returns 402)</td>
|
||||||
|
<td><code>gh-stats.com/api?username=U</code></td></tr>
|
||||||
|
<tr><td><code>github-readme-stats-eight-theta.vercel.app/api?username=U</code> (returns 402)</td>
|
||||||
|
<td><code>gh-stats.com/api?username=U</code></td></tr>
|
||||||
|
<tr><td><code>github-readme-stats-eight-theta.vercel.app/api/top-langs?username=U</code> (returns 402)</td>
|
||||||
|
<td><code>gh-stats.com/api/top-langs?username=U</code></td></tr>
|
||||||
|
<tr><td><code>github-readme-streak-stats.herokuapp.com/?user=U</code></td>
|
||||||
|
<td><code>gh-stats.com/api/streak/U</code></td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>Nothing else in your README changes.</p>
|
||||||
|
|
||||||
|
<p class="note">
|
||||||
|
<code>theme=</code> is honoured on the composite card (<code>/api/<user></code>).
|
||||||
|
On the compatibility and single-widget URLs above it is currently ignored and the
|
||||||
|
default theme is served.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Or replace several badges with one card</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Most profile READMEs stack a stats badge, a streak badge, a languages badge and a
|
||||||
|
trophy row, each one a separate request. The composite card covers all of it in a
|
||||||
|
single image:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre><code></code></pre>
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<div class="clip">
|
||||||
|
<img src="https://gh-stats.com/api/ShayManor" alt="The full gh-stats composite card: profile score, impact timeline, collaborators, languages, streaks and achievements."/>
|
||||||
|
</div>
|
||||||
|
<figcaption>The composite card, cropped. It stacks profile, timeline, collaborators, languages, streaks and achievements.</figcaption>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
No signup is required to try it. Type a username on the
|
||||||
|
<a href="https://gh-stats.com/">home page</a> and the real card renders immediately.
|
||||||
|
Signing in with GitHub proves you own the username and unlocks the editor for
|
||||||
|
themes, widget order and custom tags.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a class="cta" href="https://gh-stats.com/">Try it on your username</a>
|
||||||
|
|
||||||
|
<h2>What you should know before switching</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The project's own successor is
|
||||||
|
<a href="https://github.com/stats-organization/github-stats-extended">GitHub Stats Extended</a>,
|
||||||
|
named in that caution notice. It is a fork that keeps the original's shape, so pick
|
||||||
|
it if what you want is the same card with the same options.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
gh-stats is a different design: one card that summarises the whole profile, rather
|
||||||
|
than a set of separate badges. It is MIT licensed, and you can
|
||||||
|
<a href="https://github.com/ShayManor/github-readme-stats">self-host it</a> with
|
||||||
|
<code>docker compose up</code> on your own GitHub API quota if you would rather not
|
||||||
|
depend on someone else's instance.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Only public GitHub activity is counted. Private repositories, private commit counts
|
||||||
|
and contributions to org-restricted repositories are never visible to the fetcher.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Common questions</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Is github-readme-stats actually dead?</strong> The repository is not archived
|
||||||
|
and the hosted instance still serves cards. The maintainer marked it no longer
|
||||||
|
maintained in the README, which is a statement about future work rather than an
|
||||||
|
outage.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Why do stats cards return an error or a blank image?</strong> A shared
|
||||||
|
instance runs on one GitHub API quota, so a popular deployment hits rate limits and
|
||||||
|
serves errors to everyone behind it. Self-hosting puts you on your own quota and
|
||||||
|
removes that failure mode.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Do I have to change my README again later?</strong> No. The image URL is
|
||||||
|
stable, so themes, tags and widget order can change in the editor without touching
|
||||||
|
the markdown.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<a href="https://gh-stats.com/">gh-stats.com</a> ·
|
||||||
|
<a href="https://github.com/ShayManor/github-readme-stats">source on GitHub</a> ·
|
||||||
|
MIT licensed
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>GitHub README stats card themes: dark, light and auto-switching</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="Five themes for a GitHub profile stats card, with a live preview and a copy-paste line for each, plus the snippet that switches between dark and light with the viewer's GitHub theme."/>
|
||||||
|
<link rel="canonical" href="https://gh-stats.com/github-readme-themes.html"/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
|
||||||
|
<meta property="og:type" content="article"/>
|
||||||
|
<meta property="og:site_name" content="gh-stats"/>
|
||||||
|
<meta property="og:url" content="https://gh-stats.com/github-readme-themes.html"/>
|
||||||
|
<meta property="og:title" content="GitHub README stats card themes"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="Five themes, a live preview of each, and dark/light auto-switching in one snippet."/>
|
||||||
|
<meta property="og:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
|
||||||
|
<script type="module">
|
||||||
|
// Same GA4 stream as the SPA (index.html), so this page's traffic and its
|
||||||
|
// referrers land in the existing property instead of going unmeasured.
|
||||||
|
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
|
||||||
|
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
|
||||||
|
getAnalytics(initializeApp({
|
||||||
|
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
|
||||||
|
authDomain: "gh-stats-284de.firebaseapp.com",
|
||||||
|
projectId: "gh-stats-284de",
|
||||||
|
storageBucket: "gh-stats-284de.firebasestorage.app",
|
||||||
|
messagingSenderId: "723662839762",
|
||||||
|
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
|
||||||
|
measurementId: "G-228GR89RYX"
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
:root{
|
||||||
|
--bg:#f9fafb; --card:#ffffff; --line:#e5e7eb;
|
||||||
|
--ink:#1f2937; --muted:#6b7280; --faint:#9ca3af; --accent:#0969da;
|
||||||
|
}
|
||||||
|
*{box-sizing:border-box}
|
||||||
|
body{margin:0;background:var(--bg);color:var(--ink);
|
||||||
|
font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
|
||||||
|
line-height:1.65}
|
||||||
|
main{max-width:760px;margin:0 auto;padding:56px 24px 96px}
|
||||||
|
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin:0 0 16px}
|
||||||
|
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:1.65rem;margin:48px 0 12px;letter-spacing:-.01em}
|
||||||
|
p{margin:0 0 16px}
|
||||||
|
.lede{font-size:1.08rem;color:var(--muted);margin-bottom:32px}
|
||||||
|
a{color:var(--accent);text-decoration:none}
|
||||||
|
a:hover{text-decoration:underline}
|
||||||
|
code,pre{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.86rem}
|
||||||
|
pre{background:var(--card);border:1px solid var(--line);border-radius:10px;
|
||||||
|
padding:14px 16px;overflow-x:auto;margin:0 0 16px}
|
||||||
|
code:not(pre code){background:#f3f4f6;border-radius:5px;padding:.12em .38em;font-size:.85em}
|
||||||
|
.tablewrap{overflow-x:auto;margin:0 0 16px}
|
||||||
|
table{border-collapse:collapse;width:100%;font-size:.86rem;background:var(--card);
|
||||||
|
border:1px solid var(--line);border-radius:10px}
|
||||||
|
th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top}
|
||||||
|
th{font-weight:600;color:var(--muted);font-size:.78rem;text-transform:uppercase;
|
||||||
|
letter-spacing:.04em}
|
||||||
|
tr:last-child td{border-bottom:none}
|
||||||
|
td code{white-space:nowrap}
|
||||||
|
figure{margin:0 0 28px}
|
||||||
|
figure img{width:100%;max-width:400px;display:block;border-radius:12px}
|
||||||
|
figcaption{color:var(--faint);font-size:.8rem;margin-top:8px}
|
||||||
|
.clip{position:relative;max-width:340px;max-height:400px;overflow:hidden;
|
||||||
|
border-radius:12px}
|
||||||
|
.clip img{width:100%;display:block;border-radius:12px}
|
||||||
|
.clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;
|
||||||
|
background:linear-gradient(to top,var(--bg),transparent)}
|
||||||
|
.cta{display:inline-block;background:var(--ink);color:#fff;border-radius:9px;
|
||||||
|
padding:11px 20px;font-weight:600;font-size:.92rem;margin:8px 0 0}
|
||||||
|
.cta:hover{text-decoration:none;opacity:.9}
|
||||||
|
.note{border-left:3px solid var(--line);padding:2px 0 2px 16px;color:var(--muted);
|
||||||
|
font-size:.92rem;margin:0 0 16px}
|
||||||
|
footer{border-top:1px solid var(--line);margin-top:64px;padding-top:20px;
|
||||||
|
color:var(--faint);font-size:.82rem}
|
||||||
|
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px;margin:0 0 16px}
|
||||||
|
.grid .clip{max-height:300px}
|
||||||
|
.grid h3{font-size:1rem;margin:0 0 8px}
|
||||||
|
.grid pre{font-size:.72rem;margin-top:10px}
|
||||||
|
@media (max-width:640px){h1{font-size:2.05rem}main{padding:36px 20px 72px}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>Stats card themes for your GitHub profile README</h1>
|
||||||
|
|
||||||
|
<p class="lede">
|
||||||
|
A gh-stats card takes one <code>theme</code> parameter. Pick one of five, or serve a dark
|
||||||
|
card to dark-mode visitors and a light one to everyone else.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>The five themes</h2>
|
||||||
|
|
||||||
|
<div class="grid">
|
||||||
|
<div>
|
||||||
|
<h3>midnight</h3>
|
||||||
|
<div class="clip"><img loading="lazy" src="https://gh-stats.com/api/ShayManor?theme=midnight" alt="gh-stats card in the midnight theme"/></div>
|
||||||
|
<p style="margin:8px 0 0;color:var(--muted);font-size:.86rem">Dark slate. The default look.</p>
|
||||||
|
<pre><code>?theme=midnight</code></pre>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3>onyx</h3>
|
||||||
|
<div class="clip"><img loading="lazy" src="https://gh-stats.com/api/ShayManor?theme=onyx" alt="gh-stats card in the onyx theme"/></div>
|
||||||
|
<p style="margin:8px 0 0;color:var(--muted);font-size:.86rem">High-contrast neon on pure black.</p>
|
||||||
|
<pre><code>?theme=onyx</code></pre>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3>nord</h3>
|
||||||
|
<div class="clip"><img loading="lazy" src="https://gh-stats.com/api/ShayManor?theme=nord" alt="gh-stats card in the nord theme"/></div>
|
||||||
|
<p style="margin:8px 0 0;color:var(--muted);font-size:.86rem">Muted pastels on slate blue.</p>
|
||||||
|
<pre><code>?theme=nord</code></pre>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3>clean</h3>
|
||||||
|
<div class="clip"><img loading="lazy" src="https://gh-stats.com/api/ShayManor?theme=clean" alt="gh-stats card in the clean theme"/></div>
|
||||||
|
<p style="margin:8px 0 0;color:var(--muted);font-size:.86rem">White, for light-mode profiles.</p>
|
||||||
|
<pre><code>?theme=clean</code></pre>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3>paper</h3>
|
||||||
|
<div class="clip"><img loading="lazy" src="https://gh-stats.com/api/ShayManor?theme=paper" alt="gh-stats card in the paper theme"/></div>
|
||||||
|
<p style="margin:8px 0 0;color:var(--muted);font-size:.86rem">Warm off-white.</p>
|
||||||
|
<pre><code>?theme=paper</code></pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Use a theme</h2>
|
||||||
|
|
||||||
|
<p>Add <code>?theme=</code> to the card URL in your README, replace the username, and commit:</p>
|
||||||
|
|
||||||
|
<pre><code>[](https://gh-stats.com)</code></pre>
|
||||||
|
|
||||||
|
<p>Leave the parameter out and the card uses midnight.</p>
|
||||||
|
|
||||||
|
<h2>Switch with the viewer's GitHub theme</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
GitHub renders <code><picture></code> in READMEs and honours
|
||||||
|
<code>prefers-color-scheme</code>, so each visitor sees the card that matches their
|
||||||
|
GitHub appearance setting:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre><code><a href="https://gh-stats.com">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)"
|
||||||
|
srcset="https://gh-stats.com/api/YOUR_USERNAME?theme=onyx"/>
|
||||||
|
<source media="(prefers-color-scheme: light)"
|
||||||
|
srcset="https://gh-stats.com/api/YOUR_USERNAME?theme=clean"/>
|
||||||
|
<img alt="GitHub stats" src="https://gh-stats.com/api/YOUR_USERNAME?theme=clean"/>
|
||||||
|
</picture>
|
||||||
|
</a></code></pre>
|
||||||
|
|
||||||
|
<p>Any dark theme works in the first line and any light one in the second.</p>
|
||||||
|
|
||||||
|
<a class="cta" href="https://gh-stats.com/">Preview every theme with your username</a>
|
||||||
|
|
||||||
|
<p style="margin-top:24px">
|
||||||
|
New to profile READMEs? Start with
|
||||||
|
<a href="https://gh-stats.com/github-profile-readme.html">how to create one</a>.
|
||||||
|
Coming from github-readme-stats? See the
|
||||||
|
<a href="https://gh-stats.com/github-readme-stats-alternative.html">migration guide</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Common questions</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Can I make a theme the default without the parameter?</strong> Yes. Sign in on
|
||||||
|
<a href="https://gh-stats.com/">gh-stats.com</a> with the GitHub account the card belongs
|
||||||
|
to, pick the theme, and save. <code>/api/YOUR_USERNAME</code> then uses it.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Does changing the theme reset my card?</strong> No. The theme changes colours
|
||||||
|
only; the data is the same.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<a href="https://gh-stats.com/">gh-stats.com</a> ·
|
||||||
|
<a href="https://github.com/ShayManor/github-readme-stats">source on GitHub</a> ·
|
||||||
|
MIT licensed
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<title>GitHub top languages card for your profile README</title>
|
||||||
|
<meta name="description"
|
||||||
|
content="Add a most-used-languages card to your GitHub profile README with one line of markdown. Hide languages you do not want counted, pick a theme, no signup. Drop-in for github-readme-stats top-langs URLs."/>
|
||||||
|
<link rel="canonical" href="https://gh-stats.com/github-top-languages-card.html"/>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
|
||||||
|
<meta property="og:type" content="article"/>
|
||||||
|
<meta property="og:site_name" content="gh-stats"/>
|
||||||
|
<meta property="og:url" content="https://gh-stats.com/github-top-languages-card.html"/>
|
||||||
|
<meta property="og:title" content="GitHub top languages card for your profile README"/>
|
||||||
|
<meta property="og:description"
|
||||||
|
content="One line of markdown, a theme, and a list of languages to hide."/>
|
||||||
|
<meta property="og:image" content="https://gh-stats.com/og.png"/>
|
||||||
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com"/>
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
|
||||||
|
<script type="module">
|
||||||
|
// Same GA4 stream as the SPA (index.html), so this page's traffic and its
|
||||||
|
// referrers land in the existing property instead of going unmeasured.
|
||||||
|
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
|
||||||
|
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
|
||||||
|
getAnalytics(initializeApp({
|
||||||
|
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
|
||||||
|
authDomain: "gh-stats-284de.firebaseapp.com",
|
||||||
|
projectId: "gh-stats-284de",
|
||||||
|
storageBucket: "gh-stats-284de.firebasestorage.app",
|
||||||
|
messagingSenderId: "723662839762",
|
||||||
|
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
|
||||||
|
measurementId: "G-228GR89RYX"
|
||||||
|
}));
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
:root{
|
||||||
|
--bg:#f9fafb; --card:#ffffff; --line:#e5e7eb;
|
||||||
|
--ink:#1f2937; --muted:#6b7280; --faint:#9ca3af; --accent:#0969da;
|
||||||
|
}
|
||||||
|
*{box-sizing:border-box}
|
||||||
|
body{margin:0;background:var(--bg);color:var(--ink);
|
||||||
|
font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
|
||||||
|
line-height:1.65}
|
||||||
|
main{max-width:760px;margin:0 auto;padding:56px 24px 96px}
|
||||||
|
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin:0 0 16px}
|
||||||
|
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
|
||||||
|
font-size:1.65rem;margin:48px 0 12px;letter-spacing:-.01em}
|
||||||
|
p{margin:0 0 16px}
|
||||||
|
.lede{font-size:1.08rem;color:var(--muted);margin-bottom:32px}
|
||||||
|
a{color:var(--accent);text-decoration:none}
|
||||||
|
a:hover{text-decoration:underline}
|
||||||
|
code,pre{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.86rem}
|
||||||
|
pre{background:var(--card);border:1px solid var(--line);border-radius:10px;
|
||||||
|
padding:14px 16px;overflow-x:auto;margin:0 0 16px}
|
||||||
|
code:not(pre code){background:#f3f4f6;border-radius:5px;padding:.12em .38em;font-size:.85em}
|
||||||
|
.tablewrap{overflow-x:auto;margin:0 0 16px}
|
||||||
|
table{border-collapse:collapse;width:100%;font-size:.86rem;background:var(--card);
|
||||||
|
border:1px solid var(--line);border-radius:10px}
|
||||||
|
th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top}
|
||||||
|
th{font-weight:600;color:var(--muted);font-size:.78rem;text-transform:uppercase;
|
||||||
|
letter-spacing:.04em}
|
||||||
|
tr:last-child td{border-bottom:none}
|
||||||
|
td code{white-space:nowrap}
|
||||||
|
figure{margin:0 0 28px}
|
||||||
|
figure img{width:100%;max-width:400px;display:block;border-radius:12px}
|
||||||
|
figcaption{color:var(--faint);font-size:.8rem;margin-top:8px}
|
||||||
|
.clip{position:relative;max-width:340px;max-height:400px;overflow:hidden;
|
||||||
|
border-radius:12px}
|
||||||
|
.clip img{width:100%;display:block;border-radius:12px}
|
||||||
|
.clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;
|
||||||
|
background:linear-gradient(to top,var(--bg),transparent)}
|
||||||
|
.cta{display:inline-block;background:var(--ink);color:#fff;border-radius:9px;
|
||||||
|
padding:11px 20px;font-weight:600;font-size:.92rem;margin:8px 0 0}
|
||||||
|
.cta:hover{text-decoration:none;opacity:.9}
|
||||||
|
.note{border-left:3px solid var(--line);padding:2px 0 2px 16px;color:var(--muted);
|
||||||
|
font-size:.92rem;margin:0 0 16px}
|
||||||
|
footer{border-top:1px solid var(--line);margin-top:64px;padding-top:20px;
|
||||||
|
color:var(--faint);font-size:.82rem}
|
||||||
|
@media (max-width:640px){h1{font-size:2.05rem}main{padding:36px 20px 72px}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<h1>A top languages card for your GitHub profile README</h1>
|
||||||
|
|
||||||
|
<p class="lede">
|
||||||
|
The languages card shows which languages your public repositories are written in,
|
||||||
|
as a donut and a ranked legend. It is one image, served from one URL, and it stays
|
||||||
|
current without a GitHub Action or a token.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<img src="https://gh-stats.com/api/ShayManor?widgets=languages" alt="A gh-stats top languages card: a donut chart with Python, Go, Jupyter Notebook, JavaScript and TypeScript, each with a percentage."/>
|
||||||
|
<figcaption>The languages card for one profile.</figcaption>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<h2>Add it to your README</h2>
|
||||||
|
|
||||||
|
<p>Paste this into your profile README and replace the username:</p>
|
||||||
|
|
||||||
|
<pre><code></code></pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The first request for a new username queues a build, so the card can take a minute
|
||||||
|
to fill in. After that it is served from cache and refreshed in the background.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a class="cta" href="https://gh-stats.com/">Preview it on your username</a>
|
||||||
|
|
||||||
|
<h2>Hide languages and pick a theme</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Notebooks, generated HTML and vendored code often dominate a languages chart.
|
||||||
|
List what to leave out in <code>hide</code>, comma-separated, and choose a look
|
||||||
|
with <code>theme</code>:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre><code></code></pre>
|
||||||
|
|
||||||
|
<div class="tablewrap">
|
||||||
|
<table>
|
||||||
|
<tr><th>Parameter</th><th>What it does</th></tr>
|
||||||
|
<tr><td><code>hide</code></td>
|
||||||
|
<td>Languages to exclude, comma-separated. Use <code>%20</code> for spaces.</td></tr>
|
||||||
|
<tr><td><code>theme</code></td>
|
||||||
|
<td><code>clean</code>, <code>midnight</code>, <code>nord</code>, <code>onyx</code> or <code>paper</code>.</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Coming from github-readme-stats</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If your README already has a <code>top-langs</code> card from
|
||||||
|
<code>github-readme-stats.vercel.app</code>, change only the domain:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="tablewrap">
|
||||||
|
<table>
|
||||||
|
<tr><th>Your current URL</th><th>Change it to</th></tr>
|
||||||
|
<tr><td><code>github-readme-stats.vercel.app/api/top-langs?username=U</code></td>
|
||||||
|
<td><code>gh-stats.com/api/top-langs?username=U</code></td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="note">
|
||||||
|
The compatibility URL ignores the original styling parameters (<code>layout</code>,
|
||||||
|
<code>langs_count</code>, colours) and serves the default card. Use the
|
||||||
|
<code>?widgets=languages</code> form above for <code>hide</code> and <code>theme</code>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The full migration guide covers the stats and streak cards too:
|
||||||
|
<a href="https://gh-stats.com/github-readme-stats-alternative.html">github-readme-stats alternative</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Common questions</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>How are percentages worked out?</strong> From the byte counts GitHub reports
|
||||||
|
for each public repository you authored, summed across those repositories. Forks are
|
||||||
|
left out. A large repository in one language weighs more than several small ones.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Are private repositories counted?</strong> No. Only public activity is
|
||||||
|
visible to the fetcher.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>Can I show it alongside other stats?</strong> Yes. Drop the
|
||||||
|
<code>?widgets=languages</code> part and the same URL serves the full profile card:
|
||||||
|
score, contribution timeline, collaborators, languages and streaks in one image.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<a href="https://gh-stats.com/">gh-stats.com</a> ·
|
||||||
|
<a href="https://github.com/ShayManor/github-readme-stats">source on GitHub</a> ·
|
||||||
|
MIT licensed
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<symbol id="bluesky-icon" viewBox="0 0 16 17">
|
||||||
|
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
|
||||||
|
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="discord-icon" viewBox="0 0 20 19">
|
||||||
|
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="documentation-icon" viewBox="0 0 21 20">
|
||||||
|
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
|
||||||
|
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
|
||||||
|
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="github-icon" viewBox="0 0 19 19">
|
||||||
|
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="social-icon" viewBox="0 0 20 20">
|
||||||
|
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
|
||||||
|
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="x-icon" viewBox="0 0 19 19">
|
||||||
|
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
Sitemap: https://gh-stats.com/sitemap.xml
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>https://gh-stats.com/</loc>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>1.0</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://gh-stats.com/github-readme-stats-alternative.html</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://gh-stats.com/github-top-languages-card.html</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://gh-stats.com/github-profile-readme.html</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://gh-stats.com/github-readme-themes.html</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://gh-stats.com/github-readme-activity-graph-alternative.html</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://gh-stats.com/github-profile-trophy-alternative.html</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
</urlset>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* Intentionally empty — all styles use Tailwind */
|
||||||
@@ -0,0 +1,453 @@
|
|||||||
|
import { useState, useRef, useCallback, useEffect } from 'react'
|
||||||
|
import './index.css'
|
||||||
|
import { SearchScreen } from './screens/SearchScreen'
|
||||||
|
import { WorkshopScreen } from './screens/WorkshopScreen'
|
||||||
|
import { ResultScreen } from './screens/ResultScreen'
|
||||||
|
import { DevScreen } from './screens/DevScreen'
|
||||||
|
import { AuthButton } from './components/AuthButton'
|
||||||
|
import type { WidgetData } from './lib/renderWidgets'
|
||||||
|
import { DEMO_WIDGET_DATA } from './lib/demoData'
|
||||||
|
import { fetchMe, type Me } from './lib/auth'
|
||||||
|
import { buildEmbedUrl } from './lib/settingsQuery'
|
||||||
|
|
||||||
|
export type Achievement = {
|
||||||
|
title: string
|
||||||
|
subtitle: string
|
||||||
|
event_date: string
|
||||||
|
icon: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PerWidgetSettings = {
|
||||||
|
grade?: { max_tags?: number }
|
||||||
|
impact?: { line_color?: string }
|
||||||
|
streaks?: { color?: string }
|
||||||
|
collaborators?: { max_count?: number; bar_color?: string }
|
||||||
|
focus?: { max_categories?: number }
|
||||||
|
languages?: { max_languages?: number }
|
||||||
|
achievements?: { max_items?: number }
|
||||||
|
}
|
||||||
|
|
||||||
|
export type WidgetSettings = {
|
||||||
|
theme: string
|
||||||
|
widgets: string[]
|
||||||
|
widgetOrder: string[]
|
||||||
|
impactPeriod: string
|
||||||
|
customTags: string[]
|
||||||
|
hiddenLanguages: string[]
|
||||||
|
achievements: Achievement[]
|
||||||
|
widgetSettings: PerWidgetSettings
|
||||||
|
}
|
||||||
|
|
||||||
|
const DEFAULT_SETTINGS: WidgetSettings = {
|
||||||
|
theme: 'midnight',
|
||||||
|
widgets: ['name', 'grade', 'impact', 'streaks', 'collaborators', 'focus', 'languages'],
|
||||||
|
widgetOrder: ['name', 'grade', 'impact', 'streaks', 'collaborators', 'focus', 'languages', 'achievements'],
|
||||||
|
impactPeriod: '6mo',
|
||||||
|
customTags: [],
|
||||||
|
hiddenLanguages: [],
|
||||||
|
achievements: [],
|
||||||
|
widgetSettings: {},
|
||||||
|
}
|
||||||
|
|
||||||
|
type Step = 'search' | 'workshop' | 'result'
|
||||||
|
|
||||||
|
// Signing in navigates the whole tab through GitHub's OAuth flow, and the
|
||||||
|
// SPA keeps username + settings only in React state, so without this the
|
||||||
|
// user comes back to an empty search box with their edits gone.
|
||||||
|
// sessionStorage survives the round trip within the tab.
|
||||||
|
const RESUME_KEY = 'gh-stats:in-progress'
|
||||||
|
|
||||||
|
type Resume = { username: string; settings: WidgetSettings }
|
||||||
|
|
||||||
|
function loadResume(): Resume | null {
|
||||||
|
try {
|
||||||
|
const raw = sessionStorage.getItem(RESUME_KEY)
|
||||||
|
if (!raw) return null
|
||||||
|
const parsed = JSON.parse(raw) as Partial<Resume> | null
|
||||||
|
if (!parsed || typeof parsed.username !== 'string' || !parsed.username) return null
|
||||||
|
if (!parsed.settings || typeof parsed.settings !== 'object') return null
|
||||||
|
return { username: parsed.username, settings: { ...DEFAULT_SETTINGS, ...parsed.settings } }
|
||||||
|
} catch {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const POLL_INTERVAL_MS = 2000
|
||||||
|
const POLL_TIMEOUT_MS = 120_000
|
||||||
|
// ResultScreen poll: a bit slower than the workshop poll because each tick
|
||||||
|
// re-fetches the full SVG, not a small JSON. 3s spacing is responsive
|
||||||
|
// enough to feel near-instant when the widget lands.
|
||||||
|
const RESULT_POLL_INTERVAL_MS = 3000
|
||||||
|
// Give up after 3 minutes — long enough to cover even worst-case
|
||||||
|
// first-time GitHub fetches; past that the user can hit "Check now".
|
||||||
|
const RESULT_POLL_TIMEOUT_MS = 180_000
|
||||||
|
|
||||||
|
type WidgetStatus = 'ready' | 'building' | 'not_found' | 'rate_limited'
|
||||||
|
|
||||||
|
function readWidgetStatus(r: Response): WidgetStatus {
|
||||||
|
const raw = r.headers.get('X-Widget-Status')
|
||||||
|
if (raw === 'building' || raw === 'not_found' || raw === 'rate_limited') return raw
|
||||||
|
return 'ready'
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function App() {
|
||||||
|
if (typeof window !== 'undefined' && window.location.pathname === '/dev') {
|
||||||
|
return <DevScreen />
|
||||||
|
}
|
||||||
|
const [me, setMe] = useState<Me>({ login: null })
|
||||||
|
// Work in progress left behind by a sign-in redirect, if any.
|
||||||
|
const [resumed] = useState(loadResume)
|
||||||
|
const [step, setStep] = useState<Step>(resumed ? 'workshop' : 'search')
|
||||||
|
const [username, setUsername] = useState(resumed?.username ?? '')
|
||||||
|
const [settings, setSettings] = useState<WidgetSettings>(resumed?.settings ?? { ...DEFAULT_SETTINGS })
|
||||||
|
const [widgetData, setWidgetData] = useState<WidgetData | null>(null)
|
||||||
|
const [fetchDone, setFetchDone] = useState(false)
|
||||||
|
const [fetchError, setFetchError] = useState<string | null>(null)
|
||||||
|
// Final SVG produced by POST /api/<u>/generate. Rendered on the Result
|
||||||
|
// screen so the user sees the actual backend output, not demo data.
|
||||||
|
const [generatedSvg, setGeneratedSvg] = useState<string | null>(null)
|
||||||
|
const [generateError, setGenerateError] = useState<string | null>(null)
|
||||||
|
const [generating, setGenerating] = useState(false)
|
||||||
|
// The URL we actually fetched for the preview — also the one we show as
|
||||||
|
// the embed snippet. For owners this is /api/<u> (backed by stored
|
||||||
|
// settings). For visitors it's /api/<u>?<query>, which round-trips their
|
||||||
|
// Workshop edits without touching the owner's saved widget.
|
||||||
|
const [embedUrl, setEmbedUrl] = useState<string>('')
|
||||||
|
// 'ready' once the backend has actually rendered the user's widget; until
|
||||||
|
// then the SVG returned by /api/<u> is the "Building @user's widget…"
|
||||||
|
// placeholder. We poll on this so the page upgrades itself from
|
||||||
|
// placeholder to real widget without the user having to refresh.
|
||||||
|
const [widgetStatus, setWidgetStatus] = useState<'ready' | 'building' | 'not_found' | 'rate_limited'>('ready')
|
||||||
|
const pollTimer = useRef<number | null>(null)
|
||||||
|
const pollStart = useRef<number>(0)
|
||||||
|
const aborted = useRef(false)
|
||||||
|
const resultPollTimer = useRef<number | null>(null)
|
||||||
|
const resultPollStart = useRef<number>(0)
|
||||||
|
|
||||||
|
const stopPolling = useCallback(() => {
|
||||||
|
if (pollTimer.current != null) {
|
||||||
|
window.clearTimeout(pollTimer.current)
|
||||||
|
pollTimer.current = null
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const stopResultPolling = useCallback(() => {
|
||||||
|
if (resultPollTimer.current != null) {
|
||||||
|
window.clearTimeout(resultPollTimer.current)
|
||||||
|
resultPollTimer.current = null
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
// Pull and re-render the embed SVG once. Used both by the auto-poll loop
|
||||||
|
// (when the first /api/<u> returned a building placeholder) and by the
|
||||||
|
// manual "Check now" button on ResultScreen.
|
||||||
|
const refetchEmbed = useCallback(async () => {
|
||||||
|
if (!embedUrl) return
|
||||||
|
try {
|
||||||
|
const r = await fetch(`${embedUrl}${embedUrl.includes('?') ? '&' : '?'}t=${Date.now()}`)
|
||||||
|
if (!r.ok) return
|
||||||
|
const status = readWidgetStatus(r)
|
||||||
|
const text = await r.text()
|
||||||
|
setGeneratedSvg(text)
|
||||||
|
setWidgetStatus(status)
|
||||||
|
} catch {
|
||||||
|
/* transient — let the next poll tick try again */
|
||||||
|
}
|
||||||
|
}, [embedUrl])
|
||||||
|
|
||||||
|
useEffect(() => stopPolling, [stopPolling])
|
||||||
|
useEffect(() => stopResultPolling, [stopResultPolling])
|
||||||
|
useEffect(() => { fetchMe().then(setMe) }, [])
|
||||||
|
|
||||||
|
// Result-screen auto-refresh. Backend serves a "Building @user's widget…"
|
||||||
|
// placeholder SVG (with header X-Widget-Status: building) until the
|
||||||
|
// worker finishes the first build. Without this loop the user would
|
||||||
|
// stare at the placeholder until they manually reloaded.
|
||||||
|
useEffect(() => {
|
||||||
|
if (step !== 'result' || widgetStatus !== 'building' || !embedUrl) return
|
||||||
|
resultPollStart.current = Date.now()
|
||||||
|
const tick = async () => {
|
||||||
|
await refetchEmbed()
|
||||||
|
if (Date.now() - resultPollStart.current > RESULT_POLL_TIMEOUT_MS) {
|
||||||
|
stopResultPolling()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resultPollTimer.current = window.setTimeout(tick, RESULT_POLL_INTERVAL_MS)
|
||||||
|
}
|
||||||
|
resultPollTimer.current = window.setTimeout(tick, RESULT_POLL_INTERVAL_MS)
|
||||||
|
return stopResultPolling
|
||||||
|
}, [step, widgetStatus, embedUrl, refetchEmbed, stopResultPolling])
|
||||||
|
|
||||||
|
// `keepSettings` is set when resuming after a sign-in redirect: the
|
||||||
|
// settings already on screen are the user's own unsaved edits, so neither
|
||||||
|
// the reset nor the server hydration below may overwrite them.
|
||||||
|
const startFetch = useCallback((user: string, keepSettings = false) => {
|
||||||
|
stopPolling()
|
||||||
|
aborted.current = false
|
||||||
|
pollStart.current = Date.now()
|
||||||
|
setFetchDone(false)
|
||||||
|
setFetchError(null)
|
||||||
|
// Show demo data immediately so Workshop is interactive while the worker builds.
|
||||||
|
setWidgetData(DEMO_WIDGET_DATA)
|
||||||
|
// Reset to defaults first so the form doesn't briefly show the previous
|
||||||
|
// user's settings while we fetch this user's saved blob.
|
||||||
|
if (!keepSettings) setSettings({ ...DEFAULT_SETTINGS })
|
||||||
|
|
||||||
|
// Hydrate the Workshop form from the user's persisted settings.
|
||||||
|
// Backend stores snake_case keys; we map them onto the camelCase
|
||||||
|
// state shape here. 404 (not enrolled yet) is expected — keep defaults.
|
||||||
|
if (!keepSettings) void (async () => {
|
||||||
|
try {
|
||||||
|
const r = await fetch(`/api/${encodeURIComponent(user)}/settings`, {
|
||||||
|
credentials: 'include',
|
||||||
|
})
|
||||||
|
if (aborted.current) return
|
||||||
|
if (!r.ok) return
|
||||||
|
const body = await r.json().catch(() => null) as { settings?: Record<string, unknown> } | null
|
||||||
|
const s = body?.settings
|
||||||
|
if (!s || typeof s !== 'object') return
|
||||||
|
setSettings(prev => {
|
||||||
|
const next: WidgetSettings = { ...prev }
|
||||||
|
if (typeof s.theme === 'string') next.theme = s.theme
|
||||||
|
if (Array.isArray(s.enabled)) next.widgets = s.enabled.filter(x => typeof x === 'string') as string[]
|
||||||
|
if (Array.isArray(s.widget_order)) next.widgetOrder = s.widget_order.filter(x => typeof x === 'string') as string[]
|
||||||
|
if (Array.isArray(s.custom_tags)) next.customTags = s.custom_tags.filter(x => typeof x === 'string') as string[]
|
||||||
|
if (Array.isArray(s.hidden_languages)) next.hiddenLanguages = s.hidden_languages.filter(x => typeof x === 'string') as string[]
|
||||||
|
if (s.widget_settings && typeof s.widget_settings === 'object') {
|
||||||
|
next.widgetSettings = s.widget_settings as PerWidgetSettings
|
||||||
|
}
|
||||||
|
if (Array.isArray(s.achievements)) {
|
||||||
|
next.achievements = s.achievements
|
||||||
|
.filter((a): a is Record<string, unknown> => !!a && typeof a === 'object')
|
||||||
|
.map(a => ({
|
||||||
|
title: typeof a.title === 'string' ? a.title : '',
|
||||||
|
subtitle: typeof a.subtitle === 'string' ? a.subtitle : '',
|
||||||
|
event_date: typeof a.event_date === 'string' ? a.event_date : '',
|
||||||
|
icon: typeof a.icon === 'string' ? a.icon : 'trophy',
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
return next
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
if (!aborted.current) console.warn('Settings load failed:', e)
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
|
||||||
|
const poll = async () => {
|
||||||
|
if (aborted.current) return
|
||||||
|
try {
|
||||||
|
const r = await fetch(`/api/${encodeURIComponent(user)}/data`)
|
||||||
|
if (aborted.current) return
|
||||||
|
const body = await r.json().catch(
|
||||||
|
() => ({} as { status?: string; data?: WidgetData })
|
||||||
|
)
|
||||||
|
const status = body.status
|
||||||
|
|
||||||
|
if (r.status === 200 && status === 'ready' && body.data) {
|
||||||
|
setWidgetData(body.data)
|
||||||
|
setFetchDone(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (status === 'not_found') {
|
||||||
|
// Fetcher confirmed the user doesn't exist on GitHub.
|
||||||
|
setFetchError('User not found')
|
||||||
|
setFetchDone(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (r.status === 404) {
|
||||||
|
// 404 without status==='not_found' means the user simply isn't
|
||||||
|
// enrolled yet (no settings row). Keep the demo data on screen
|
||||||
|
// and stop polling — no error to display.
|
||||||
|
setFetchDone(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (r.status === 429 || status === 'rate_limited') {
|
||||||
|
setFetchError((body as { cap?: string }).cap === 'daily'
|
||||||
|
? 'Enrollment limit reached — try again tomorrow'
|
||||||
|
: 'Enrollment limit reached — try again in an hour')
|
||||||
|
setFetchDone(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 202 building (or any non-terminal) — poll again until timeout.
|
||||||
|
if (Date.now() - pollStart.current > POLL_TIMEOUT_MS) {
|
||||||
|
setFetchError('Still building — refresh to keep waiting')
|
||||||
|
setFetchDone(true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
pollTimer.current = window.setTimeout(poll, POLL_INTERVAL_MS)
|
||||||
|
} catch (e) {
|
||||||
|
if (aborted.current) return
|
||||||
|
console.warn('Data poll failed:', e)
|
||||||
|
setFetchError('Network error')
|
||||||
|
setFetchDone(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
poll()
|
||||||
|
}, [stopPolling])
|
||||||
|
|
||||||
|
// Keep the in-progress username and settings recoverable across the
|
||||||
|
// sign-in redirect (and a plain reload). Cleared once the user is back
|
||||||
|
// on the search screen, so a fresh visit starts fresh.
|
||||||
|
useEffect(() => {
|
||||||
|
try {
|
||||||
|
if (step === 'search' || !username) sessionStorage.removeItem(RESUME_KEY)
|
||||||
|
else sessionStorage.setItem(RESUME_KEY, JSON.stringify({ username, settings }))
|
||||||
|
} catch {
|
||||||
|
/* private mode or quota: resuming is a nicety, not a requirement */
|
||||||
|
}
|
||||||
|
}, [step, username, settings])
|
||||||
|
|
||||||
|
// Restore: the widget data itself is not persisted, so re-fetch it for
|
||||||
|
// the username we came back to.
|
||||||
|
useEffect(() => {
|
||||||
|
if (resumed) startFetch(resumed.username, true)
|
||||||
|
}, [resumed, startFetch])
|
||||||
|
|
||||||
|
const handleSearch = (user: string) => {
|
||||||
|
setUsername(user)
|
||||||
|
startFetch(user)
|
||||||
|
setStep('workshop')
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleGenerate = async () => {
|
||||||
|
setStep('result')
|
||||||
|
setGenerating(true)
|
||||||
|
setGeneratedSvg(null)
|
||||||
|
setGenerateError(null)
|
||||||
|
setWidgetStatus('ready')
|
||||||
|
const isOwner = !!me.login && me.login.toLowerCase() === username.toLowerCase()
|
||||||
|
try {
|
||||||
|
if (isOwner) {
|
||||||
|
// Owner path: persist settings, then force a server-side render
|
||||||
|
// against the stored payload. The resulting /api/<u> is the embed.
|
||||||
|
const backendSettings = {
|
||||||
|
theme: settings.theme,
|
||||||
|
enabled: settings.widgets,
|
||||||
|
widget_order: settings.widgetOrder,
|
||||||
|
custom_tags: settings.customTags,
|
||||||
|
hidden_languages: settings.hiddenLanguages,
|
||||||
|
widget_settings: settings.widgetSettings,
|
||||||
|
achievements: settings.achievements.filter(a => a.title.trim()),
|
||||||
|
}
|
||||||
|
const patchRes = await fetch(`/api/${encodeURIComponent(username)}/settings`, {
|
||||||
|
method: 'PATCH',
|
||||||
|
credentials: 'include',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: JSON.stringify(backendSettings),
|
||||||
|
})
|
||||||
|
if (!patchRes.ok && patchRes.status !== 404) {
|
||||||
|
setGenerateError(`Settings sync failed (HTTP ${patchRes.status})`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const r = await fetch(`/api/${encodeURIComponent(username)}/generate`, {
|
||||||
|
method: 'POST',
|
||||||
|
credentials: 'include',
|
||||||
|
})
|
||||||
|
if (r.status === 404) {
|
||||||
|
const body = await r.json().catch(() => ({} as { status?: string }))
|
||||||
|
setGenerateError(body.status === 'not_found' ? 'User not found' : 'Not enrolled')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (r.status === 503) {
|
||||||
|
const body = await r.json().catch(() => ({} as { error?: string }))
|
||||||
|
if (body.error === 'github_rate_limited') {
|
||||||
|
setGenerateError("GitHub's API limit is reached for now. Your card builds automatically once it resets (within the hour), and you can paste the embed now.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!r.ok) {
|
||||||
|
setGenerateError(`Generate failed (HTTP ${r.status})`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const cleanUrl = `${window.location.origin}/api/${encodeURIComponent(username)}`
|
||||||
|
// Cache-bust so regenerate after settings change shows the new
|
||||||
|
// version, not a stale browser copy. The cache-busting `t` param
|
||||||
|
// is not read server-side (not in the allow-list) so the render
|
||||||
|
// stays cacheable at the edge.
|
||||||
|
const svgRes = await fetch(`${cleanUrl}?t=${Date.now()}`)
|
||||||
|
if (!svgRes.ok) {
|
||||||
|
setGenerateError(`SVG fetch failed (HTTP ${svgRes.status})`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setGeneratedSvg(await svgRes.text())
|
||||||
|
setEmbedUrl(cleanUrl)
|
||||||
|
setWidgetStatus(readWidgetStatus(svgRes))
|
||||||
|
} else {
|
||||||
|
// Visitor path: encode Workshop edits into a query string and hit
|
||||||
|
// the same URL we'll hand the user for their README. No owner
|
||||||
|
// settings are written. The backend renders ad-hoc against the
|
||||||
|
// fetcher's cached payload for this user.
|
||||||
|
const url = buildEmbedUrl(window.location.origin, username, settings)
|
||||||
|
// Same cache-bust trick — unknown query params are ignored by the
|
||||||
|
// sanitizer, so this doesn't alter the rendered output.
|
||||||
|
const svgRes = await fetch(`${url}${url.includes('?') ? '&' : '?'}t=${Date.now()}`)
|
||||||
|
if (svgRes.status === 404) {
|
||||||
|
setGenerateError('User not enrolled — ask them to sign in and generate first')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!svgRes.ok) {
|
||||||
|
setGenerateError(`SVG fetch failed (HTTP ${svgRes.status})`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setGeneratedSvg(await svgRes.text())
|
||||||
|
setEmbedUrl(url)
|
||||||
|
setWidgetStatus(readWidgetStatus(svgRes))
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('generate call failed:', e)
|
||||||
|
setGenerateError('Network error')
|
||||||
|
} finally {
|
||||||
|
setGenerating(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleBack = () => {
|
||||||
|
if (step === 'result') setStep('workshop')
|
||||||
|
else if (step === 'workshop') {
|
||||||
|
aborted.current = true
|
||||||
|
stopPolling()
|
||||||
|
setStep('search')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="min-h-screen bg-gray-50">
|
||||||
|
<div className="fixed right-4 top-4 z-50">
|
||||||
|
<AuthButton me={me} onChange={setMe} />
|
||||||
|
</div>
|
||||||
|
{step === 'search' && (
|
||||||
|
<SearchScreen onSearch={handleSearch} />
|
||||||
|
)}
|
||||||
|
{step === 'workshop' && (
|
||||||
|
<WorkshopScreen
|
||||||
|
username={username}
|
||||||
|
settings={settings}
|
||||||
|
onSettingsChange={setSettings}
|
||||||
|
onGenerate={handleGenerate}
|
||||||
|
onBack={handleBack}
|
||||||
|
fetchDone={fetchDone}
|
||||||
|
fetchError={fetchError}
|
||||||
|
widgetData={widgetData}
|
||||||
|
isDemoData={widgetData === DEMO_WIDGET_DATA}
|
||||||
|
me={me}
|
||||||
|
onAuthChange={setMe}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{step === 'result' && (
|
||||||
|
<ResultScreen
|
||||||
|
username={username}
|
||||||
|
generating={generating}
|
||||||
|
generatedSvg={generatedSvg}
|
||||||
|
generateError={generateError}
|
||||||
|
embedUrl={embedUrl}
|
||||||
|
widgetStatus={widgetStatus}
|
||||||
|
onBack={handleBack}
|
||||||
|
onRegenerate={handleGenerate}
|
||||||
|
onRefresh={refetchEmbed}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
||||||
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
@@ -0,0 +1,36 @@
|
|||||||
|
import type { Me } from '../lib/auth'
|
||||||
|
import { signInUrl, signOut } from '../lib/auth'
|
||||||
|
|
||||||
|
export function AuthButton({ me, onChange }: { me: Me; onChange: (m: Me) => void }) {
|
||||||
|
if (!me.login) {
|
||||||
|
return (
|
||||||
|
<a
|
||||||
|
href={signInUrl()}
|
||||||
|
className="inline-flex items-center gap-2 rounded-full bg-gray-900 px-4 py-1.5 text-sm font-medium text-white shadow-sm transition hover:bg-gray-800"
|
||||||
|
>
|
||||||
|
<svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" className="h-4 w-4">
|
||||||
|
<path d="M8 0C3.58 0 0 3.58 0 8a8 8 0 0 0 5.47 7.59c.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.42 7.42 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z" />
|
||||||
|
</svg>
|
||||||
|
Sign in with GitHub
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div className="inline-flex items-center gap-2 rounded-full border border-gray-200 bg-white py-1 pr-1 pl-3 text-sm shadow-sm">
|
||||||
|
{me.avatar_url && (
|
||||||
|
<img
|
||||||
|
src={me.avatar_url}
|
||||||
|
alt=""
|
||||||
|
className="h-6 w-6 rounded-full object-cover"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<span className="font-medium text-gray-900">{me.login}</span>
|
||||||
|
<button
|
||||||
|
onClick={async () => { await signOut(); onChange({ login: null }) }}
|
||||||
|
className="rounded-full bg-gray-100 px-3 py-1 text-xs font-medium text-gray-700 transition hover:bg-gray-200"
|
||||||
|
>
|
||||||
|
Sign out
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
import { fetchGrowth, type Growth } from '../lib/dev'
|
||||||
|
|
||||||
|
type Mode = 'daily' | 'weekly'
|
||||||
|
|
||||||
|
export function GrowthChart() {
|
||||||
|
const [data, setData] = useState<Growth | null>(null)
|
||||||
|
const [mode, setMode] = useState<Mode>('daily')
|
||||||
|
useEffect(() => { fetchGrowth().then(setData).catch(() => {}) }, [])
|
||||||
|
|
||||||
|
// Trim leading empty buckets so the chart starts at the first day/week
|
||||||
|
// with traffic instead of e.g. four weeks of zeros from before the
|
||||||
|
// service went live.
|
||||||
|
const rawPoints = data ? (mode === 'daily' ? data.daily : data.weekly) : []
|
||||||
|
const firstActive = rawPoints.findIndex(p => p.requests > 0 || p.users > 0)
|
||||||
|
const points = firstActive >= 0 ? rawPoints.slice(firstActive) : []
|
||||||
|
const labels = points.map(p => 'day' in p ? p.day : p.week)
|
||||||
|
const requests = points.map(p => p.requests)
|
||||||
|
const users = points.map(p => p.users)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border border-white/10 bg-white/[0.02] p-4">
|
||||||
|
<div className="mb-3 flex items-center justify-between">
|
||||||
|
<div className="text-sm text-white/70">Growth</div>
|
||||||
|
<div className="flex gap-1 text-xs">
|
||||||
|
<Tab active={mode === 'daily'} onClick={() => setMode('daily')}>day · 30</Tab>
|
||||||
|
<Tab active={mode === 'weekly'} onClick={() => setMode('weekly')}>week · 12</Tab>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{!data ? (
|
||||||
|
<div className="text-xs text-white/40">loading…</div>
|
||||||
|
) : points.length === 0 ? (
|
||||||
|
<div className="text-xs text-white/40">no traffic yet</div>
|
||||||
|
) : (
|
||||||
|
<div className="space-y-4">
|
||||||
|
<Line label="Requests" values={requests} labels={labels} mode={mode} stroke="#60a5fa" />
|
||||||
|
<Line label="Unique users" values={users} labels={labels} mode={mode} stroke="#a78bfa" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Tab({ active, onClick, children }: { active: boolean; onClick: () => void; children: React.ReactNode }) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
onClick={onClick}
|
||||||
|
className={`rounded px-2 py-0.5 font-mono transition ${
|
||||||
|
active ? 'bg-white/10 text-white' : 'text-white/40 hover:text-white/70'
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Line({ label, values, labels, mode, stroke }: {
|
||||||
|
label: string; values: number[]; labels: string[]; mode: Mode; stroke: string
|
||||||
|
}) {
|
||||||
|
const width = 600
|
||||||
|
const height = 70
|
||||||
|
const vbH = height + 10 // viewBox height; bottom 10 holds the x-tick marks
|
||||||
|
const max = Math.max(1, ...values)
|
||||||
|
const n = values.length
|
||||||
|
const stepX = n > 1 ? width / (n - 1) : 0
|
||||||
|
const total = values.reduce((a, b) => a + b, 0)
|
||||||
|
const latest = values[n - 1] ?? 0
|
||||||
|
// Map a value to its y coordinate in viewBox space; reused for both the
|
||||||
|
// line points and the y-axis label positions so they stay aligned.
|
||||||
|
const yFor = (v: number) => height - (v / max) * (height - 4) - 2
|
||||||
|
const xy = values.map((v, i) => ({ x: n > 1 ? i * stepX : width / 2, y: yFor(v) }))
|
||||||
|
const pts = xy.map(p => `${p.x.toFixed(1)},${p.y.toFixed(1)}`).join(' ')
|
||||||
|
// Sealed area polygon: only valid when we have a real line (n >= 2).
|
||||||
|
const area = n > 1 ? `0,${height} ${pts} ${width},${height}` : ''
|
||||||
|
const ticks = pickTicks(labels, Math.min(6, n))
|
||||||
|
// y-axis labels: top (max), middle, baseline (0). Percent positions are
|
||||||
|
// relative to the same viewBox the chart is drawn in.
|
||||||
|
const yMarks = max > 1
|
||||||
|
? [max, Math.round(max / 2), 0]
|
||||||
|
: [max, 0]
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div className="mb-1 flex items-baseline justify-between text-xs">
|
||||||
|
<span className="text-white/60">{label}</span>
|
||||||
|
<span className="font-mono tabular-nums text-white/40">
|
||||||
|
latest <span className="text-white/80">{latest.toLocaleString()}</span>
|
||||||
|
<span className="ml-3">total <span className="text-white/80">{total.toLocaleString()}</span></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex gap-1.5">
|
||||||
|
{/* y-axis */}
|
||||||
|
<div className="relative w-7 shrink-0" style={{ height: vbH }}>
|
||||||
|
{yMarks.map(v => (
|
||||||
|
<span key={v}
|
||||||
|
className="absolute right-0 -translate-y-1/2 font-mono text-[10px] tabular-nums text-white/35"
|
||||||
|
style={{ top: `${(yFor(v) / vbH) * 100}%` }}>
|
||||||
|
{fmtCompact(v)}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
{/* plot + x-axis */}
|
||||||
|
<div className="min-w-0 flex-1">
|
||||||
|
<svg viewBox={`0 0 ${width} ${vbH}`} className="w-full" style={{ height: vbH }} preserveAspectRatio="none">
|
||||||
|
{area && <polyline points={area} fill={stroke} fillOpacity="0.08" stroke="none" />}
|
||||||
|
{n > 1 && (
|
||||||
|
<polyline points={pts} fill="none" stroke={stroke} strokeWidth={1.5}
|
||||||
|
strokeLinecap="round" strokeLinejoin="round"
|
||||||
|
vectorEffect="non-scaling-stroke" />
|
||||||
|
)}
|
||||||
|
{n === 1 && (
|
||||||
|
<circle cx={xy[0].x} cy={xy[0].y} r={3} fill={stroke} />
|
||||||
|
)}
|
||||||
|
{ticks.map(t => {
|
||||||
|
const x = n > 1 ? t.idx * stepX : width / 2
|
||||||
|
return (
|
||||||
|
<line key={`tick-${t.idx}`} x1={x} x2={x} y1={height} y2={height + 3}
|
||||||
|
stroke="rgb(255 255 255 / 0.15)" strokeWidth={1}
|
||||||
|
vectorEffect="non-scaling-stroke" />
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</svg>
|
||||||
|
<div className="relative mt-1 h-3">
|
||||||
|
{ticks.map(t => (
|
||||||
|
<span key={`label-${t.idx}`}
|
||||||
|
className="absolute -translate-x-1/2 whitespace-nowrap font-mono text-[10px] text-white/40"
|
||||||
|
style={{ left: n > 1 ? `${(t.idx / (n - 1)) * 100}%` : '50%' }}>
|
||||||
|
{formatTick(t.label, mode)}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function fmtCompact(n: number): string {
|
||||||
|
if (n >= 10000) return `${Math.round(n / 1000)}k`
|
||||||
|
if (n >= 1000) return `${(n / 1000).toFixed(1)}k`
|
||||||
|
return String(Math.round(n))
|
||||||
|
}
|
||||||
|
|
||||||
|
function pickTicks(labels: string[], n: number): { idx: number; label: string }[] {
|
||||||
|
if (labels.length === 0 || n <= 0) return []
|
||||||
|
if (labels.length <= n) return labels.map((label, idx) => ({ idx, label }))
|
||||||
|
const out: { idx: number; label: string }[] = []
|
||||||
|
for (let i = 0; i < n; i++) {
|
||||||
|
const idx = Math.round((i * (labels.length - 1)) / (n - 1))
|
||||||
|
out.push({ idx, label: labels[idx] })
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatTick(label: string, mode: Mode): string {
|
||||||
|
if (mode === 'daily') {
|
||||||
|
// "2026-05-27" -> "05-27"
|
||||||
|
return label.length >= 10 ? label.slice(5) : label
|
||||||
|
}
|
||||||
|
// "2026-W21" -> "W21"
|
||||||
|
const parts = label.split('-')
|
||||||
|
return parts[1] || label
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
import { fetchHealth, type Health } from '../lib/dev'
|
||||||
|
|
||||||
|
export function HealthStrip() {
|
||||||
|
const [h, setH] = useState<Health | null>(null)
|
||||||
|
useEffect(() => { fetchHealth().then(setH).catch(() => {}) }, [])
|
||||||
|
if (!h) return null
|
||||||
|
const pct = (n: number) => `${(n * 100).toFixed(1)}%`
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border border-white/10 bg-white/[0.02] p-4">
|
||||||
|
<div className="mb-3 text-sm text-white/70">Health</div>
|
||||||
|
<div className="grid grid-cols-3 gap-3 text-center">
|
||||||
|
<Pill label="Edge cache hit" value={pct(h.edge_cache_hit_rate)} />
|
||||||
|
<Pill label="Fetch error" value={pct(h.fetcher_error_rate)} tone={h.fetcher_error_rate > 0.05 ? 'warn' : 'ok'} />
|
||||||
|
<Pill label="Events dropped 24h" value={h.events_dropped_24h.toLocaleString()}
|
||||||
|
tone={h.events_dropped_24h > 0 ? 'warn' : 'ok'} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Pill({ label, value, tone = 'ok' }: { label: string; value: string; tone?: 'ok' | 'warn' }) {
|
||||||
|
const color = tone === 'warn' ? 'text-amber-400' : 'text-emerald-400'
|
||||||
|
return (
|
||||||
|
<div className="rounded bg-white/[0.03] px-2 py-2">
|
||||||
|
<div className="text-xs text-white/40">{label}</div>
|
||||||
|
<div className={`mt-1 font-mono text-lg ${color}`}>{value}</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
import { fetchLatency, type LatencyRow } from '../lib/dev'
|
||||||
|
|
||||||
|
export function LatencyChart() {
|
||||||
|
const [rows, setRows] = useState<LatencyRow[]>([])
|
||||||
|
useEffect(() => { fetchLatency().then(setRows).catch(() => {}) }, [])
|
||||||
|
|
||||||
|
const max = Math.max(1, ...rows.map(r => r.p95))
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border border-white/10 bg-white/[0.02] p-4">
|
||||||
|
<div className="mb-3 text-sm text-white/70">Latency by endpoint</div>
|
||||||
|
{rows.length === 0 && <div className="text-xs text-white/40">no traffic yet</div>}
|
||||||
|
<div className="space-y-1.5">
|
||||||
|
{rows.map(r => (
|
||||||
|
<div key={r.endpoint} className="grid grid-cols-[1fr_auto] items-center gap-3 font-mono text-xs">
|
||||||
|
<div>
|
||||||
|
<div className="text-white/70">{r.endpoint}</div>
|
||||||
|
<div className="mt-1 h-1.5 w-full overflow-hidden rounded bg-white/[0.04]">
|
||||||
|
<div className="h-full bg-sky-400/60" style={{ width: `${(r.p50 / max) * 100}%` }} />
|
||||||
|
<div className="-mt-1.5 h-1.5 bg-sky-300/30" style={{ width: `${(r.p95 / max) * 100}%` }} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="text-right text-white/80 tabular-nums">
|
||||||
|
<span>{r.p50}</span><span className="text-white/30"> · </span>
|
||||||
|
<span>{r.p95}</span><span className="text-white/30"> · </span>
|
||||||
|
<span>{r.p99}ms</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
type Props = { values: number[]; width?: number; height?: number; stroke?: string }
|
||||||
|
|
||||||
|
export function Sparkline({ values, width = 140, height = 32, stroke = '#60a5fa' }: Props) {
|
||||||
|
if (values.length === 0) return <svg width={width} height={height} />
|
||||||
|
const max = Math.max(1, ...values)
|
||||||
|
const stepX = width / Math.max(1, values.length - 1)
|
||||||
|
const pts = values.map((v, i) => {
|
||||||
|
const x = i * stepX
|
||||||
|
const y = height - (v / max) * (height - 2) - 1
|
||||||
|
return `${x.toFixed(1)},${y.toFixed(1)}`
|
||||||
|
}).join(' ')
|
||||||
|
return (
|
||||||
|
<svg width={width} height={height} viewBox={`0 0 ${width} ${height}`}>
|
||||||
|
<polyline points={pts} fill="none" stroke={stroke} strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" />
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import type { ReactNode } from 'react'
|
||||||
|
import { Sparkline } from './Sparkline'
|
||||||
|
import type { Summary } from '../lib/dev'
|
||||||
|
|
||||||
|
function Card({ label, value, sub }: { label: string; value: string; sub?: ReactNode }) {
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border border-white/10 bg-white/[0.02] px-4 py-3">
|
||||||
|
<div className="text-xs uppercase tracking-wide text-white/50">{label}</div>
|
||||||
|
<div className="mt-1 text-2xl font-mono text-white">{value}</div>
|
||||||
|
{sub && <div className="mt-1 text-xs text-white/40">{sub}</div>}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function StatCards({ s }: { s: Summary }) {
|
||||||
|
const fmt = (n: number) => n.toLocaleString()
|
||||||
|
return (
|
||||||
|
<div className="grid grid-cols-1 gap-3 md:grid-cols-4">
|
||||||
|
<Card label="Requests 7d" value={fmt(s.requests_7d)}
|
||||||
|
sub={<Sparkline values={s.daily_requests.map(d => d.count)} />} />
|
||||||
|
<Card label="Active users 7d" value={fmt(s.active_users_7d)} />
|
||||||
|
<Card label="p50 / p95 latency" value={`${s.p50_ms}/${s.p95_ms}ms`} />
|
||||||
|
<Card label="Renders 7d" value={fmt(s.renders_7d)} sub={`avg ${s.avg_render_ms}ms`} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
import { useEffect, useMemo, useState } from 'react'
|
||||||
|
import { fetchUsers, type UserRow } from '../lib/dev'
|
||||||
|
|
||||||
|
function timeAgo(ts: number | null): string {
|
||||||
|
if (!ts) return '—'
|
||||||
|
const s = Math.max(0, Math.floor(Date.now() / 1000 - ts))
|
||||||
|
if (s < 60) return `${s}s ago`
|
||||||
|
if (s < 3600) return `${Math.floor(s / 60)}m ago`
|
||||||
|
if (s < 86400) return `${Math.floor(s / 3600)}h ago`
|
||||||
|
return `${Math.floor(s / 86400)}d ago`
|
||||||
|
}
|
||||||
|
|
||||||
|
export function UsersTable() {
|
||||||
|
const [q, setQ] = useState('')
|
||||||
|
const [sort, setSort] = useState<'requests' | 'latency' | 'last_seen'>('requests')
|
||||||
|
const [rows, setRows] = useState<UserRow[]>([])
|
||||||
|
const [loading, setLoading] = useState(true)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
let alive = true
|
||||||
|
const h = window.setTimeout(() => {
|
||||||
|
setLoading(true)
|
||||||
|
fetchUsers(q, sort).then(r => { if (alive) { setRows(r); setLoading(false) } })
|
||||||
|
.catch(() => { if (alive) setLoading(false) })
|
||||||
|
}, 200)
|
||||||
|
return () => { alive = false; window.clearTimeout(h) }
|
||||||
|
}, [q, sort])
|
||||||
|
|
||||||
|
const sorted = useMemo(() => rows, [rows])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="rounded-lg border border-white/10 bg-white/[0.02]">
|
||||||
|
<div className="flex items-center justify-between border-b border-white/10 px-4 py-2">
|
||||||
|
<div className="text-sm text-white/70">Users</div>
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<select value={sort} onChange={e => setSort(e.target.value as 'requests' | 'latency' | 'last_seen')}
|
||||||
|
className="rounded bg-white/[0.04] px-2 py-1 text-xs text-white/80">
|
||||||
|
<option value="requests">requests</option>
|
||||||
|
<option value="latency">latency</option>
|
||||||
|
<option value="last_seen">last seen</option>
|
||||||
|
</select>
|
||||||
|
<input value={q} onChange={e => setQ(e.target.value)} placeholder="search…"
|
||||||
|
className="rounded bg-white/[0.04] px-2 py-1 text-xs text-white/80 placeholder:text-white/30" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table className="w-full text-left text-sm">
|
||||||
|
<thead className="text-xs uppercase text-white/40">
|
||||||
|
<tr>
|
||||||
|
<th className="px-4 py-2 font-normal">User</th>
|
||||||
|
<th className="px-4 py-2 font-normal">Req 7d</th>
|
||||||
|
<th className="px-4 py-2 font-normal">Last seen</th>
|
||||||
|
<th className="px-4 py-2 font-normal">Top endpoint</th>
|
||||||
|
<th className="px-4 py-2 text-right font-normal">Avg ms</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{loading && <tr><td colSpan={5} className="px-4 py-6 text-center text-white/40">loading…</td></tr>}
|
||||||
|
{!loading && sorted.length === 0 && (
|
||||||
|
<tr><td colSpan={5} className="px-4 py-6 text-center text-white/40">no users yet</td></tr>
|
||||||
|
)}
|
||||||
|
{sorted.map(u => (
|
||||||
|
<tr key={u.username} className="border-t border-white/5">
|
||||||
|
<td className="px-4 py-2 text-white/90">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
{u.github_avatar_url
|
||||||
|
? <img src={u.github_avatar_url} alt="" className="h-5 w-5 rounded-full" />
|
||||||
|
: <span className="inline-block h-5 w-5 rounded-full bg-white/10" />}
|
||||||
|
<span className="font-mono">{u.username}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-4 py-2 font-mono text-white/80">{u.requests_7d.toLocaleString()}</td>
|
||||||
|
<td className="px-4 py-2 text-white/60">{timeAgo(u.last_seen)}</td>
|
||||||
|
<td className="px-4 py-2 font-mono text-white/60">{u.top_endpoint || '—'}</td>
|
||||||
|
<td className="px-4 py-2 text-right font-mono text-white/80">{u.avg_latency_ms}</td>
|
||||||
|
</tr>
|
||||||
|
))}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600&display=swap');
|
||||||
|
|
||||||
|
@import "tailwindcss";
|
||||||
|
|
||||||
|
@theme {
|
||||||
|
--font-sans: 'DM Sans', system-ui, sans-serif;
|
||||||
|
--font-serif: 'Instrument Serif', Georgia, serif;
|
||||||
|
--font-mono: 'JetBrains Mono', monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar { display: none; }
|
||||||
|
* { -ms-overflow-style: none; scrollbar-width: none; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: 'DM Sans', system-ui, sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-in-up {
|
||||||
|
from { opacity: 0; transform: translateY(16px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-fade-in-up {
|
||||||
|
animation: fade-in-up 0.5s ease-out both;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin-slow {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-spin-slow {
|
||||||
|
animation: spin-slow 1s linear infinite;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
export type Me = { login: string | null; avatar_url?: string }
|
||||||
|
|
||||||
|
export async function fetchMe(): Promise<Me> {
|
||||||
|
const r = await fetch('/api/auth/me', { credentials: 'include' })
|
||||||
|
if (!r.ok) return { login: null }
|
||||||
|
return r.json() as Promise<Me>
|
||||||
|
}
|
||||||
|
|
||||||
|
export function signInUrl(next?: string): string {
|
||||||
|
const n = next ?? (window.location.pathname + window.location.search)
|
||||||
|
return `/api/auth/github/login?next=${encodeURIComponent(n)}`
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function signOut(): Promise<void> {
|
||||||
|
await fetch('/api/auth/logout', {
|
||||||
|
method: 'POST',
|
||||||
|
credentials: 'include',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import type { WidgetData } from './renderWidgets'
|
||||||
|
|
||||||
|
// Used to show a fully-populated Workshop preview instantly while the real
|
||||||
|
// data is building asynchronously on the server. Swapped out when the
|
||||||
|
// /data endpoint returns status=ready.
|
||||||
|
export const DEMO_WIDGET_DATA: WidgetData = {
|
||||||
|
grade: {
|
||||||
|
grade: 'A',
|
||||||
|
score: 78,
|
||||||
|
stats: { commits: 842, prs: 47, stars: 156, repos: 28, followers: 92 },
|
||||||
|
tags: [
|
||||||
|
{ tag: 'backend', source: 'earned', confidence: 0.7 },
|
||||||
|
{ tag: 'frontend', source: 'earned', confidence: 0.55 },
|
||||||
|
{ tag: 'devops', source: 'earned', confidence: 0.3 },
|
||||||
|
],
|
||||||
|
breakdown: {},
|
||||||
|
},
|
||||||
|
impact: Array.from({ length: 24 }, (_, i) => ({
|
||||||
|
week_start: new Date(Date.now() - (23 - i) * 7 * 86400000).toISOString().slice(0, 10),
|
||||||
|
commits: Math.max(0, Math.round(14 + Math.sin(i * 0.5) * 9 + (i % 3) * 2)),
|
||||||
|
})),
|
||||||
|
collaborators: [
|
||||||
|
{ username: 'alex', shared_repos: 4, shared_commits: 87 },
|
||||||
|
{ username: 'jordan', shared_repos: 2, shared_commits: 54 },
|
||||||
|
{ username: 'sam', shared_repos: 3, shared_commits: 31 },
|
||||||
|
],
|
||||||
|
focus: [
|
||||||
|
{ category: 'Backend', percentage: 45, commit_count: 379 },
|
||||||
|
{ category: 'Frontend', percentage: 30, commit_count: 252 },
|
||||||
|
{ category: 'DevOps', percentage: 15, commit_count: 126 },
|
||||||
|
{ category: 'ML', percentage: 10, commit_count: 84 },
|
||||||
|
],
|
||||||
|
languages: [
|
||||||
|
{ language: 'Python', percentage: 42, loc: 12 },
|
||||||
|
{ language: 'TypeScript', percentage: 28, loc: 8 },
|
||||||
|
{ language: 'Go', percentage: 18, loc: 5 },
|
||||||
|
{ language: 'Rust', percentage: 12, loc: 3 },
|
||||||
|
],
|
||||||
|
streaks: {
|
||||||
|
current: 12,
|
||||||
|
max: 47,
|
||||||
|
current_start: new Date(Date.now() - 11 * 86400000).toISOString().slice(0, 10),
|
||||||
|
last_active_date: new Date().toISOString().slice(0, 10),
|
||||||
|
max_start: '2024-09-04',
|
||||||
|
max_end: '2024-10-20',
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
// Read helpers for the /dev dashboard. All four endpoints require a
|
||||||
|
// Basic-auth session that the browser establishes via the WWW-Authenticate
|
||||||
|
// challenge the first time the SPA hits /api/dev/summary.
|
||||||
|
|
||||||
|
export type Summary = {
|
||||||
|
requests_7d: number
|
||||||
|
active_users_7d: number
|
||||||
|
p50_ms: number
|
||||||
|
p95_ms: number
|
||||||
|
renders_7d: number
|
||||||
|
avg_render_ms: number
|
||||||
|
daily_requests: { day: string; count: number }[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type UserRow = {
|
||||||
|
username: string
|
||||||
|
requests_7d: number
|
||||||
|
last_seen: number | null
|
||||||
|
avg_latency_ms: number
|
||||||
|
top_endpoint: string
|
||||||
|
github_avatar_url: string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type LatencyRow = {
|
||||||
|
endpoint: string
|
||||||
|
count: number
|
||||||
|
p50: number
|
||||||
|
p95: number
|
||||||
|
p99: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Health = {
|
||||||
|
edge_cache_hit_rate: number
|
||||||
|
fetcher_error_rate: number
|
||||||
|
events_dropped_24h: number
|
||||||
|
oldest_event_ts: number | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Growth = {
|
||||||
|
daily: { day: string; users: number; requests: number }[]
|
||||||
|
weekly: { week: string; users: number; requests: number }[]
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getJSON<T>(path: string): Promise<T> {
|
||||||
|
const r = await fetch(path, { credentials: 'include' })
|
||||||
|
if (r.status === 401) throw new Error('unauthorized')
|
||||||
|
if (r.status === 503) throw new Error('dashboard_disabled')
|
||||||
|
if (!r.ok) throw new Error(`HTTP ${r.status}`)
|
||||||
|
return (await r.json()) as T
|
||||||
|
}
|
||||||
|
|
||||||
|
export const fetchSummary = () => getJSON<Summary>('/api/dev/summary')
|
||||||
|
export const fetchUsers = (q = '', sort = 'requests') =>
|
||||||
|
getJSON<UserRow[]>(`/api/dev/users?q=${encodeURIComponent(q)}&sort=${sort}`)
|
||||||
|
export const fetchLatency = () => getJSON<LatencyRow[]>('/api/dev/latency')
|
||||||
|
export const fetchHealth = () => getJSON<Health>('/api/dev/health')
|
||||||
|
export const fetchGrowth = () => getJSON<Growth>('/api/dev/growth')
|
||||||
@@ -0,0 +1,471 @@
|
|||||||
|
import { THEMES, TAG_COLORS, GRADE_COLORS, FOCUS_COLORS, LANG_COLORS, type Theme } from './themes'
|
||||||
|
|
||||||
|
// --- Types matching the API `format=data` response ---
|
||||||
|
|
||||||
|
export type GradeData = {
|
||||||
|
grade: string; score: number
|
||||||
|
stats: Record<string, number>
|
||||||
|
tags: { tag: string; source: string; confidence: number; label?: string | null }[]
|
||||||
|
breakdown: Record<string, number>
|
||||||
|
}
|
||||||
|
export type ImpactWeek = { week_start: string; commits: number }
|
||||||
|
export type CollaboratorData = { username: string; shared_repos: number; shared_commits: number }
|
||||||
|
export type FocusCategory = { category: string; percentage: number; commit_count: number }
|
||||||
|
export type LanguageData = { language: string; percentage: number; loc: number }
|
||||||
|
export type AchievementInput = { title: string; subtitle: string; event_date: string; icon: string }
|
||||||
|
export type StreakData = {
|
||||||
|
current: number; max: number
|
||||||
|
current_start?: string; last_active_date?: string
|
||||||
|
max_start?: string; max_end?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type WidgetData = {
|
||||||
|
grade?: GradeData
|
||||||
|
impact?: ImpactWeek[]
|
||||||
|
collaborators?: CollaboratorData[]
|
||||||
|
focus?: FocusCategory[]
|
||||||
|
languages?: LanguageData[]
|
||||||
|
streaks?: StreakData
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PerWidgetSettings = {
|
||||||
|
grade?: { max_tags?: number }
|
||||||
|
impact?: { line_color?: string }
|
||||||
|
streaks?: { color?: string }
|
||||||
|
collaborators?: { max_count?: number; bar_color?: string }
|
||||||
|
focus?: { max_categories?: number }
|
||||||
|
languages?: { max_languages?: number }
|
||||||
|
achievements?: { max_items?: number }
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Helpers ---
|
||||||
|
|
||||||
|
const esc = (s: string) => s.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"')
|
||||||
|
const font = '-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif'
|
||||||
|
|
||||||
|
const TAG_ACRONYMS = new Set(['ml','ai','ui','ux','api','cli','sql','css','html','js','ios'])
|
||||||
|
function formatTagLabel(tag: string): string {
|
||||||
|
return tag.split('-')
|
||||||
|
.map(w => TAG_ACRONYMS.has(w.toLowerCase())
|
||||||
|
? w.toUpperCase()
|
||||||
|
: w.charAt(0).toUpperCase() + w.slice(1))
|
||||||
|
.join(' ')
|
||||||
|
}
|
||||||
|
|
||||||
|
function cardWrapper(inner: string, w: number, h: number, t: Theme, title: string, prefix = '') {
|
||||||
|
const sid = `${prefix}shadow`
|
||||||
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}" fill="none">
|
||||||
|
<defs><filter id="${sid}" x="-2%" y="-2%" width="104%" height="104%"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#000" flood-opacity="0.15"/></filter></defs>
|
||||||
|
<rect x="1" y="1" width="${w-2}" height="${h-2}" rx="10" ry="10" fill="${t.card_bg}" stroke="${t.card_border}" stroke-width="1" filter="url(#${sid})"/>
|
||||||
|
${title ? `<text x="20" y="30" font-family="${font}" font-size="11" font-weight="600" fill="${t.text_secondary}" letter-spacing="0.8" opacity="0.7">${esc(title.toUpperCase())}</text>` : ''}
|
||||||
|
<g transform="translate(0, ${title ? 36 : 0})">${inner}</g>
|
||||||
|
</svg>`
|
||||||
|
}
|
||||||
|
|
||||||
|
function iconSvg(kind: string, color: string): string {
|
||||||
|
const icons: Record<string, string> = {
|
||||||
|
commits: `<circle cx="7" cy="7" r="3" fill="none" stroke="${color}" stroke-width="1.4"/><circle cx="7" cy="7" r="1" fill="${color}"/><line x1="7" y1="10" x2="7" y2="14" stroke="${color}" stroke-width="1.4"/><line x1="7" y1="0" x2="7" y2="4" stroke="${color}" stroke-width="1.4"/>`,
|
||||||
|
prs: `<circle cx="4" cy="4" r="2" fill="none" stroke="${color}" stroke-width="1.2"/><circle cx="10" cy="10" r="2" fill="none" stroke="${color}" stroke-width="1.2"/><path d="M4 6v4c0 1.1.9 2 2 2h2" fill="none" stroke="${color}" stroke-width="1.2"/>`,
|
||||||
|
stars: `<path d="M7 1l1.8 3.6 4 .6-2.9 2.8.7 4L7 10.2 3.4 12l.7-4L1.2 5.2l4-.6z" fill="none" stroke="${color}" stroke-width="1.2" stroke-linejoin="round"/>`,
|
||||||
|
repos: `<rect x="2" y="1" width="10" height="12" rx="1.5" fill="none" stroke="${color}" stroke-width="1.2"/><line x1="5" y1="4" x2="9" y2="4" stroke="${color}" stroke-width="1"/><line x1="5" y1="6.5" x2="9" y2="6.5" stroke="${color}" stroke-width="1"/><line x1="5" y1="9" x2="7" y2="9" stroke="${color}" stroke-width="1"/>`,
|
||||||
|
followers: `<circle cx="5" cy="4" r="2.5" fill="none" stroke="${color}" stroke-width="1.2"/><path d="M0.5 12c0-2.5 2-4 4.5-4s4.5 1.5 4.5 4" fill="none" stroke="${color}" stroke-width="1.2"/><circle cx="11" cy="3.5" r="1.8" fill="none" stroke="${color}" stroke-width="1"/><path d="M10 7.5c1.5 0 3.5 1 3.5 3" fill="none" stroke="${color}" stroke-width="1"/>`,
|
||||||
|
}
|
||||||
|
return `<g>${icons[kind] ?? ''}</g>`
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Widget renderers ---
|
||||||
|
|
||||||
|
function renderGrade(data: GradeData, t: Theme, s?: { max_tags?: number }): string {
|
||||||
|
const tags = s?.max_tags ? data.tags.slice(0, s.max_tags) : data.tags
|
||||||
|
const base = data.grade[0]
|
||||||
|
const color = GRADE_COLORS[base] ?? t.accent
|
||||||
|
const radius = 36
|
||||||
|
const circ = 2 * Math.PI * radius
|
||||||
|
const offset = circ * (1 - data.score / 100)
|
||||||
|
const gf = data.grade.length <= 2 ? 30 : 22
|
||||||
|
|
||||||
|
const statLabels: Record<string, string> = { commits:'Commits', prs:'PRs', stars:'Stars', repos:'Repos', followers:'Followers' }
|
||||||
|
const statKeys = ['commits','prs','stars','repos','followers'].filter(k => k in data.stats)
|
||||||
|
const sw = 340 / Math.max(statKeys.length, 1)
|
||||||
|
let statsSvg = ''
|
||||||
|
for (let i = 0; i < statKeys.length; i++) {
|
||||||
|
const k = statKeys[i], v = data.stats[k]
|
||||||
|
const sx = i * sw + sw / 2
|
||||||
|
const vs = v < 100000 ? v.toLocaleString() : `${Math.round(v/1000)}k`
|
||||||
|
statsSvg += `<g transform="translate(${sx}, 0)"><g transform="translate(-7, 0)">${iconSvg(k, t.text_secondary)}</g><text x="0" y="28" text-anchor="middle" font-family="${font}" font-size="14" font-weight="700" fill="${t.text}">${vs}</text><text x="0" y="41" text-anchor="middle" font-family="${font}" font-size="9" fill="${t.text_secondary}">${statLabels[k]??k}</text></g>`
|
||||||
|
}
|
||||||
|
|
||||||
|
let tagsSvg = '', tx = 0, ty = 0
|
||||||
|
for (const tag of tags) {
|
||||||
|
const tc = TAG_COLORS[tag.tag] ?? t.accent
|
||||||
|
const label = tag.label || formatTagLabel(tag.tag)
|
||||||
|
const tw = Math.round(label.length * 6.6 + 18)
|
||||||
|
const po = tag.source === 'earned' ? 0.9 : 0.55
|
||||||
|
if (tx + tw > 340) { tx = 0; ty += 30 }
|
||||||
|
tagsSvg += `<g transform="translate(${tx}, ${ty})" opacity="${po}"><rect width="${tw}" height="24" rx="12" fill="${tc}" opacity="0.12"/><rect width="${tw}" height="24" rx="12" fill="none" stroke="${tc}" stroke-width="1" opacity="0.3"/><text x="${Math.round(tw/2)}" y="16" text-anchor="middle" font-family="${font}" font-size="10" font-weight="500" fill="${tc}">${esc(label)}</text></g>`
|
||||||
|
tx += tw + 6
|
||||||
|
}
|
||||||
|
|
||||||
|
const tagsH = tags.length ? ty + 24 : 0
|
||||||
|
const statsY = 100, tagsY = statsY + 54
|
||||||
|
const tagPad = tagsH > 24 ? 18 : 14
|
||||||
|
const cardH = tags.length ? tagsY + tagsH + tagPad : statsY + 54
|
||||||
|
|
||||||
|
const breakdownLabels: Record<string, string> = {
|
||||||
|
commits: 'Commits', consistency: 'Consistency', repos: 'Repos',
|
||||||
|
stars: 'Stars', forks: 'Forks', activity: 'Activity', followers: 'Followers',
|
||||||
|
}
|
||||||
|
const topStrengths = Object.entries(data.breakdown || {})
|
||||||
|
.sort((a, b) => b[1] - a[1])
|
||||||
|
.slice(0, 2)
|
||||||
|
.map(([k]) => breakdownLabels[k] ?? k.charAt(0).toUpperCase() + k.slice(1))
|
||||||
|
const strengthsLine = topStrengths.length ? `Strong in ${topStrengths.join(' · ')}` : ''
|
||||||
|
|
||||||
|
let inner = `<g transform="translate(52, 48)"><circle cx="0" cy="0" r="${radius}" fill="none" stroke="${t.grid}" stroke-width="5"/><circle cx="0" cy="0" r="${radius}" fill="none" stroke="${color}" stroke-width="5" stroke-dasharray="${circ.toFixed(1)}" stroke-dashoffset="${offset.toFixed(1)}" stroke-linecap="round" transform="rotate(-90)"/><text x="0" y="${(gf * 0.35).toFixed(2)}" text-anchor="middle" font-family="${font}" font-size="${gf}" font-weight="800" fill="${color}">${esc(data.grade)}</text></g>
|
||||||
|
<line x1="100" y1="16" x2="100" y2="80" stroke="${t.grid}" stroke-width="1"/>
|
||||||
|
<g transform="translate(114, 26)"><text x="0" y="10" font-family="${font}" font-size="16" font-weight="700" fill="${t.text}">Developer Profile</text><text x="0" y="32" font-family="${font}" font-size="11" fill="${t.text_secondary}">${esc(strengthsLine)}</text><text x="0" y="50" font-family="${font}" font-size="10" letter-spacing="0.4" fill="${t.text_secondary}">Score <tspan fill="${t.text}" font-weight="600">${data.score.toFixed(0)}</tspan> / 100</text></g>
|
||||||
|
<line x1="20" y1="${statsY-4}" x2="360" y2="${statsY-4}" stroke="${t.grid}" stroke-width="0.5"/>
|
||||||
|
<g transform="translate(20, ${statsY})">${statsSvg}</g>`
|
||||||
|
|
||||||
|
if (tags.length) {
|
||||||
|
inner += `<line x1="20" y1="${tagsY-6}" x2="360" y2="${tagsY-6}" stroke="${t.grid}" stroke-width="0.5"/><g transform="translate(20, ${tagsY})">${tagsSvg}</g>`
|
||||||
|
}
|
||||||
|
|
||||||
|
return cardWrapper(inner, 380, cardH, t, '')
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderImpact(weeks: ImpactWeek[], t: Theme, s?: { line_color?: string }): string {
|
||||||
|
const w = 380, h = 200, cx = 40, cy = 8, cw = 316, ch = 82
|
||||||
|
const lineColor = s?.line_color ?? t.accent
|
||||||
|
|
||||||
|
if (!weeks.length) {
|
||||||
|
const inner = `<line x1="${cx}" y1="${cy+ch}" x2="${cx+cw}" y2="${cy+ch}" stroke="${t.grid}" stroke-width="0.5"/>
|
||||||
|
<text x="${cx+cw/2}" y="${cy+ch/2+4}" text-anchor="middle" font-family="${font}" font-size="11" fill="${t.text_secondary}">No contribution data yet</text>
|
||||||
|
<g transform="translate(20, ${cy+ch+46})"><text x="0" y="0" font-family="${font}" font-size="13" font-weight="700" fill="${t.text}">0</text><text x="0" y="14" font-family="${font}" font-size="9" fill="${t.text_secondary}">commits over 6mo</text></g>`
|
||||||
|
return cardWrapper(inner, w, h, t, 'Impact Timeline')
|
||||||
|
}
|
||||||
|
|
||||||
|
const maxC = Math.max(...weeks.map(w => w.commits), 1)
|
||||||
|
const n = weeks.length
|
||||||
|
const pts = weeks.map((wk, i) => ({
|
||||||
|
x: cx + (i / Math.max(n-1, 1)) * cw,
|
||||||
|
y: cy + ch - (wk.commits / maxC) * ch,
|
||||||
|
}))
|
||||||
|
|
||||||
|
let pathD = `M ${pts[0].x.toFixed(1)} ${pts[0].y.toFixed(1)}`
|
||||||
|
for (let i = 1; i < pts.length; i++) {
|
||||||
|
const mx = (pts[i-1].x + pts[i].x) / 2
|
||||||
|
pathD += ` C ${mx.toFixed(1)} ${pts[i-1].y.toFixed(1)}, ${mx.toFixed(1)} ${pts[i].y.toFixed(1)}, ${pts[i].x.toFixed(1)} ${pts[i].y.toFixed(1)}`
|
||||||
|
}
|
||||||
|
const areaD = pathD + ` L ${pts[n-1].x.toFixed(1)} ${cy+ch} L ${pts[0].x.toFixed(1)} ${cy+ch} Z`
|
||||||
|
|
||||||
|
let yLabels = ''
|
||||||
|
for (let i = 0; i < 3; i++) {
|
||||||
|
const v = Math.round(maxC * (1 - i/2))
|
||||||
|
const yy = cy + (i/2) * ch
|
||||||
|
yLabels += `<text x="${cx-6}" y="${yy+4}" text-anchor="end" font-family="${font}" font-size="9" fill="${t.text_secondary}">${v}</text><line x1="${cx}" y1="${yy}" x2="${cx+cw}" y2="${yy}" stroke="${t.grid}" stroke-width="0.5" stroke-dasharray="3,3"/>`
|
||||||
|
}
|
||||||
|
|
||||||
|
let xLabels = ''
|
||||||
|
const li = n > 2 ? [0, Math.floor(n/2), n-1] : Array.from({length: n}, (_, i) => i)
|
||||||
|
for (const idx of li) {
|
||||||
|
if (idx < weeks.length) {
|
||||||
|
const px = cx + (idx / Math.max(n-1,1)) * cw
|
||||||
|
xLabels += `<text x="${px.toFixed(1)}" y="${cy+ch+14}" text-anchor="middle" font-family="${font}" font-size="9" fill="${t.text_secondary}">${weeks[idx].week_start.slice(0,7)}</text>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const total = weeks.reduce((a, w) => a + w.commits, 0)
|
||||||
|
const sy = cy + ch + 46
|
||||||
|
const inner = `<defs><linearGradient id="areaGrad" x1="0" y1="${cy}" x2="0" y2="${cy+ch}" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="${lineColor}" stop-opacity="0.35"/><stop offset="100%" stop-color="${lineColor}" stop-opacity="0.02"/></linearGradient></defs>
|
||||||
|
${yLabels}${xLabels}
|
||||||
|
<path d="${areaD}" fill="url(#areaGrad)"/>
|
||||||
|
<path d="${pathD}" fill="none" stroke="${lineColor}" stroke-width="2" stroke-linecap="round"/>
|
||||||
|
<g transform="translate(20, ${sy})"><text x="0" y="0" font-family="${font}" font-size="13" font-weight="700" fill="${t.text}">${total.toLocaleString()}</text><text x="0" y="14" font-family="${font}" font-size="9" fill="${t.text_secondary}">commits over 6mo</text></g>`
|
||||||
|
|
||||||
|
return cardWrapper(inner, w, h, t, 'Impact Timeline')
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderCollaborators(collabs: CollaboratorData[], t: Theme, s?: { max_count?: number; bar_color?: string }): string {
|
||||||
|
const maxCount = Math.min(Math.max(s?.max_count ?? 5, 1), 10)
|
||||||
|
const barColor = s?.bar_color ?? t.purple
|
||||||
|
const shown = collabs.slice(0, maxCount)
|
||||||
|
const barMax = Math.max(...shown.map(c => c.shared_commits), 1)
|
||||||
|
let items = ''
|
||||||
|
|
||||||
|
for (let i = 0; i < shown.length; i++) {
|
||||||
|
const c = shown[i], y = i * 50
|
||||||
|
const hue = [...c.username].reduce((h, ch) => h + ch.charCodeAt(0), 0) % 360
|
||||||
|
const avatar = `<circle cx="0" cy="0" r="18" fill="hsl(${hue}, 50%, 40%)"/><text x="0" y="1" text-anchor="middle" dominant-baseline="middle" font-family="${font}" font-size="14" font-weight="600" fill="white">${esc(c.username[0].toUpperCase())}</text>`
|
||||||
|
const bw = (c.shared_commits / barMax * 120).toFixed(1)
|
||||||
|
items += `<g transform="translate(36, ${y+20})">${avatar}<text x="28" y="-2" font-family="${font}" font-size="13" font-weight="600" fill="${t.text}">${esc(c.username)}</text><text x="28" y="14" font-family="${font}" font-size="10" fill="${t.text_secondary}">${c.shared_repos} repos · ${c.shared_commits} commits</text><rect x="200" y="-6" width="130" height="8" rx="4" fill="${t.grid}"/><rect x="200" y="-6" width="${bw}" height="8" rx="4" fill="${barColor}" opacity="0.8"/></g>`
|
||||||
|
}
|
||||||
|
|
||||||
|
return cardWrapper(items, 380, shown.length * 50 + 48, t, 'Top Collaborators')
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderFocus(cats: FocusCategory[], t: Theme, s?: { max_categories?: number }): string {
|
||||||
|
const maxCats = Math.min(Math.max(s?.max_categories ?? 6, 1), 10)
|
||||||
|
const sorted = [...cats].sort((a, b) => b.percentage - a.percentage).slice(0, maxCats)
|
||||||
|
if (!sorted.length) return ''
|
||||||
|
|
||||||
|
const maxPct = Math.max(sorted[0].percentage, 1)
|
||||||
|
const barMaxW = 210
|
||||||
|
let items = ''
|
||||||
|
|
||||||
|
for (let i = 0; i < sorted.length; i++) {
|
||||||
|
const cat = sorted[i], y = i * 36
|
||||||
|
const color = FOCUS_COLORS[i % FOCUS_COLORS.length]
|
||||||
|
const bw = (cat.percentage / maxPct * barMaxW).toFixed(1)
|
||||||
|
items += `<g transform="translate(16, ${y})"><text x="0" y="14" font-family="${font}" font-size="12" font-weight="600" fill="${t.text}">${esc(cat.category)}</text><rect x="90" y="4" width="${barMaxW}" height="14" rx="7" fill="${t.grid}"/><rect x="90" y="4" width="${bw}" height="14" rx="7" fill="${color}" opacity="0.8"/><text x="90" y="32" font-family="${font}" font-size="9" fill="${t.text_secondary}">${cat.commit_count} commits</text><text x="${90+barMaxW+8}" y="15" font-family="${font}" font-size="12" font-weight="700" fill="${color}">${Math.round(cat.percentage)}%</text></g>`
|
||||||
|
}
|
||||||
|
|
||||||
|
const subY = sorted.length * 36 + 8
|
||||||
|
items += `<text x="16" y="${subY}" font-family="${font}" font-size="9" fill="${t.text_secondary}" opacity="0.7">Recent activity · last year</text>`
|
||||||
|
|
||||||
|
return cardWrapper(items, 380, sorted.length * 36 + 54, t, 'Recent Focus')
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderLanguages(languages: LanguageData[], t: Theme, s?: { max_languages?: number }): string {
|
||||||
|
const maxLangs = Math.min(Math.max(s?.max_languages ?? 5, 1), 10)
|
||||||
|
const topLangs = [...languages].sort((a, b) => b.percentage - a.percentage).slice(0, maxLangs)
|
||||||
|
if (!topLangs.length) return ''
|
||||||
|
|
||||||
|
const totalPct = topLangs.reduce((a, l) => a + l.percentage, 0)
|
||||||
|
const langs = [...topLangs]
|
||||||
|
|
||||||
|
if (totalPct < 99.9 && languages.length > maxLangs) {
|
||||||
|
langs.push({ language: 'Other', percentage: Math.round((100 - totalPct) * 10) / 10, loc: 0 })
|
||||||
|
} else if (totalPct < 99.9 && totalPct > 0) {
|
||||||
|
const f = 100 / totalPct
|
||||||
|
for (const l of langs) l.percentage = Math.round(l.percentage * f * 10) / 10
|
||||||
|
}
|
||||||
|
|
||||||
|
const legendStart = 20, legendH = langs.length * 22
|
||||||
|
const ccy = legendStart + legendH / 2, ccx = 60, r = 44, innerR = 28
|
||||||
|
const circ = 2 * Math.PI * r
|
||||||
|
|
||||||
|
let arcs = '', legend = '', offset = 0
|
||||||
|
for (let i = 0; i < langs.length; i++) {
|
||||||
|
const lang = langs[i]
|
||||||
|
const color = lang.language === 'Other' ? t.text_secondary : (LANG_COLORS[lang.language] ?? FOCUS_COLORS[i % FOCUS_COLORS.length])
|
||||||
|
const dash = circ * lang.percentage / 100
|
||||||
|
const gap = circ - dash
|
||||||
|
arcs += `<circle cx="${ccx}" cy="${ccy}" r="${r}" fill="none" stroke="${color}" stroke-width="16" stroke-dasharray="${dash.toFixed(1)} ${gap.toFixed(1)}" stroke-dashoffset="${(-offset).toFixed(1)}" transform="rotate(-90 ${ccx} ${ccy})" opacity="0.85"/>`
|
||||||
|
offset += dash
|
||||||
|
|
||||||
|
const ly = i * 22
|
||||||
|
legend += `<g transform="translate(140, ${ly + legendStart})"><rect width="10" height="10" rx="2" fill="${color}"/><text x="16" y="9" font-family="${font}" font-size="12" fill="${t.text}">${esc(lang.language)}</text><text x="210" y="9" text-anchor="end" font-family="${font}" font-size="11" font-weight="600" fill="${t.text_secondary}">${Math.round(lang.percentage)}%</text></g>`
|
||||||
|
}
|
||||||
|
|
||||||
|
const center = `<circle cx="${ccx}" cy="${ccy}" r="${innerR}" fill="${t.card_bg}"/><text x="${ccx}" y="${ccy+1}" text-anchor="middle" dominant-baseline="middle" font-family="${font}" font-size="11" font-weight="700" fill="${t.text}">${esc(langs[0].language)}</text>`
|
||||||
|
const inner = `<g transform="translate(16, 0)">${arcs}${center}${legend}</g>`
|
||||||
|
const rowsH = Math.max(langs.length * 22 + 40, 120)
|
||||||
|
return cardWrapper(inner, 380, rowsH + 36, t, 'Languages')
|
||||||
|
}
|
||||||
|
|
||||||
|
const STREAK_MONTHS = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
|
||||||
|
const STREAK_COLOR_RE = /^#[0-9a-fA-F]{3,8}$/
|
||||||
|
|
||||||
|
function streaksSafeColor(value: string | undefined, fallback: string): string {
|
||||||
|
if (typeof value !== 'string' || value.length > 32) return fallback
|
||||||
|
return STREAK_COLOR_RE.test(value) ? value : fallback
|
||||||
|
}
|
||||||
|
|
||||||
|
function streakParseDate(iso?: string): { y: number; m: number; d: number } | null {
|
||||||
|
if (!iso) return null
|
||||||
|
const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(iso)
|
||||||
|
if (!m) return null
|
||||||
|
const y = Number(m[1]), mo = Number(m[2]), d = Number(m[3])
|
||||||
|
if (!y || mo < 1 || mo > 12 || d < 1 || d > 31) return null
|
||||||
|
return { y, m: mo, d }
|
||||||
|
}
|
||||||
|
function streakFmtDay(dt: { y: number; m: number; d: number }, includeYear: boolean): string {
|
||||||
|
return includeYear ? `${STREAK_MONTHS[dt.m-1]} ${dt.d}, ${dt.y}` : `${STREAK_MONTHS[dt.m-1]} ${dt.d}`
|
||||||
|
}
|
||||||
|
function fmtStreakCurrent(startIso?: string, todayIso?: string): string {
|
||||||
|
const s = streakParseDate(startIso); if (!s) return ''
|
||||||
|
const t = streakParseDate(todayIso) ?? { y: new Date().getFullYear(), m: 1, d: 1 }
|
||||||
|
return `${streakFmtDay(s, s.y !== t.y)} – Today`
|
||||||
|
}
|
||||||
|
function fmtStreakLongest(startIso?: string, endIso?: string): string {
|
||||||
|
const s = streakParseDate(startIso), e = streakParseDate(endIso)
|
||||||
|
if (s && e) {
|
||||||
|
if (s.y === e.y) return `${streakFmtDay(s, false)} – ${streakFmtDay(e, true)}`
|
||||||
|
return `${streakFmtDay(s, true)} – ${streakFmtDay(e, true)}`
|
||||||
|
}
|
||||||
|
if (e) return streakFmtDay(e, true)
|
||||||
|
if (s) return streakFmtDay(s, true)
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderStreaks(data: StreakData, t: Theme, s?: { color?: string }): string {
|
||||||
|
const width = 380, height = 170
|
||||||
|
const currentColor = streaksSafeColor(s?.color, t.accent)
|
||||||
|
const maxColor = t.text
|
||||||
|
|
||||||
|
const leftX = 105, rightX = 275, dividerX = 190
|
||||||
|
const barX = 50, barW = 280
|
||||||
|
const fraction = data.max > 0 ? Math.max(0, Math.min(1, data.current / data.max)) : 0
|
||||||
|
const fillW = +(barW * fraction).toFixed(2)
|
||||||
|
|
||||||
|
const currentCaption = data.current > 0
|
||||||
|
? fmtStreakCurrent(data.current_start, data.last_active_date)
|
||||||
|
: ''
|
||||||
|
const longestCaption = fmtStreakLongest(data.max_start, data.max_end)
|
||||||
|
|
||||||
|
const endDot = fillW > 0
|
||||||
|
? `<circle cx="${(barX + fillW).toFixed(2)}" cy="94.5" r="3.5" fill="${currentColor}"/>`
|
||||||
|
: ''
|
||||||
|
|
||||||
|
const inner = `
|
||||||
|
<text x="${leftX}" y="22" text-anchor="middle" font-family="${font}" font-size="10" font-weight="600" letter-spacing="1.4" fill="${t.text_secondary}">CURRENT</text>
|
||||||
|
<text x="${leftX}" y="66" text-anchor="middle" font-family="${font}" font-size="40" font-weight="800" fill="${currentColor}">${data.current}</text>
|
||||||
|
|
||||||
|
<text x="${rightX}" y="22" text-anchor="middle" font-family="${font}" font-size="10" font-weight="600" letter-spacing="1.4" fill="${t.text_secondary}">LONGEST</text>
|
||||||
|
<text x="${rightX}" y="66" text-anchor="middle" font-family="${font}" font-size="40" font-weight="800" fill="${maxColor}">${data.max}</text>
|
||||||
|
|
||||||
|
<line x1="${dividerX}" y1="10" x2="${dividerX}" y2="76" stroke="${t.card_border}" stroke-width="1"/>
|
||||||
|
|
||||||
|
<rect x="${barX}" y="92" width="${barW}" height="5" rx="2.5" fill="${t.grid}"/>
|
||||||
|
<rect x="${barX}" y="92" width="${fillW}" height="5" rx="2.5" fill="${currentColor}"/>
|
||||||
|
${endDot}
|
||||||
|
|
||||||
|
<text x="${barX}" y="116" font-family="${font}" font-size="10" fill="${t.text_secondary}">${esc(currentCaption)}</text>
|
||||||
|
<text x="${barX + barW}" y="116" text-anchor="end" font-family="${font}" font-size="10" fill="${t.text_secondary}">${esc(longestCaption)}</text>`
|
||||||
|
|
||||||
|
return cardWrapper(inner, width, height, t, 'Streaks')
|
||||||
|
}
|
||||||
|
|
||||||
|
function achievementIconSvg(iconType: string, color: string): string {
|
||||||
|
// Mirrors generator/src/widgets/achievements.py::_achievement_icon_svg so
|
||||||
|
// the Workshop client preview matches the backend-rendered composite.
|
||||||
|
const icons: Record<string, string> = {
|
||||||
|
trophy: `<svg viewBox="0 0 24 24" width="24" height="24"><path d="M7 2h10v2h2.5c.8 0 1.5.7 1.5 1.5V8c0 1.7-1.3 3-3 3h-.5c-.5 1.5-1.8 2.7-3.5 3v2.5h3c.6 0 1 .4 1 1s-.4 1-1 1H7c-.6 0-1-.4-1-1s.4-1 1-1h3V14c-1.7-.3-3-1.5-3.5-3H6c-1.7 0-3-1.3-3-3V5.5C3 4.7 3.7 4 4.5 4H7V2zm0 4H4.5v2c0 .8.7 1.5 1.5 1.5h1V6zm12.5 0H17v3.5h1c.8 0 1.5-.7 1.5-1.5V6z" fill="${color}" opacity="0.85"/></svg>`,
|
||||||
|
medal: `<svg viewBox="0 0 24 24" width="24" height="24"><circle cx="12" cy="14" r="5" fill="${color}" opacity="0.2"/><circle cx="12" cy="14" r="4" fill="none" stroke="${color}" stroke-width="1.5"/><path d="M12 11.5l1 2 2.2.3-1.6 1.5.4 2.2-2-1-2 1 .4-2.2-1.6-1.5 2.2-.3z" fill="${color}"/><path d="M9 3l3 8m0-8l3 8m-6-8h6" stroke="${color}" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>`,
|
||||||
|
star: `<svg viewBox="0 0 24 24" width="24" height="24"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" fill="none" stroke="${color}" stroke-width="1.5" stroke-linejoin="round"/></svg>`,
|
||||||
|
hackathon: `<svg viewBox="0 0 24 24" width="24" height="24"><rect x="4" y="5" width="16" height="11" rx="1" fill="none" stroke="${color}" stroke-width="1.5"/><rect x="3" y="16" width="18" height="1.5" rx="0.5" fill="${color}" opacity="0.85"/><path d="M9 9l-2 3 2 3m6-6l2 3-2 3" stroke="${color}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>`,
|
||||||
|
}
|
||||||
|
return icons[iconType] ?? icons.trophy
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderAchievements(achievements: AchievementInput[], t: Theme, s?: { max_items?: number }): string {
|
||||||
|
const maxItems = Math.min(Math.max(s?.max_items ?? 5, 1), 10)
|
||||||
|
const shown = achievements.filter(a => a.title.trim()).slice(0, maxItems)
|
||||||
|
if (!shown.length) return ''
|
||||||
|
|
||||||
|
const accentColors = [t.orange, t.green, t.accent, t.purple, t.pink]
|
||||||
|
let items = ''
|
||||||
|
|
||||||
|
for (let i = 0; i < shown.length; i++) {
|
||||||
|
const ach = shown[i], y = i * 56
|
||||||
|
const color = accentColors[i % accentColors.length]
|
||||||
|
const icon = achievementIconSvg(ach.icon, color)
|
||||||
|
items += `<g transform="translate(16, ${y+8})"><rect width="348" height="48" rx="8" fill="${color}" opacity="0.06"/><rect width="348" height="48" rx="8" fill="none" stroke="${color}" stroke-width="0.5" opacity="0.3"/><g transform="translate(12, 12)">${icon}</g><text x="48" y="20" font-family="${font}" font-size="13" font-weight="600" fill="${t.text}">${esc(ach.title)}</text><text x="48" y="36" font-family="${font}" font-size="10" fill="${t.text_secondary}">${esc(ach.subtitle)}${ach.event_date ? ' · ' + ach.event_date : ''}</text></g>`
|
||||||
|
}
|
||||||
|
|
||||||
|
return cardWrapper(items, 380, shown.length * 56 + 50, t, 'Achievements')
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Composite ---
|
||||||
|
|
||||||
|
function extractInner(svg: string, key: string): { inner: string; h: number } {
|
||||||
|
const hm = svg.match(/height="(\d+)"/)
|
||||||
|
const h = hm ? parseInt(hm[1]) : 160
|
||||||
|
|
||||||
|
// Prefix IDs
|
||||||
|
const ids = [...svg.matchAll(/id="([^"]+)"/g)].map(m => m[1])
|
||||||
|
let inner = svg
|
||||||
|
for (const id of ids) {
|
||||||
|
const nid = `${key}_${id}`
|
||||||
|
inner = inner.replaceAll(`id="${id}"`, `id="${nid}"`)
|
||||||
|
inner = inner.replaceAll(`url(#${id})`, `url(#${nid})`)
|
||||||
|
inner = inner.replaceAll(`href="#${id}"`, `href="#${nid}"`)
|
||||||
|
}
|
||||||
|
inner = inner.replace(/<svg[^>]*>/, '').replace(/<\/svg>\s*$/, '')
|
||||||
|
return { inner, h }
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Main export ---
|
||||||
|
|
||||||
|
export function renderAllWidgets(opts: {
|
||||||
|
data: WidgetData
|
||||||
|
theme: string
|
||||||
|
widgets: string[]
|
||||||
|
widgetOrder: string[]
|
||||||
|
achievements: AchievementInput[]
|
||||||
|
widgetSettings: PerWidgetSettings
|
||||||
|
hiddenLanguages?: string[]
|
||||||
|
username: string
|
||||||
|
}): string {
|
||||||
|
const t = THEMES[opts.theme] ?? THEMES.dark
|
||||||
|
const enabled = new Set(opts.widgets)
|
||||||
|
const widgetSvgs: Record<string, string> = {}
|
||||||
|
|
||||||
|
if (enabled.has('grade') && opts.data.grade)
|
||||||
|
widgetSvgs.grade = renderGrade(opts.data.grade, t, opts.widgetSettings.grade)
|
||||||
|
if (enabled.has('impact') && opts.data.impact)
|
||||||
|
widgetSvgs.impact = renderImpact(opts.data.impact, t, opts.widgetSettings.impact)
|
||||||
|
if (enabled.has('streaks') && opts.data.streaks)
|
||||||
|
widgetSvgs.streaks = renderStreaks(opts.data.streaks, t, opts.widgetSettings.streaks)
|
||||||
|
if (enabled.has('collaborators') && opts.data.collaborators)
|
||||||
|
widgetSvgs.collaborators = renderCollaborators(opts.data.collaborators, t, opts.widgetSettings.collaborators)
|
||||||
|
if (enabled.has('focus') && opts.data.focus)
|
||||||
|
widgetSvgs.focus = renderFocus(opts.data.focus, t, opts.widgetSettings.focus)
|
||||||
|
if (enabled.has('languages') && opts.data.languages) {
|
||||||
|
// Apply hidden_languages client-side too so the Workshop preview reflects
|
||||||
|
// the user's choice instantly — backend filtering only kicks in on the
|
||||||
|
// next prefetch or on POST /generate.
|
||||||
|
const hiddenSet = new Set(opts.hiddenLanguages ?? [])
|
||||||
|
const filtered = opts.data.languages.filter(l => !hiddenSet.has(l.language))
|
||||||
|
const total = filtered.reduce((a, l) => a + l.percentage, 0) || 1
|
||||||
|
const rescaled = filtered.map(l => ({ ...l, percentage: Math.round(l.percentage / total * 1000) / 10 }))
|
||||||
|
widgetSvgs.languages = renderLanguages(rescaled, t, opts.widgetSettings.languages)
|
||||||
|
}
|
||||||
|
if (enabled.has('achievements'))
|
||||||
|
widgetSvgs.achievements = renderAchievements(opts.achievements, t, opts.widgetSettings.achievements)
|
||||||
|
|
||||||
|
// Compose
|
||||||
|
const showName = enabled.has('name')
|
||||||
|
const totalW = 420, headerH = showName ? 60 : 0, padding = 20, gap = 16
|
||||||
|
// "name" is a pseudo-widget — it controls the header, not a rendered svg.
|
||||||
|
const ordered = opts.widgetOrder.filter(k => k !== 'name' && enabled.has(k) && widgetSvgs[k])
|
||||||
|
|
||||||
|
const parts = ordered.map(key => {
|
||||||
|
const { inner, h } = extractInner(widgetSvgs[key], key)
|
||||||
|
return { key, inner, h }
|
||||||
|
})
|
||||||
|
|
||||||
|
const contentH = parts.reduce((a, p) => a + p.h, 0) + gap * Math.max(parts.length - 1, 0)
|
||||||
|
const totalH = headerH + contentH + padding * 2 + 10
|
||||||
|
|
||||||
|
// Header (avatar + username). Only drawn when "name" is enabled. The
|
||||||
|
// avatar pulls from github.com/<user>.png which redirects to
|
||||||
|
// avatars.githubusercontent.com; the accent circle underneath is a
|
||||||
|
// fallback for missing users / slow loads.
|
||||||
|
let header = ''
|
||||||
|
if (showName) {
|
||||||
|
const avatarUrl = opts.username
|
||||||
|
? `https://github.com/${encodeURIComponent(opts.username)}.png?size=64`
|
||||||
|
: ''
|
||||||
|
const avatarImg = avatarUrl
|
||||||
|
? `<image x="14" y="14" width="32" height="32" href="${esc(avatarUrl)}" clip-path="url(#mainAvatarClip)" preserveAspectRatio="xMidYMid slice"/>`
|
||||||
|
: ''
|
||||||
|
const avatar = `<defs><clipPath id="mainAvatarClip"><circle cx="30" cy="30" r="16"/></clipPath></defs><circle cx="30" cy="30" r="16" fill="${t.accent}" opacity="0.3"/>${avatarImg}`
|
||||||
|
header = `${avatar}<text x="54" y="38" font-family="${font}" font-size="16" font-weight="700" fill="${t.text}">${esc(opts.username || 'Developer')}</text><line x1="${padding}" y1="${headerH}" x2="${totalW-padding}" y2="${headerH}" stroke="${t.card_border}" stroke-width="0.5"/>`
|
||||||
|
}
|
||||||
|
|
||||||
|
let yOffset = headerH + padding
|
||||||
|
let embedded = ''
|
||||||
|
for (const { inner, h } of parts) {
|
||||||
|
embedded += `<svg x="${padding}" y="${yOffset}" width="380" height="${h}" viewBox="0 0 380 ${h}">${inner}</svg>`
|
||||||
|
yOffset += h + gap
|
||||||
|
}
|
||||||
|
|
||||||
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${totalW}" height="${totalH}" viewBox="0 0 ${totalW} ${totalH}">
|
||||||
|
<rect width="${totalW}" height="${totalH}" rx="16" fill="${t.bg}"/>
|
||||||
|
<rect x="0.5" y="0.5" width="${totalW-1}" height="${totalH-1}" rx="16" fill="none" stroke="${t.card_border}" stroke-width="1"/>
|
||||||
|
${header}${embedded}
|
||||||
|
<text x="${totalW/2}" y="${totalH-8}" text-anchor="middle" font-family="${font}" font-size="9" fill="${t.text_secondary}" opacity="0.5">Generated with gh-stats.com</text>
|
||||||
|
</svg>`
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
// Settings ⇄ query-string encoder for the public widget embed URL.
|
||||||
|
//
|
||||||
|
// The backend's `GET /api/<u>?...` accepts the same fields that
|
||||||
|
// `PATCH /settings` takes, but encoded flat in the query. The encoding is
|
||||||
|
// designed to stay human-readable for the common cases (theme, widgets,
|
||||||
|
// order) and fall back to compact base64 only for achievements, which are
|
||||||
|
// shape-y enough that spelling them out inflates the URL.
|
||||||
|
//
|
||||||
|
// Keep this in sync with `sanitize_settings_query` in `generator/src/api.py`.
|
||||||
|
|
||||||
|
import type { WidgetSettings, Achievement } from '../App'
|
||||||
|
|
||||||
|
// The theme id the backend treats as the default. Omit from the URL so
|
||||||
|
// the common case stays terse.
|
||||||
|
const DEFAULT_THEME = 'midnight'
|
||||||
|
|
||||||
|
// Standard widget set / order. If the user hasn't deviated, skip emitting
|
||||||
|
// the param so the embed URL doesn't balloon with boilerplate.
|
||||||
|
const DEFAULT_WIDGETS = ['name', 'grade', 'impact', 'streaks', 'collaborators', 'focus', 'languages']
|
||||||
|
const DEFAULT_ORDER = ['name', 'grade', 'impact', 'streaks', 'collaborators', 'focus', 'languages', 'achievements']
|
||||||
|
|
||||||
|
function arrayEquals(a: string[], b: string[]): boolean {
|
||||||
|
if (a.length !== b.length) return false
|
||||||
|
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// RFC-4648 url-safe base64 without padding. Matches what Python's
|
||||||
|
// `base64.urlsafe_b64decode` re-pads in the backend parser.
|
||||||
|
function urlsafeB64Encode(s: string): string {
|
||||||
|
const bytes = new TextEncoder().encode(s)
|
||||||
|
let bin = ''
|
||||||
|
for (const b of bytes) bin += String.fromCharCode(b)
|
||||||
|
return btoa(bin).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
|
function achievementsParam(achievements: Achievement[]): string | null {
|
||||||
|
const keepers = achievements.filter(a => (a.title || '').trim())
|
||||||
|
if (!keepers.length) return null
|
||||||
|
const payload = keepers.map(a => ({
|
||||||
|
title: a.title,
|
||||||
|
subtitle: a.subtitle,
|
||||||
|
event_date: a.event_date,
|
||||||
|
icon: a.icon,
|
||||||
|
}))
|
||||||
|
return urlsafeB64Encode(JSON.stringify(payload))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function settingsToQuery(settings: WidgetSettings): string {
|
||||||
|
const params = new URLSearchParams()
|
||||||
|
|
||||||
|
if (settings.theme && settings.theme !== DEFAULT_THEME) {
|
||||||
|
params.set('theme', settings.theme)
|
||||||
|
}
|
||||||
|
if (!arrayEquals(settings.widgets, DEFAULT_WIDGETS)) {
|
||||||
|
params.set('widgets', settings.widgets.join(','))
|
||||||
|
}
|
||||||
|
if (!arrayEquals(settings.widgetOrder, DEFAULT_ORDER)) {
|
||||||
|
params.set('order', settings.widgetOrder.join(','))
|
||||||
|
}
|
||||||
|
if (settings.hiddenLanguages.length) {
|
||||||
|
params.set('hide', settings.hiddenLanguages.join(','))
|
||||||
|
}
|
||||||
|
if (settings.customTags.length) {
|
||||||
|
params.set('tags', settings.customTags.join(','))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Per-widget settings flatten to `<widget>.<key>=<value>`. Any undefined
|
||||||
|
// or null leaf is skipped so the URL stays minimal.
|
||||||
|
for (const [widget, ws] of Object.entries(settings.widgetSettings)) {
|
||||||
|
if (!ws) continue
|
||||||
|
for (const [key, val] of Object.entries(ws as Record<string, unknown>)) {
|
||||||
|
if (val === undefined || val === null || val === '') continue
|
||||||
|
params.set(`${widget}.${key}`, String(val))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const ach = achievementsParam(settings.achievements)
|
||||||
|
if (ach) params.set('ach', ach)
|
||||||
|
|
||||||
|
// URLSearchParams.toString() percent-encodes values (including the `#` in
|
||||||
|
// hex colors), so callers can splice the result straight into a URL.
|
||||||
|
return params.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
export function buildEmbedUrl(origin: string, username: string, settings: WidgetSettings): string {
|
||||||
|
const qs = settingsToQuery(settings)
|
||||||
|
const base = `${origin}/api/${encodeURIComponent(username)}`
|
||||||
|
return qs ? `${base}?${qs}` : base
|
||||||
|
}
|
||||||