Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 4b06f6f

Browse files
authored
Merge pull request #18 from pyreon/chore/modernize-tooling
chore: modernize tooling, deps, and CI
2 parents 2cdce65 + 52dd620 commit 4b06f6f

44 files changed

Lines changed: 1426 additions & 131 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,22 @@ updates:
1212
- dependencies
1313
- automated
1414
groups:
15-
# Group minor/patch updates together
15+
fumadocs:
16+
patterns:
17+
- "fumadocs-*"
18+
react:
19+
patterns:
20+
- "react"
21+
- "react-dom"
22+
- "@types/react"
23+
- "@types/react-dom"
24+
tailwind:
25+
patterns:
26+
- "tailwindcss"
27+
- "@tailwindcss/*"
28+
types:
29+
patterns:
30+
- "@types/*"
1631
production:
1732
dependency-type: production
1833
update-types:
@@ -23,7 +38,6 @@ updates:
2338
update-types:
2439
- minor
2540
- patch
26-
# Auto-merge patch updates
2741
commit-message:
2842
prefix: "chore(deps):"
2943

.github/workflows/ci.yml

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,93 +3,88 @@ name: CI
33
on:
44
pull_request:
55
branches: [main]
6-
push:
7-
branches: [main]
6+
# Allow reuse from deploy workflow
7+
workflow_call:
88

99
concurrency:
10-
group: ci-${{ github.ref }}
10+
group: ci-${{ github.head_ref || github.ref }}
1111
cancel-in-progress: true
1212

1313
permissions:
1414
contents: read
1515

1616
jobs:
17-
typecheck:
18-
name: Typecheck
17+
lint:
18+
name: Lint & Format
1919
runs-on: ubuntu-latest
20+
timeout-minutes: 5
2021
steps:
21-
- uses: actions/checkout@v4
22-
23-
- uses: oven-sh/setup-bun@v2
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
2424
with:
2525
bun-version: latest
26+
- run: bun install --frozen-lockfile
27+
- run: bun run lint
2628

27-
- name: Install dependencies
28-
run: bun install --frozen-lockfile
29-
30-
- name: Run typecheck
31-
run: bun run typecheck
32-
33-
lint:
34-
name: Lint
29+
typecheck:
30+
name: Typecheck
3531
runs-on: ubuntu-latest
32+
timeout-minutes: 5
3633
steps:
37-
- uses: actions/checkout@v4
38-
39-
- uses: oven-sh/setup-bun@v2
34+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
4036
with:
4137
bun-version: latest
42-
43-
- name: Install dependencies
44-
run: bun install --frozen-lockfile
45-
46-
- name: Run Biome
47-
run: bun run lint
38+
- run: bun install --frozen-lockfile
39+
- run: bun run typecheck
4840

4941
build:
5042
name: Build
5143
runs-on: ubuntu-latest
52-
needs: [typecheck, lint]
44+
timeout-minutes: 10
45+
needs: [lint, typecheck]
5346
steps:
54-
- uses: actions/checkout@v4
55-
56-
- uses: oven-sh/setup-bun@v2
47+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
5749
with:
5850
bun-version: latest
59-
60-
- name: Install dependencies
61-
run: bun install --frozen-lockfile
62-
51+
- run: bun install --frozen-lockfile
6352
- name: Build static site
6453
run: bun run build
65-
6654
- name: Upload build artifact
6755
if: github.ref == 'refs/heads/main'
68-
uses: actions/upload-pages-artifact@v3
56+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
6957
with:
7058
path: out
7159

72-
security:
73-
name: Security audit
60+
dependency-review:
61+
name: Dependency Review
7462
runs-on: ubuntu-latest
63+
timeout-minutes: 5
64+
if: github.event_name == 'pull_request'
7565
steps:
76-
- uses: actions/checkout@v4
77-
78-
- uses: oven-sh/setup-bun@v2
66+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
67+
- name: Review dependency changes
68+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
7969
with:
80-
bun-version: latest
70+
fail-on-severity: high
71+
deny-licenses: GPL-3.0, AGPL-3.0
8172

82-
- name: Install dependencies
83-
run: bun install --frozen-lockfile
84-
85-
- name: Audit dependencies
86-
run: bun pm audit || true
87-
88-
- name: Check for known vulnerabilities in lockfile
89-
run: |
90-
# Fail on critical/high vulnerabilities
91-
bun pm audit 2>&1 | tee audit-output.txt
92-
if grep -qiE '(critical|high)' audit-output.txt; then
93-
echo "::error::Critical or high severity vulnerabilities found"
94-
exit 1
95-
fi
73+
codeql:
74+
name: CodeQL Analysis
75+
runs-on: ubuntu-latest
76+
timeout-minutes: 10
77+
permissions:
78+
contents: read
79+
security-events: write
80+
steps:
81+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
82+
- name: Initialize CodeQL
83+
uses: github/codeql-action/init@e03543dad62555ecf6606aabe9724fd07e1cd632 # v3.32.6
84+
with:
85+
languages: javascript-typescript
86+
queries: security-and-quality
87+
- name: Run CodeQL analysis
88+
uses: github/codeql-action/analyze@e03543dad62555ecf6606aabe9724fd07e1cd632 # v3.32.6
89+
with:
90+
category: /language:javascript-typescript

.github/workflows/codeql.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: CodeQL Security Analysis
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
84
schedule:
95
# Every Wednesday at 04:00 UTC
106
- cron: "0 4 * * 3"
@@ -17,24 +13,20 @@ jobs:
1713
analyze:
1814
name: Analyze
1915
runs-on: ubuntu-latest
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
language: [javascript-typescript]
24-
16+
timeout-minutes: 10
2517
steps:
26-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2719

2820
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@v3
21+
uses: github/codeql-action/init@e03543dad62555ecf6606aabe9724fd07e1cd632 # v3.32.6
3022
with:
31-
languages: ${{ matrix.language }}
23+
languages: javascript-typescript
3224
queries: security-and-quality
3325

3426
- name: Autobuild
35-
uses: github/codeql-action/autobuild@v3
27+
uses: github/codeql-action/autobuild@e03543dad62555ecf6606aabe9724fd07e1cd632 # v3.32.6
3628

3729
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@v3
30+
uses: github/codeql-action/analyze@e03543dad62555ecf6606aabe9724fd07e1cd632 # v3.32.6
3931
with:
40-
category: "/language:${{ matrix.language }}"
32+
category: /language:javascript-typescript

.github/workflows/dependency-update.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414
update-dependencies:
1515
name: Check for updates
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 10
1718
steps:
18-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1920

20-
- uses: oven-sh/setup-bun@v2
21+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
2122
with:
2223
bun-version: latest
2324

@@ -30,11 +31,14 @@ jobs:
3031
- name: Typecheck with updated deps
3132
run: bun run typecheck
3233

34+
- name: Lint with updated deps
35+
run: bun run lint
36+
3337
- name: Build with updated deps
3438
run: bun run build
3539

3640
- name: Create PR if changes exist
37-
uses: peter-evans/create-pull-request@v7
41+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
3842
with:
3943
token: ${{ secrets.GITHUB_TOKEN }}
4044
commit-message: "chore(deps): update dependencies"
@@ -43,7 +47,7 @@ jobs:
4347
Automated weekly dependency update.
4448
4549
This PR updates all dependencies to their latest compatible versions.
46-
The build and typecheck passed with the updated dependencies.
50+
Typecheck, lint, and build passed with the updated dependencies.
4751
4852
---
4953
_Generated by the dependency-update workflow._

.github/workflows/deploy.yml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,22 @@ permissions:
1515
id-token: write
1616

1717
jobs:
18-
build:
19-
name: Build
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v4
23-
24-
- uses: oven-sh/setup-bun@v2
25-
with:
26-
bun-version: latest
27-
28-
- name: Install dependencies
29-
run: bun install --frozen-lockfile
30-
31-
- name: Typecheck
32-
run: bun run typecheck
33-
34-
- name: Lint
35-
run: bun run lint
36-
37-
- name: Build static site
38-
run: bun run build
39-
40-
- name: Upload Pages artifact
41-
uses: actions/upload-pages-artifact@v3
42-
with:
43-
path: out
18+
ci:
19+
name: CI
20+
uses: ./.github/workflows/ci.yml
21+
permissions:
22+
contents: read
23+
security-events: write
4424

4525
deploy:
4626
name: Deploy
4727
runs-on: ubuntu-latest
48-
needs: build
28+
timeout-minutes: 5
29+
needs: ci
4930
environment:
5031
name: github-pages
5132
url: ${{ steps.deployment.outputs.page_url }}
5233
steps:
5334
- name: Deploy to GitHub Pages
5435
id: deployment
55-
uses: actions/deploy-pages@v4
36+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

CLAUDE.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# @pyreon/docs
2+
3+
Documentation site for the Pyreon UI framework ecosystem.
4+
5+
## Stack
6+
7+
- **Framework**: Next.js 16 (App Router, static export to `out/`)
8+
- **Docs engine**: Fumadocs (fumadocs-core, fumadocs-ui, fumadocs-mdx)
9+
- **Styling**: Tailwind CSS v4 + fumadocs-ui preset
10+
- **Linting**: Biome (extends `@vitus-labs/tools-lint/biome`)
11+
- **TypeScript**: 6.x with strict mode
12+
- **Package manager**: Bun
13+
- **Deployment**: GitHub Pages via GitHub Actions
14+
15+
## Project structure
16+
17+
```
18+
src/
19+
app/
20+
(home)/page.tsx — Landing page (hero, features, package cards)
21+
docs/layout.tsx — Docs sidebar layout (fumadocs DocsLayout)
22+
docs/[[...slug]]/page.tsx — Dynamic MDX page renderer
23+
layout.tsx — Root layout (RootProvider, static search)
24+
global.css — Tailwind imports + custom hero/card styles
25+
components/ — Custom MDX components (APICard, PackageBadge, PropTable, CompatMatrix, Since)
26+
lib/
27+
source.ts — Fumadocs source loader
28+
layout.shared.tsx — Nav/link config shared between layouts
29+
30+
content/docs/ — MDX documentation pages (one folder per package)
31+
source.config.ts — Fumadocs MDX config (remarkInstall plugin)
32+
mdx-components.tsx — MDX component registry
33+
```
34+
35+
## Commands
36+
37+
```bash
38+
bun run dev # Start dev server
39+
bun run build # Static export to out/
40+
bun run typecheck # tsc --noEmit
41+
bun run lint # biome check .
42+
bun run lint:fix # biome check . --write
43+
bun run format # biome format . --write
44+
bun run check # typecheck + lint + build
45+
```
46+
47+
## Content authoring
48+
49+
- Each package has a folder under `content/docs/<package>/` with `index.mdx` and optional `meta.json`
50+
- MDX files use fumadocs frontmatter (`title`, `description`)
51+
- Custom components available in MDX: `APICard`, `PackageBadge`, `PropTable`, `CompatMatrix`, `Since`
52+
- Install blocks use `remarkInstall` plugin — write ```` ```package-install ````
53+
- Navigation tree is driven by `meta.json` files (fumadocs convention)
54+
55+
## Custom MDX components
56+
57+
- **APICard** — API item card with type badge (fn, C, H, T, K, P, Cx) and optional signature
58+
- **PackageBadge** — Package name/version badge with status indicator (stable/beta/alpha/deprecated)
59+
- **PropTable** — Props documentation table with columns: Prop, Type, Default, Description
60+
- **CompatMatrix** — Framework compatibility table with support levels (full/partial/none)
61+
- **Since** — Version badge (e.g. "v1.2.0+")
62+
63+
## CI/CD
64+
65+
- `ci.yml` — PR checks: lint, typecheck, build, dependency-review, CodeQL
66+
- `deploy.yml` — Push to main: runs CI, then deploys `out/` to GitHub Pages
67+
- `dependency-update.yml` — Weekly Monday: `bun update`, typecheck, lint, build, auto-PR
68+
- `codeql.yml` — Weekly Wednesday: standalone security scan
69+
- Dependabot groups: fumadocs, react, tailwind, types, GitHub Actions
70+
71+
## Conventions
72+
73+
- Static export (`output: 'export'`) — no server runtime
74+
- All GitHub Actions pinned by SHA with version comment
75+
- Biome extends `@vitus-labs/tools-lint/biome` (shared across Pyreon repos)
76+
- No tests (static docs site) — quality gates are typecheck + lint + build

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.8/schema.json",
33
"extends": ["@vitus-labs/tools-lint/biome"],
44
"files": {
55
"includes": [

0 commit comments

Comments
 (0)