-
Notifications
You must be signed in to change notification settings - Fork 80
Migrate stats-web from Next.js to Vite with React Router #2801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7d95e6f
38d3e3e
81fcbda
10d159f
146a4f0
20b499e
8222f15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,5 +3,5 @@ Dockerfile | |
| node_modules | ||
| npm-debug.log | ||
| README.md | ||
| .next | ||
| dist | ||
| .git | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| DEPLOYMENT_ENV=staging | ||
|
|
||
| NEXT_PUBLIC_API_BASE_URL=http://localhost:3080 | ||
| NEXT_PUBLIC_NODE_ENV=$NODE_ENV | ||
| NEXT_PUBLIC_BASE_API_MAINNET_URL=$NEXT_PUBLIC_API_BASE_URL | ||
| NEXT_PUBLIC_BASE_API_TESTNET_URL=$NEXT_PUBLIC_API_BASE_URL | ||
| NEXT_PUBLIC_BASE_API_SANDBOX_URL=$NEXT_PUBLIC_API_BASE_URL | ||
| NEXT_PUBLIC_DEFAULT_NETWORK_ID=mainnet | ||
| VITE_API_BASE_URL=http://localhost:3080 | ||
| VITE_BASE_API_MAINNET_URL=$VITE_API_BASE_URL | ||
| VITE_BASE_API_SANDBOX_URL=$VITE_API_BASE_URL | ||
| VITE_BASE_API_TESTNET_URL=$VITE_API_BASE_URL | ||
| VITE_DEFAULT_NETWORK_ID=mainnet | ||
| VITE_NODE_ENV=$NODE_ENV | ||
|
|
||
| API_HOST_WITH_DEFAULT=${API_HOST:-localhost} | ||
|
|
||
| BASE_API_MAINNET_URL=http://${API_HOST_WITH_DEFAULT}:3080 | ||
| BASE_API_TESTNET_URL=${BASE_API_MAINNET_URL} | ||
| BASE_API_SANDBOX_URL=${BASE_API_MAINNET_URL} | ||
| BASE_API_TESTNET_URL=${BASE_API_MAINNET_URL} | ||
| LOG_LEVEL=debug | ||
|
|
||
| NEXT_PUBLIC_LOG_LEVEL=debug | ||
| NEXT_PUBLIC_SENTRY_ENABLED=false | ||
| VITE_LOG_LEVEL=debug | ||
| VITE_SENTRY_ENABLED=false | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| module.exports = { | ||
| extends: [require.resolve("@akashnetwork/dev-config/.eslintrc.ts")], | ||
| overrides: [ | ||
| { | ||
| files: ["*.ts", "*.tsx"], | ||
| rules: { | ||
| "react/no-unescaped-entities": "warn", | ||
| "react-hooks/exhaustive-deps": "warn", | ||
| "react/display-name": "off" | ||
| } | ||
| } | ||
| ], | ||
| settings: { | ||
| "import-x/ignore": ["react"] | ||
| } | ||
| }; |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| NEXT_PUBLIC_UNLEASH_APP_NAME=stats-web | ||
| NEXT_PUBLIC_UNLEASH_ENABLE_ALL=false | ||
| VITE_UNLEASH_ENABLE_ALL=false | ||
|
|
||
| VITE_SENTRY_DSN="https://c2af143d11c20d4bf20e7b668d493aaf@o877251.ingest.us.sentry.io/4510740211105792" | ||
| VITE_SENTRY_ENABLED=false | ||
|
|
||
| NEXT_PUBLIC_SENTRY_APPLICATION_KEY="AKASH-STATS-WEB" | ||
| NEXT_PUBLIC_SENTRY_DSN="https://c2af143d11c20d4bf20e7b668d493aaf@o877251.ingest.us.sentry.io/4510740211105792" | ||
| SENTRY_ORG=cloudmos | ||
| SENTRY_PROJECT=$NEXT_PUBLIC_UNLEASH_APP_NAME | ||
| SENTRY_PROJECT=stats-web |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,9 @@ | ||
| NEXT_PUBLIC_NODE_ENV=$NODE_ENV | ||
| NEXT_PUBLIC_BASE_API_MAINNET_URL=https://console-api.akash.network | ||
| NEXT_PUBLIC_BASE_API_SANDBOX_URL=https://console-api-sandbox.akash.network | ||
| NEXT_PUBLIC_BASE_API_TESTNET_URL=https://console-api-testnet.akash.network | ||
| NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_BASE_API_MAINNET_URL | ||
| VITE_API_BASE_URL=$VITE_BASE_API_MAINNET_URL | ||
| VITE_BASE_API_MAINNET_URL=https://console-api.akash.network | ||
| VITE_BASE_API_SANDBOX_URL=https://console-api-sandbox.akash.network | ||
| VITE_BASE_API_TESTNET_URL=https://console-api-testnet.akash.network | ||
| VITE_NODE_ENV=$NODE_ENV | ||
|
|
||
| NEXT_PUBLIC_GA_MEASUREMENT_ID=G-MLJ2W9K3MJ | ||
| VITE_GA_MEASUREMENT_ID=G-MLJ2W9K3MJ | ||
|
|
||
| BASE_API_MAINNET_URL=$NEXT_PUBLIC_BASE_API_MAINNET_URL | ||
| BASE_API_TESTNET_URL=$NEXT_PUBLIC_BASE_API_TESTNET_URL | ||
| BASE_API_SANDBOX_URL=$NEXT_PUBLIC_BASE_API_SANDBOX_URL | ||
|
|
||
| NEXT_PUBLIC_UNLEASH_FRONTEND_API_URL=https://features-edge.akash.network/api/frontend | ||
| NEXT_PUBLIC_UNLEASH_FRONTEND_API_TOKEN=*:production.3de2776029292b1860a520b1aa3ee9e417ae300283811fd77d231060 | ||
|
|
||
| NEXT_PUBLIC_SENTRY_ENABLED="true" | ||
| VITE_SENTRY_ENABLED=true |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,10 @@ | ||||||||||||||||||
| NEXT_PUBLIC_API_BASE_URL= | ||||||||||||||||||
| NEXT_PUBLIC_UNLEASH_ENABLE_ALL=true | ||||||||||||||||||
| NEXT_PUBLIC_UNLEASH_FRONTEND_API_URL= | ||||||||||||||||||
| NEXT_PUBLIC_UNLEASH_FRONTEND_API_TOKEN= | ||||||||||||||||||
| VITE_API_BASE_URL= | ||||||||||||||||||
| VITE_BASE_API_MAINNET_URL= | ||||||||||||||||||
| VITE_BASE_API_SANDBOX_URL= | ||||||||||||||||||
|
Comment on lines
+1
to
+3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep key order consistent with dotenv-linter. The linter expects ♻️ Suggested change VITE_API_BASE_URL=
VITE_BASE_API_MAINNET_URL=
-VITE_BASE_API_TESTNET_URL=
VITE_BASE_API_SANDBOX_URL=
+VITE_BASE_API_TESTNET_URL=📝 Committable suggestion
Suggested change
🧰 Tools🪛 dotenv-linter (4.0.0)[warning] 4-4: [UnorderedKey] The VITE_BASE_API_SANDBOX_URL key should go before the VITE_BASE_API_TESTNET_URL key (UnorderedKey) 🤖 Prompt for AI Agents |
||||||||||||||||||
| VITE_BASE_API_TESTNET_URL= | ||||||||||||||||||
| VITE_UNLEASH_ENABLE_ALL=true | ||||||||||||||||||
|
|
||||||||||||||||||
| NEXT_PUBLIC_SENTRY_APPLICATION_KEY= | ||||||||||||||||||
| NEXT_PUBLIC_SENTRY_DSN= | ||||||||||||||||||
| NEXT_PUBLIC_SENTRY_SERVER_NAME= | ||||||||||||||||||
| VITE_GA_MEASUREMENT_ID= | ||||||||||||||||||
|
|
||||||||||||||||||
| VITE_SENTRY_DSN= | ||||||||||||||||||
| VITE_SENTRY_ENABLED=false | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,7 @@ | ||
| NEXT_PUBLIC_NODE_ENV=$NODE_ENV | ||
| NEXT_PUBLIC_BASE_API_MAINNET_URL=https://console-api-mainnet-staging.akash.network | ||
| NEXT_PUBLIC_BASE_API_SANDBOX_URL=https://console-api-sandbox-staging.akash.network | ||
| NEXT_PUBLIC_BASE_API_TESTNET_URL=$NEXT_PUBLIC_BASE_API_MAINNET_URL | ||
| NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_BASE_API_MAINNET_URL | ||
| VITE_API_BASE_URL=$VITE_BASE_API_MAINNET_URL | ||
| VITE_BASE_API_MAINNET_URL=https://console-api-mainnet-staging.akash.network | ||
| VITE_BASE_API_SANDBOX_URL=https://console-api-sandbox-staging.akash.network | ||
| VITE_BASE_API_TESTNET_URL=$VITE_BASE_API_MAINNET_URL | ||
| VITE_NODE_ENV=$NODE_ENV | ||
|
|
||
| BASE_API_MAINNET_URL=$NEXT_PUBLIC_BASE_API_MAINNET_URL | ||
| BASE_API_TESTNET_URL=$NEXT_PUBLIC_BASE_API_TESTNET_URL | ||
| BASE_API_SANDBOX_URL=$NEXT_PUBLIC_BASE_API_SANDBOX_URL | ||
|
|
||
| NEXT_PUBLIC_UNLEASH_FRONTEND_API_URL=https://features-edge-beta.akash.network/api/frontend | ||
| NEXT_PUBLIC_UNLEASH_FRONTEND_API_TOKEN=*:development.34efccc4c8ba7d6ddeeb4083d72bc8ac05770774ac4d6668e749ca5a | ||
|
|
||
| NEXT_PUBLIC_SENTRY_ENABLED="true" | ||
| VITE_SENTRY_ENABLED=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/x-icon" href="/favicon.ico" /> | ||
| <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" /> | ||
| <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" /> | ||
| <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> | ||
| <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#e41e13" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" /> | ||
| <meta name="theme-color" content="#e41e13" /> | ||
| <meta name="description" content="Akash Network Analytics. The #1 decentralized supercloud." /> | ||
| <meta property="og:type" content="website" /> | ||
| <meta property="og:locale" content="en_US" /> | ||
| <meta property="og:url" content="https://stats.akash.network/" /> | ||
| <meta property="og:site_name" content="Akash Stats" /> | ||
| <meta property="og:description" content="Akash Network Analytics. The #1 decentralized supercloud." /> | ||
| <meta property="og:image" content="https://stats.akash.network/akash-stats.png" /> | ||
| <meta property="og:image:width" content="1200" /> | ||
| <meta property="og:image:height" content="630" /> | ||
| <meta property="og:image:alt" content="Akash Stats Cover Image" /> | ||
| <meta name="twitter:site" content="@akashnet" /> | ||
| <meta name="twitter:card" content="summary_large_image" /> | ||
| <title>Akash Network Stats</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| server { | ||
| listen 3000; | ||
| server_name _; | ||
| server_tokens off; | ||
|
|
||
| root /usr/share/nginx/html; | ||
| index index.html; | ||
|
|
||
| # gzip compression | ||
| gzip on; | ||
| gzip_vary on; | ||
| gzip_proxied any; | ||
| gzip_comp_level 6; | ||
| gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml; | ||
|
|
||
| # Cache static assets | ||
| location /assets/ { | ||
| expires 1y; | ||
| add_header Cache-Control "public, immutable"; | ||
| } | ||
|
|
||
| # SPA fallback - serve index.html for all non-file routes | ||
| location / { | ||
| try_files $uri $uri/ /index.html; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address dotenv-linter key ordering to keep the file lint-clean.
The linter flags
VITE_BASE_API_SANDBOX_URLbeing placed afterVITE_BASE_API_TESTNET_URL. Consider reordering to satisfy the.envordering rules.🔧 Suggested reorder
📝 Committable suggestion
🧰 Tools
🪛 dotenv-linter (4.0.0)
[warning] 7-7: [UnorderedKey] The VITE_BASE_API_SANDBOX_URL key should go before the VITE_BASE_API_TESTNET_URL key
(UnorderedKey)
🤖 Prompt for AI Agents