2.2 KiB
2.2 KiB
Contributing to contribute.btcpayserver.org
Welcome! This is a simple static React site. Contributing is straightforward.
Quick start
git clone https://github.com/btcpayserver/contribute.btcpayserver.org
cd contribute.btcpayserver.org
npm install
npm run dev # starts at http://localhost:5173
The site loads public/data/issues.json (seed data) so you don't need a GitHub token to develop locally.
Running with live data
ORG_GITHUB_TOKEN=ghp_your_token node scripts/fetch-issues.js
npm run dev
The token needs repo:read scope. Get one at https://github.com/settings/tokens.
Before submitting a PR
npm run typecheck # must pass with zero errors
npm run build # must produce a clean dist/
The PR check workflow runs both automatically.
File conventions
| Pattern | Use for |
|---|---|
PascalCase.tsx |
React components |
useCamelCase.ts |
React hooks |
kebab-case.ts |
Utility/lib files |
| One default export per file | Always |
Adding a new skill or sub-tag
Skills and tags are defined in two places — keep them in sync:
src/lib/skill-map.ts— frontend taxonomy (displayed in UI)scripts/skill-mapper.js— server-side mapping (applied at build time)
Add the new skill/tag to both files, then run node scripts/fetch-issues.js to verify the mapping produces expected output.
Design system
The site mirrors directory.btcpayserver.org. Core design tokens are in src/index.css. The .glass utility class is the primary card style.
Do not add new CSS frameworks or UI libraries — use the existing Tailwind utilities and Radix UI primitives.
Project structure
src/
components/ui/ # Atomic primitives (Button, Badge, Dialog)
components/ # Feature components
hooks/ # useFilters, useIssues, useTheme
lib/ # Pure utilities — no side effects
types/ # TypeScript interfaces
scripts/
fetch-issues.js # GitHub API fetcher (runs in CI)
skill-mapper.js # Issue → skill mapping logic
public/data/
issues.json # Auto-generated by workflow; seed data committed