php-ext-com/
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Pages CI/CD
├── public/
│ ├── sample-data/ # Sample dataset for local dev
│ │ ├── manifest.json
│ │ └── snapshots/
│ │ └── latest.json
│ └── favicon.svg
├── src/
│ ├── components/ # React components
│ │ ├── CellDrawer.tsx # Cell detail drawer
│ │ ├── ExtensionDetail.tsx # Extension detail page
│ │ ├── FilterBar.tsx # Filter controls
│ │ └── MatrixGrid.tsx # Virtualized grid
│ ├── hooks/ # Custom React hooks
│ │ ├── useDataset.ts # Dataset loading
│ │ └── useFilters.ts # Filter state management
│ ├── types/ # TypeScript definitions
│ │ └── index.ts # All type definitions
│ ├── utils/ # Utility functions
│ │ ├── data.ts # Data transformation
│ │ └── url.ts # URL param handling
│ ├── App.tsx # Main app component
│ ├── main.tsx # Entry point
│ ├── index.css # Global styles
│ └── vite-env.d.ts # Vite type definitions
├── index.html
├── package.json
├── tsconfig.json
├── tsconfig.node.json
├── vite.config.ts
└── README.md
# Install dependencies
bun install
# Start dev server
bun run dev
# Open http://localhost:5173The dev server uses sample data from public/sample-data/.
# Production build
bun run build
# Preview production build locally
bun run preview# Run ESLint
bun run lint- Fetches manifest.json
- Loads latest snapshot
- Handles errors gracefully
- Supports both relative and absolute URLs
- Manages filter state
- Syncs with URL query parameters
- Allows sharing filtered views via URL
- Uses
react-windowfor efficient rendering - Only renders visible rows
- Handles 200+ extensions smoothly
- No external state library needed
- React hooks for local state
- URL for shareable state
- Memoization for performance
- Update
FilterStateinsrc/types/index.ts - Add filter logic in
src/utils/data.ts→filterExtensions - Add UI control in
src/components/FilterBar.tsx - Update URL sync in
src/utils/url.ts
All styles are in src/index.css. Uses CSS custom properties for theming:
:root {
--primary: #4f46e5;
--success: #10b981;
/* etc... */
}Update VITE_DATASET_URL environment variable:
# .env.local (for local development)
VITE_DATASET_URL=https://api.example.com/manifest.jsonOr set during build:
VITE_DATASET_URL=https://api.example.com/manifest.json bun run build- Virtualization: Only render visible rows
- Memoization:
useMemofor expensive calculations - Code Splitting: Separate chunks for vendor code
- Debouncing: Could add for search input
- Lazy Loading: Could add for drawer components
# Build with source maps
bun run build
# Use browser DevTools → Performance
# Profile component renders with React DevTools- Filters work correctly
- Search finds extensions
- Matrix cells display correctly
- Cell drawer shows details
- Extension detail shows all data
- URL parameters persist filters
- Mobile responsive
- Data loads from external URL
- Error states display properly
- 200+ extensions perform well
- Create a test dataset in
public/test-data/ - Update manifest.json
- Set
VITE_DATASET_URL=./test-data/manifest.json - Run dev server
# Check types
bun run build
# Common issues:
# - Missing type imports
# - Incorrect prop types
# - Missing null checks# Clear cache and rebuild
rm -rf dist node_modules bun.lockb
bun install
bun run build# Kill process on port 5173
lsof -ti:5173 | xargs kill -9
# Restart
bun run dev- Fork the repository
- Create a feature branch
- Make changes
- Test thoroughly
- Submit pull request
- Fast HMR for development
- Optimized production builds
- Modern ESM-based
- Lightweight virtualization
- Simple API
- Good performance
- App is simple enough
- React hooks sufficient
- Reduces bundle size
- Shareable links
- Browser back/forward works
- No additional state management needed