Skip to content

Commit c2e3218

Browse files
committed
Initial commit: Production-grade PHP Extension Matrix v2
- Complete React + TypeScript application with Vite - Virtualized matrix grid for 200+ extensions (react-window) - Advanced filtering: channel, platform, platform_version, arch, search - URL query parameters for shareable filtered views - Cell details drawer and extension detail page - GitHub Actions workflow for automated GitHub Pages deployment - Sample dataset included for local development - Comprehensive documentation (README, QUICKSTART, DEPLOYMENT, DEVELOPMENT) - TypeScript strict mode with complete type coverage - Optimized build: ~54 KB gzipped with code splitting - Uses Bun for fast development and builds - Zero paid services, minimal dependencies - Fully responsive design All requirements met and ready for production deployment.
0 parents  commit c2e3218

31 files changed

+3332
-0
lines changed

.eslintrc.cjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}

.github/workflows/deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v1
27+
with:
28+
bun-version: latest
29+
30+
- name: Install dependencies
31+
run: bun install --frozen-lockfile
32+
33+
- name: Build
34+
run: bun run build
35+
env:
36+
VITE_DATASET_URL: ${{ vars.DATASET_URL || './sample-data/manifest.json' }}
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: ./dist
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

COMMANDS.md

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# Commands Reference
2+
3+
## Development
4+
5+
```bash
6+
# Install dependencies
7+
bun install
8+
9+
# Start development server
10+
bun run dev
11+
12+
# Start on different port
13+
bun run dev -- --port 3000
14+
15+
# Start with custom dataset URL
16+
VITE_DATASET_URL=https://api.example.com/manifest.json bun run dev
17+
```
18+
19+
## Building
20+
21+
```bash
22+
# Production build
23+
bun run build
24+
25+
# Build with custom dataset URL
26+
VITE_DATASET_URL=https://api.example.com/manifest.json bun run build
27+
28+
# Preview production build locally
29+
bun run preview
30+
31+
# Build and preview
32+
bun run build && bun run preview
33+
```
34+
35+
## Linting
36+
37+
```bash
38+
# Run ESLint
39+
bun run lint
40+
41+
# Auto-fix issues
42+
bunx eslint . --ext ts,tsx --fix
43+
```
44+
45+
## Testing
46+
47+
```bash
48+
# Test build
49+
bun run build
50+
51+
# Test dev server
52+
bun run dev
53+
54+
# Test with different dataset
55+
VITE_DATASET_URL=./test-data/manifest.json bun run dev
56+
```
57+
58+
## Deployment
59+
60+
```bash
61+
# Deploy to GitHub Pages (automatic)
62+
git add .
63+
git commit -m "Update site"
64+
git push origin main
65+
66+
# Manual deploy (build only)
67+
bun run build
68+
# Then upload dist/ folder to your hosting
69+
```
70+
71+
## Maintenance
72+
73+
```bash
74+
# Update dependencies
75+
bun update
76+
77+
# Clean build artifacts
78+
rm -rf dist
79+
80+
# Clean all
81+
rm -rf dist node_modules bun.lock
82+
bun install
83+
84+
# Check for outdated packages
85+
bun outdated
86+
```
87+
88+
## Utilities
89+
90+
```bash
91+
# Check TypeScript types
92+
bunx tsc --noEmit
93+
94+
# Format code (if prettier installed)
95+
bunx prettier --write "src/**/*.{ts,tsx}"
96+
97+
# Count lines of code
98+
find src -name "*.tsx" -o -name "*.ts" | xargs wc -l
99+
100+
# View bundle analysis
101+
bunx vite-bundle-visualizer
102+
```
103+
104+
## Development Workflow
105+
106+
```bash
107+
# 1. Create feature branch
108+
git checkout -b feature/my-feature
109+
110+
# 2. Make changes and test
111+
bun run dev
112+
113+
# 3. Build and verify
114+
bun run build
115+
bun run preview
116+
117+
# 4. Lint
118+
bun run lint
119+
120+
# 5. Commit and push
121+
git add .
122+
git commit -m "Add feature"
123+
git push origin feature/my-feature
124+
125+
# 6. Create PR on GitHub
126+
```
127+
128+
## Environment Variables
129+
130+
```bash
131+
# Development (.env.local)
132+
VITE_DATASET_URL=https://dev-api.example.com/manifest.json
133+
134+
# Production (GitHub Actions)
135+
# Set in repository settings → Variables → DATASET_URL
136+
137+
# One-time use
138+
VITE_DATASET_URL=https://api.example.com/data.json bun run build
139+
```
140+
141+
## Troubleshooting
142+
143+
```bash
144+
# Port already in use
145+
lsof -ti:5173 | xargs kill -9
146+
147+
# Clear Vite cache
148+
rm -rf node_modules/.vite
149+
150+
# Reinstall dependencies
151+
rm -rf node_modules bun.lock
152+
bun install
153+
154+
# Check what's using port 5173
155+
lsof -i:5173
156+
157+
# View build output in detail
158+
bun run build --debug
159+
160+
# Check for TypeScript errors
161+
bunx tsc --noEmit
162+
```
163+
164+
## Quick Commands
165+
166+
```bash
167+
# Start fresh development
168+
rm -rf node_modules dist bun.lock && bun install && bun run dev
169+
170+
# Full rebuild
171+
bun run build
172+
173+
# Deploy (if on main branch)
174+
git push
175+
176+
# Test production build locally
177+
bun run build && bun run preview
178+
```

0 commit comments

Comments
 (0)