Attach to conversations about github-profile-trophy only.
- Type: App (standalone repo, forked from ryo-ma/github-profile-trophy)
- Purpose: Generate GitHub profile trophy SVG badges for README profiles
- Platform: srt-hq-k8s
- Location:
/Users/shaun/repos/github-profile-trophy/ - Repository: https://github.com/suparious/github-profile-trophy
- Upstream: https://github.com/ryo-ma/github-profile-trophy
Runtime: Deno (TypeScript)
Entry Point: main.ts → api/index.ts
Cache: Redis/Valkey for GitHub API response caching
| File | Purpose |
|---|---|
main.ts |
HTTP server entry point |
api/index.ts |
Request handler, routing logic |
src/config/cache.ts |
Redis/Valkey cache provider |
src/card.ts |
SVG trophy card rendering |
src/trophy.ts |
Trophy calculation logic |
deps.ts |
Deno dependencies |
| Dependency | Purpose |
|---|---|
| ingress | External HTTPS access via github-trophies.solidrust.net |
| cert-manager | Automatic SSL certificates (DNS-01) |
| Service | Purpose | Integration |
|---|---|---|
| data/valkey | API response caching | Set ENABLE_REDIS=true, REDIS_HOST, REDIS_PORT |
| observability | Metrics collection | Add ServiceMonitor to k8s/ |
| Endpoint | Purpose | Required |
|---|---|---|
| api.github.com | GitHub user data | Yes |
| valkey.shared-data-layer.svc.cluster.local:6379 | Cache | No |
dependencies:
requires:
core:
- ingress
- cert-manager
services: []
optional:
services:
- data/valkey
- observability
external:
- endpoint: "api.github.com"
purpose: "GitHub API for user stats"
required: true
- endpoint: "valkey.shared-data-layer.svc.cluster.local:6379"
purpose: "Redis-compatible cache"
required: false# Run locally
deno run --allow-net --allow-env --allow-read --allow-write main.ts
# With cache (requires local Redis/Valkey)
ENABLE_REDIS=true REDIS_HOST=localhost REDIS_PORT=6379 \
deno run --allow-net --allow-env --allow-read --allow-write main.ts# Build image
docker build -t github-profile-trophy .
# Run locally
docker run -p 8080:8080 -e GITHUB_TOKEN=ghp_xxx github-profile-trophy
# Build and push to Gitea registry
docker build -t poseidon.hq.solidrust.net:30008/shaun/github-profile-trophy:v1.0.0 .
docker push poseidon.hq.solidrust.net:30008/shaun/github-profile-trophy:v1.0.0Deployed to srt-hq-k8s via FluxCD:
- Manifests:
/Users/shaun/repos/srt-hq-k8s/manifests/apps/github-trophies/ - Image:
poseidon.hq.solidrust.net:30008/shaun/github-profile-trophy - Namespace:
github-trophies
# Force Flux reconciliation
flux reconcile ks github-trophies
# Check deployment status
kubectl get pods -n github-trophies
kubectl logs -n github-trophies -l app=github-trophies- URL: https://github-trophies.solidrust.net
- Internal: github-trophies.github-trophies.svc.cluster.local:8080
- Usage:
?username=suparious- Generate trophies for GitHub user
| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
Yes | GitHub Personal Access Token for API access |
PORT |
No | HTTP port (default: 8080) |
ENABLE_REDIS |
No | Enable caching (true/false) |
REDIS_HOST |
No | Redis/Valkey hostname |
REDIS_PORT |
No | Redis/Valkey port (default: 6379) |
REDIS_USERNAME |
No | Redis auth username (if required) |
REDIS_PASSWORD |
No | Redis auth password (if required) |
| Secret | Namespace | Keys |
|---|---|---|
github-token |
github-trophies |
token |
-
Redis AUTH error with Valkey
- Valkey runs without authentication by default
- Don't set
REDIS_USERNAMEorREDIS_PASSWORDunless auth is enabled - The cache.ts fix conditionally includes auth only when env vars are set
-
GitHub API rate limiting
- Enable Redis caching to reduce API calls
- Verify
GITHUB_TOKENis valid
-
Pod not starting
kubectl describe pod -n github-trophies -l app=github-trophies kubectl logs -n github-trophies -l app=github-trophies
-
Cache not working
# Verify Valkey connectivity kubectl exec -n shared-data-layer deploy/valkey -- redis-cli KEYS "*"
This is a fork with self-hosting modifications:
- Fixed Valkey AUTH issue (empty credentials trigger AUTH)
- Removed Vercel-specific artifacts
- Optimized Dockerfile for production
- Added health endpoint for Kubernetes probes
git remote add upstream https://github.com/ryo-ma/github-profile-trophy.git
git fetch upstream
git merge upstream/master --no-commit
# Resolve conflicts, keeping our modificationsWhen working on this app:
- Complete, production-ready solutions
- Run commands directly (no permission prompts)
- NO workarounds or temp fixes
- Prefer Deno best practices
- Platform:
/Users/shaun/repos/srt-hq-k8s/PLATFORM.md - Main CLAUDE.md:
/Users/shaun/repos/srt-hq-k8s/CLAUDE.md - K8s Manifests:
/Users/shaun/repos/srt-hq-k8s/manifests/apps/github-trophies/ - Upstream Docs: https://github.com/ryo-ma/github-profile-trophy
Version: 1.0 | Updated: 2026-01-23