|
1 | | -# Patternfly Seed |
| 1 | +# PatternFly Metrics Dashboard |
2 | 2 |
|
3 | | -Patternfly Seed is an open source build scaffolding utility for web apps. The primary purpose of this project is to give developers a jump start when creating new projects that will use patternfly. A secondary purpose of this project is to serve as a reference for how to configure various aspects of an application that uses patternfly, webpack, react, typescript, etc. |
| 3 | +Adapted from the PatternFly seed app. |
| 4 | + |
| 5 | +This project is a work-in-progress. Developed by the PatternFly Enablement team, |
4 | 6 |
|
5 | 7 | Out of the box you'll get an app layout with chrome (header/sidebar), routing, build pipeline, test suite, and some code quality tools. Basically, all the essentials. |
6 | 8 |
|
@@ -101,3 +103,32 @@ ENV_2=http://2.myendpoint.com |
101 | 103 |
|
102 | 104 |
|
103 | 105 | With that in place, you can use the values in your code like `console.log(process.env.ENV_1);` |
| 106 | + |
| 107 | +## Live NPM Data Integration |
| 108 | + |
| 109 | +The application now includes live NPM download data for design system comparison charts. The data is automatically fetched from the NPM Registry API and updates every 30 minutes. |
| 110 | + |
| 111 | +### Features |
| 112 | +- **Real-time Data**: Fetches actual download statistics from npmjs.org |
| 113 | +- **Automatic Updates**: Refreshes every 30 minutes |
| 114 | +- **Manual Refresh**: Click "Refresh Now" button for immediate updates |
| 115 | +- **Fallback Support**: Uses sample data if API is unavailable |
| 116 | +- **Visual Indicators**: Shows data source status with color-coded indicators |
| 117 | + |
| 118 | +### Packages Tracked |
| 119 | +- `@patternfly/react-core` (PatternFly) |
| 120 | +- `@shopify/polaris` (Shopify Polaris) |
| 121 | +- `@carbon/react` (Carbon Design) |
| 122 | +- `@atlaskit/button` (Atlaskit) |
| 123 | + |
| 124 | +### CORS Considerations |
| 125 | +The app uses the public NPM Registry API (`api.npmjs.org`) which supports CORS. If you encounter CORS issues in your environment: |
| 126 | + |
| 127 | +1. **Development**: Run with CORS disabled or use a proxy |
| 128 | +2. **Production**: Deploy behind a reverse proxy that handles CORS |
| 129 | +3. **Alternative**: The app will gracefully fallback to sample data |
| 130 | + |
| 131 | +### Data Source |
| 132 | +- API: `https://api.npmjs.org/downloads/range` |
| 133 | +- Documentation: [NPM Registry API](https://github.com/npm/registry/blob/master/docs/download-counts.md) |
| 134 | +- Rate Limits: Reasonable usage is acceptable |
0 commit comments