[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77616":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":29,"discoverSource":30},77616,"gitdeck","debba\u002Fgitdeck","debba","Open-source Git dashboard built for GIthub and Forgejo on REST and GraphQL APIs: repositories, issues, pull requests, traffic, Actions, contributors, dependents, and a kanban board view.","",null,"TypeScript",352,38,2,0,5,8,23,15,4.77,"MIT License",false,"main",true,[],"2026-06-12 02:03:43","# Gitdeck\n\n> The initial scaffolding of this repository was produced in an AI-assisted session with [Claude Code](https:\u002F\u002Fclaude.com\u002Fclaude-code). From here on, code is reviewed and maintained by humans, and contributions are welcome.\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FYrZPHAwMSG\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1470772941296894128?color=5865F2&logo=discord&logoColor=white&label=Discord\" alt=\"Discord\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Frepostars.dev\u002F?repos=debba%2Fgh-dashboard&theme=dark\">\u003Cimg src=\"https:\u002F\u002Frepostars.dev\u002Fapi\u002Fembed?repo=debba%2Fgh-dashboard&theme=dark\" alt=\"RepoStars\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\nAn open-source, local dashboard to explore repositories, issues, pull requests, traffic, and CI activity across multiple accounts on GitHub and Forgejo-compatible forges (Codeberg, self-hosted) — from a single interface.\n\n## Demo\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"public\u002Fdemo.gif\" alt=\"Gitdeck demo\" \u002F>\n\u003C\u002Fdiv>\n\n## What it does\n\nThe dashboard pulls data from the GitHub REST and GraphQL APIs and organizes it into a few different views:\n\n- **Repositories** — paginated grid with description, language, stars, forks, open issues, last push and a per-repo health score. Filter by organization, language, visibility, forks\u002Farchived; sort by stars, recent activity, etc.\n- **Issues \u002F Pull Requests** — cross-repo lists with the same filter sidebar, useful for triage across many projects.\n- **Insights** — overview of all repos with alerts (\"issues need attention\", \"security alerts need attention\", \"no push for X days\"), opportunities, and correlations between traffic and recent activity. Each repo gets a status (Strong \u002F Watch \u002F Risky).\n- **Alerts** — dedicated security-alert view for Dependabot and code scanning findings, so you can jump straight to the repos that need attention.\n- **Daily digest** — short per-repo summary of the day's movement (stars, forks, issues), with an executive summary you can copy as Markdown. Optionally augmented by an OpenAI-generated narrative when `OPENAI_API_KEY` is configured.\n- **Board** — Kanban-style view that groups issues into columns (Backlog, To-do, In progress, Ready, In review, etc.).\n\n### Per-repository view\n\nOpen any repository to see:\n\n- **Overview** — stars, forks, open issues, owner, license, default branch, last push.\n- **Security and quality** — Dependabot and code scanning alert summaries for the repository, with a fallback note when GitHub does not expose the data.\n- **Actions** — recent workflow runs.\n- **PRs** and **Issues** — open and recent items, paginated.\n- **Releases** — release history.\n- **Forks** — list of forks, sortable by most stars or recent push.\n- **Traffic** — views and clones for the last 14 days, unique visitors\u002Fcloners, top referrers, popular paths.\n- **Mentions** — references to the repo found via GitHub code\u002Fissue search, including previous names of the project.\n- **Dependents** — repository relationships, where available.\n- **Languages and trend charts** — language breakdown and stars\u002Fforks history.\n- **Contributors** — paginated list with commit counts.\n\n## Architecture\n\nThe app is a single repository with two cooperating processes:\n\n- **Backend** — a Node HTTP server (`src\u002Fserver.ts` + `src\u002Fserver\u002F*`) that handles GitHub OAuth (Device Flow), proxies all REST\u002FGraphQL calls, caches responses on disk, and exposes a small JSON API under `\u002Fapi\u002F*`. The GitHub token is stored locally under `~\u002F.gitdeck\u002F` and **never exposed to the browser**.\n- **Frontend** — a React 19 + Vite SPA (`src\u002Fmain.tsx`, `src\u002FApp.tsx`, `src\u002Fcomponents\u002F*`, `src\u002Fapi\u002F*`) that consumes the backend's `\u002Fapi\u002F*` endpoints.\n\nIn production both are served by the Node process: Vite builds the SPA into `dist\u002Fclient\u002F` and the server falls back to `index.html` for non-API routes.\n\n### Tech stack\n\n| Layer       | Tech                                           |\n| ----------- | ---------------------------------------------- |\n| Language    | TypeScript                                     |\n| Frontend    | React 19, Vite 8                               |\n| Backend     | Node `http` + `tsx` watch (dev), compiled JS in production |\n| Tests       | Vitest + jsdom                                 |\n| Tooling     | `concurrently`, `tsc`                          |\n\n### Translations\n\nUI translations live in `src\u002Fi18n\u002F`, with one dictionary file per language. See [docs\u002Ftranslations.md](docs\u002Ftranslations.md) for the workflow to edit text or add another language.\n\n## Prerequisites\n\n- **Node.js 20+** (anything that supports native `fetch` and ESM is fine).\n- A **GitHub OAuth App** with **Device Flow enabled** (see next section).\n- (Optional) An **OpenAI API key** if you want AI-generated daily digest summaries.\n\n## Configure GitHub\n\nThe dashboard talks to GitHub using a personal **OAuth App** with the **Device Authorization Flow**. This means you keep ownership of the credentials and there is no client secret to manage. You only have to do this once.\n\n### 1. Create the OAuth App\n\n1. Go to \u003Chttps:\u002F\u002Fgithub.com\u002Fsettings\u002Fdevelopers> → **OAuth Apps** → **New OAuth App**.\n   (For an org-owned app, use **Settings → Developer settings → OAuth Apps** on the organization instead.)\n2. Fill in the form:\n   - **Application name** — anything, e.g. `Gitdeck (local)`.\n   - **Homepage URL** — `http:\u002F\u002F127.0.0.1:8765` (or any URL you control; this is informational).\n   - **Authorization callback URL** — `http:\u002F\u002F127.0.0.1:8765` will do. Device Flow does not actually use a redirect, but GitHub requires the field.\n3. Click **Register application**.\n\n### 2. Enable Device Flow\n\nOn the OAuth App's settings page, tick **Enable Device Flow** and **Update application**. This is required — without it, sign-in will fail with `unsupported_grant_type`.\n\n### 3. Copy the Client ID\n\nYou only need the **Client ID** (it looks like `Iv1.xxxxxxxxxxxxxxxx` or `Ov23li...`). **Do not** generate a client secret — Device Flow does not use one, and the dashboard never reads it.\n\n### 4. Export it before starting the server\n\n```bash\nexport GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxxxxx\n```\n\nYou can also put it in a `.env` file or your shell profile. The server reads `process.env.GITHUB_CLIENT_ID` at startup and will refuse to start the OAuth flow without it.\n\n### 5. Sign in from the UI\n\nWhen you open the dashboard for the first time, it will:\n\n1. call the backend, which asks GitHub for a **device code**;\n2. show you a short **user code** and a verification URL (typically \u003Chttps:\u002F\u002Fgithub.com\u002Flogin\u002Fdevice>);\n3. you paste the code on GitHub and approve the requested scopes;\n4. the backend exchanges the device code for an access token and stores it in `~\u002F.gitdeck\u002F` — **the token never reaches the browser**.\n\nGranted scopes default to `repo read:org project read:user user:email`. To narrow them, set `GITHUB_OAUTH_SCOPES` (see [Configuration](#configuration)). If you ever want to revoke access, remove the app from \u003Chttps:\u002F\u002Fgithub.com\u002Fsettings\u002Fapplications> and delete the local token file under `~\u002F.gitdeck\u002F`.\n\n## Configuration\n\nThe server reads its configuration from environment variables:\n\n| Variable               | Required | Default                                        | Purpose                                          |\n| ---------------------- | -------- | ---------------------------------------------- | ------------------------------------------------ |\n| `GH_AUTH_MODE`         | no       | `device`                                       | Auth source: `device` (OAuth Device Flow), `gh-cli` (reuse local `gh` CLI), or `token` (use `GITHUB_TOKEN`). Aliases accepted: `GITHUB_AUTH_MODE`, `GITHUB_MODE`. |\n| `GITHUB_CLIENT_ID`     | only `device` | —                                         | Client ID of your GitHub OAuth App (Device Flow) |\n| `GITHUB_OAUTH_SCOPES`  | no       | `repo read:org project read:user user:email`   | OAuth scopes requested at sign-in (Device Flow)  |\n| `GITHUB_TOKEN`         | only `token` | —                                          | Personal access token used when `GH_AUTH_MODE=token` |\n| `HOST`                 | no       | `127.0.0.1`                                    | Interface the server binds to                    |\n| `PORT`                 | no       | `8765`                                         | Port the server listens on                       |\n| `OPENAI_API_KEY`       | no       | —                                              | Enables AI-generated daily digest narratives     |\n| `OPENAI_DIGEST_MODEL`  | no       | `gpt-4.1-mini`                                 | Model used for digest narratives                 |\n\n### Authentication modes\n\nThe dashboard can obtain a GitHub token in three different ways. Pick the one that fits your setup:\n\n- **`device` (default)** — OAuth App + Device Flow, as described above. The token is stored under `~\u002F.gitdeck\u002F` and refreshed via the in-app sign-in screen. Requires `GITHUB_CLIENT_ID`.\n- **`gh-cli`** — if you already use the [GitHub CLI](https:\u002F\u002Fcli.github.com\u002F), set `GH_AUTH_MODE=gh-cli` and the server will read the token by running `gh auth token` on each request (cached in-process for 60s). No OAuth App is needed; the scopes are whatever your `gh` session already has. Run `gh auth refresh -h github.com -s repo,read:org,project` if you need extra scopes.\n- **`token`** — bring-your-own personal access token. Set `GH_AUTH_MODE=token` and export `GITHUB_TOKEN=\u003Cyour-pat>`. Useful for headless \u002F CI-style deployments.\n\nIn `gh-cli` and `token` modes the device-flow sign-in screen is hidden; the server treats the configured source as authoritative.\n\nTokens and snapshots are persisted under `~\u002F.gitdeck\u002F`. If you previously ran an older build that stored data in `~\u002F.gh-issues-dashboard\u002F`, the server migrates it automatically on first start.\n\n### Quick env setup\n\n```bash\nexport GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxxxxx\n# optional\nexport OPENAI_API_KEY=sk-...\n```\n\n## Install\n\n```bash\nnpm install\n```\n\n## Run in development\n\nStarts the API server (with file-watch reload) and the Vite dev server in parallel. The Vite dev server proxies `\u002Fapi` to the backend on port `8765`.\n\n```bash\nnpm run dev\n```\n\nThen open \u003Chttp:\u002F\u002F127.0.0.1:5173>. On first launch the UI will walk you through the GitHub Device Flow sign-in.\n\nIf you only want one of the two processes:\n\n```bash\nnpm run api    # backend only, on http:\u002F\u002F127.0.0.1:8765\n```\n\n## Build\n\nType-checks the server, compiles it to `dist\u002F`, and produces the production frontend bundle under `dist\u002Fclient\u002F`:\n\n```bash\nnpm run build\n```\n\n## Run the production build\n\nAfter `npm run build`, the Node server can serve both the API and the built SPA from a single port:\n\n```bash\nnpm start\n# or, equivalently\nnpm run serve\n```\n\nThen open \u003Chttp:\u002F\u002F127.0.0.1:8765>.\n\n`npm run preview` is also available if you want to preview only the static frontend through Vite (no backend).\n\n## Run with Docker\n\nA multi-stage `Dockerfile` and a `docker-compose.yml` are provided. The image builds the server + SPA bundle and runs as a non-root user; tokens and snapshots are persisted to a named volume mounted at `\u002Fhome\u002Fnode\u002F.gitdeck`.\n\nIf you already have an older compose file, make sure the persistent volume is mounted at `\u002Fhome\u002Fnode\u002F.gitdeck` and not the legacy `\u002Fhome\u002Fnode\u002F.gh-issues-dashboard` path, otherwise the login state will not survive restarts.\n\nWith Docker Compose (recommended):\n\n```bash\ncat > .env \u003C\u003C'EOF'\nGITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxxxxx\n# Optional — enables AI-generated daily digest narratives\nOPENAI_API_KEY=sk-...\n# Optional overrides\n# OPENAI_DIGEST_MODEL=gpt-4.1-mini\n# GITHUB_OAUTH_SCOPES=repo read:org project read:user user:email\nEOF\ndocker compose up -d --build\n# open http:\u002F\u002F127.0.0.1:8765\n```\n\nWith plain Docker:\n\n```bash\ndocker build -t gitdeck .\ndocker run -d --name gitdeck \\\n  -p 8765:8765 \\\n  -e GITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxxxxxx \\\n  -e OPENAI_API_KEY=sk-... \\\n  -v gitdeck-data:\u002Fhome\u002Fnode\u002F.gitdeck \\\n  gitdeck\n```\n\nThe container forwards `GITHUB_CLIENT_ID`, `GITHUB_OAUTH_SCOPES`, `OPENAI_API_KEY` and `OPENAI_DIGEST_MODEL` from the host environment (or `.env` with Compose) — see [Configuration](#configuration) for the full list. It sets `HOST=0.0.0.0` so the server is reachable from outside. To wipe the stored token (full logout) remove the volume: `docker volume rm gitdeck-data`.\n\n## Test & type-check\n\n```bash\nnpm test          # vitest run\nnpm run typecheck # tsc --noEmit\n```\n\nTests live under `tests\u002F` and mirror the structure of `src\u002F` (see [AGENTS.md](AGENTS.md)).\n\n## Project layout\n\n```\n.\n├── index.html                 # SPA entrypoint consumed by Vite\n├── src\u002F\n│   ├── main.tsx               # React bootstrap\n│   ├── App.tsx                # Top-level component & routing\n│   ├── api\u002F                   # Browser-side API client (calls \u002Fapi\u002F*)\n│   ├── components\u002F            # UI: views, modals, common, sidebar, top bar\n│   ├── styles\u002F                # CSS modules (tokens, layout, views, modals, …)\n│   ├── server.ts              # Node HTTP server entrypoint\n│   ├── server\u002F                # OAuth, GitHub client, caches, digests, insights\n│   ├── types\u002Fgithub.ts        # Shared TypeScript types\n│   └── utils\u002F                 # Pure logic (covered by unit tests)\n├── tests\u002F                     # Vitest suites mirroring src\u002F\n├── docs\u002F                      # Contributor documentation\n├── public\u002F                    # Static assets (demo media)\n├── vite.config.ts\n├── tsconfig.json              # Frontend TS config\n└── tsconfig.server.json       # Server TS config (build → dist\u002F)\n```\n\n## Status\n\nEarly scaffolding. APIs, modules, and the UI are still being shaped — expect rapid changes. Star the repo and join Discord to follow along.\n\n## Community\n\n- [Discord server](https:\u002F\u002Fdiscord.gg\u002FYrZPHAwMSG) — suggest features, report issues, or just say hi.\n\n## Contributing\n\nBefore opening a PR, please skim [AGENTS.md](AGENTS.md) for the project conventions (English-only identifiers, pure logic in `src\u002Futils\u002F` with mirrored tests, no GitHub tokens on the browser, etc.) and run `npm test` + `npm run build`.\n\n## License\n\nMIT License — see [LICENSE](LICENSE).\n","Gitdeck 是一个开源的 Git 仪表盘，支持通过 REST 和 GraphQL API 接口管理 GitHub 和 Forgejo 上的仓库、问题、拉取请求、流量、Actions、贡献者和依赖项，并提供看板视图。其核心功能包括跨多个账户查看和过滤仓库、问题及拉取请求列表；提供仓库健康评分、安全警报以及每日摘要等功能；并支持通过 Kanban 视图进行项目管理。此外，Gitdeck 还能展示仓库概览、安全与质量报告、工作流运行状态等详细信息。该项目适合需要在一个界面中管理和监控多个 GitHub 或兼容 Forgejo 的代码库的开发者或团队使用。","2026-06-11 03:55:38","CREATED_QUERY"]