|
1 | | -# Getting Started with Create React App |
| 1 | +# Chainstats |
2 | 2 |
|
3 | | -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
| 3 | +Chainstats is a React + Vite app that visualizes Chainstack blockchain node storage sizes by protocol, network, node type, and client. |
4 | 4 |
|
5 | | -## Available Scripts |
| 5 | +Production URL: [https://chainstats.org](https://chainstats.org) |
6 | 6 |
|
7 | | -In the project directory, you can run: |
| 7 | +## Data Source |
8 | 8 |
|
9 | | -### `npm start` |
| 9 | +- API endpoint: `https://console.chainstack.com/api/core/v1/calc/` |
| 10 | +- Source path: `Enterprise.protocols` |
| 11 | +- Inclusion rule in UI: |
| 12 | + - Use only `dedicated` entries |
| 13 | + - Include only nodes where `type === "public"` |
| 14 | + - Skip entries without `node_info.storage.size_required` |
10 | 15 |
|
11 | | -Runs the app in the development mode.\ |
12 | | -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. |
| 16 | +## Features |
13 | 17 |
|
14 | | -The page will reload when you make changes.\ |
15 | | -You may also see any lint errors in the console. |
| 18 | +- Protocol/network/client table with sorting and filtering. |
| 19 | +- Search by protocol slug and friendly display aliases. |
| 20 | +- Full and archive node-type rows. |
| 21 | +- Multi-client visibility per network/type. |
| 22 | +- Protocol icons with fallback badges for unmapped protocols. |
| 23 | +- Light/dark theme support. |
16 | 24 |
|
17 | | -### `npm run build` |
| 25 | +## Stack |
18 | 26 |
|
19 | | -Builds the app for production to the `build` folder.\ |
20 | | -It correctly bundles React in production mode and optimizes the build for the best performance. |
| 27 | +- React 19 |
| 28 | +- Vite 7 |
| 29 | +- Ant Design 6 |
| 30 | +- Sass |
| 31 | +- Axios |
21 | 32 |
|
22 | | -The build is minified and the filenames include the hashes.\ |
23 | | -Your app is ready to be deployed! |
| 33 | +## Local Development |
24 | 34 |
|
25 | | -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
| 35 | +### Prerequisites |
26 | 36 |
|
27 | | -### `npm run deploy` |
| 37 | +- Node.js 24+ |
| 38 | +- npm 9+ |
28 | 39 |
|
29 | | -Will deploy app on gh-pages |
| 40 | +### Install |
| 41 | + |
| 42 | +```bash |
| 43 | +npm install |
| 44 | +``` |
| 45 | + |
| 46 | +### Start dev server |
| 47 | + |
| 48 | +```bash |
| 49 | +npm start |
| 50 | +``` |
| 51 | + |
| 52 | +Open [http://localhost:5173](http://localhost:5173). |
| 53 | + |
| 54 | +## Scripts |
| 55 | + |
| 56 | +- `npm start`: run Vite dev server. |
| 57 | +- `npm run build`: create production build in `dist/`. |
| 58 | +- `npm run preview`: preview built app locally. |
| 59 | +- `npm run test`: run Vitest (`--passWithNoTests`). |
| 60 | +- `npm run check:protocol-icons`: compare visible API protocols to icon map coverage. |
| 61 | +- `npm run deploy`: publish `dist/` to GitHub Pages. |
| 62 | + |
| 63 | +## CI |
| 64 | + |
| 65 | +Workflow: `.github/workflows/ci.yml` |
| 66 | + |
| 67 | +Runs: |
| 68 | +1. `npm ci` |
| 69 | +2. `npm run check:protocol-icons` |
| 70 | +3. `npm run build` |
| 71 | + |
| 72 | +## Protocol Metadata |
| 73 | + |
| 74 | +Shared protocol formatting lives in: |
| 75 | + |
| 76 | +- `src/helpers/protocolMetadata.json` |
| 77 | +- `src/helpers/protocolDisplay.js` |
| 78 | + |
| 79 | +Use these helpers for protocol naming and network formatting in UI components. |
| 80 | + |
| 81 | +## Deployment |
| 82 | + |
| 83 | +1. Run checks: |
| 84 | + - `npm run check:protocol-icons` |
| 85 | + - `npm run build` |
| 86 | +2. Deploy: |
| 87 | + - `npm run deploy` |
| 88 | +3. Verify: |
| 89 | + - [https://chainstats.org](https://chainstats.org) |
0 commit comments